– -i no 

Sets the immutable  attribute of the file to no . 

GLYPH<SM590000> mmchattr -a yes|no 

This command sets or unsets a file to or from an appendOnly  state: 

– -a yes 

Sets the appendOnly  attribute of the file to yes . 

– -a no 

Sets the appendOnly  attribute of the file to no . 

Note:  Before an immutable  or appendOnly  file can be deleted, you must change it to mutable or set appendOnly  to no  (by using the mmchattr  command). 

Storage pool assignment of an immutable  or appendOnly  file can be changed. An immutable  or appendOnly  file is allowed to transfer from one storage pool to another. 

To display whether a file is immutable  or appendOnly , run this command: 

mmlsattr -L myfile 

The system displays information similar to the output shown in Example 7-104. 

file name: myfile metadata replication: 2 max 2 data replication: 1 max 2 immutable: no appendOnly: no flags: storage pool name: sp1 fileset name: root snapshot name: creation Time: Wed Feb 22 15:16:29 2012 Windows attributes: ARCHIVE 

## 7.23.3 The effects of file operations on immutable and appendOnly files 

After a file is set as immutable  or appendOnly , the following file operations and attributes work differently from the way they work on regular files: 

GLYPH<SM590000> delete 

An immutable  or appendOnly  file cannot be deleted. 

GLYPH<SM590000> modify/append 

An immutable  file cannot be modified or appended. An appendOnly  file cannot be modified, but it can be appended. 

Note:  The immutable  and appendOnly  flag check takes effect after the file is closed. Therefore, the file can be modified if it is opened before the file is changed to immutable . 

