Creating immutable filesets and files
To configure and deploy a WORM solution, it is mandatory to create an immutable fileset in IBM Storage Scale.
- Create an independent fileset by using the mmcrfileset command.
-
Link the fileset to a directory within the file system which must not exist at this point:
mmlinkfileset <file system name> <fileset name> -J directoryNote: This directory is the immutable fileset path. -
Set an IAM mode for the files by using the following command:
mmchfileset <file system name> <fileset name> --iam-mode compliant -
Create a test file date > testfile with read-write permissions and fill
the file with some content:
echo “Hello World” > file -
Check the extended attributes of the file which indicate that the file is not immutable by
using the mmlsattr command:
mmlsattr -L testfile file name: testfile metadata replication: 1 max 2 data replication: 1 max 2 immutable: no appendOnly: no indefiniteRetention: no expiration Time: Wed Mar 15 17:16:13 2016 flags: storage pool name: system fileset name: WORMfs snapshot name: creation time: Wed Mar 15 17:16:13 2016 Misc attributes: ARCHIVE Encrypted: no -
Set the file to read-only:
chmod –w testfile -
Set the future expiration time using mmchattr. Select a time in the
immediate future for quick expiry and deletion.
mmchattr --expiration-time 2016-03-15@18:16:13 testfile -
Verify that immutability and expiration time are set by using
mmchattr:
mmlsattr -L testfile file name: testfile metadata replication: 1 max 2 data replication: 1 max 2 immutable: yes appendOnly: no indefiniteRetention: no expiration Time: Wed Mar 15 18:16:13 2016 flags: storage pool name: system fileset name: WORMfs snapshot name: creation time: Wed Mar 15 17:16:13 2016 Misc attributes: ARCHIVE READONLY Encrypted: no -
Verify that the files cannot be modified or deleted. Run the following commands:
The system displays an output similar to this:chmod +w testfilechmod: changing permissions of 'testfile': Operation not permitted
The system displays an output similar to this:date > testfiletestfile: Read-only file system
The system displays an output similar to this:rm -f testfilerm: cannot remove 'testfile': Read-only file systemFor more information, see the following topics: