Listing file clones
Use the mmclone command to display status for specified files.
The show keyword of the mmclone command provides a report to determine the current status of one or more files. When a file is a clone, the report will show the parent inode number. When a file was cloned from a file in a snapshot, mmclone show displays the snapshot and fileset information.
Consider the following scenario:
- The ls command is issued to show all img files
in the current directory:
The system displays output similar to the following:ls -ils *.img
148485 5752576 -rw-r--r-- 1 root root 21474836480 Jan 9 16:19 test01.img
- A file clone is then created with the following commands:
mmclone snap test01.img base.img mmclone copy base.img test02.img
- After the file clone is created, the mmclone show command
is issued to show information about all img files
in the current directory:
The system displays output similar to the following:mmclone show *.img
Parent Depth Parent inode File name ------ ----- -------------- --------- yes 0 base.img no 1 148488 test01.img no 1 148488 test02.img
- A subsequent ls command would display
output similar to the following:
ls -ils *.img 148488 5752576 -rw-r--r-- 3 root root 21474836480 Jan 9 16:25 base.img 148485 0 -rw-r--r-- 1 root root 21474836480 Jan 9 16:19 test01.img 148480 0 -rw-r--r-- 1 root root 21474836480 Jan 9 16:25 test02.img
For complete usage information, see mmclone command.