Solaris 8 System Administration Supplement

Deleting a UFS Snapshot

When you create a UFS snapshot, you can specify that the backing-store file is unlinked, which means the backing-store file is removed after the snapshot is deleted. If you don't specify the -o unlink option when you create a UFS snapshot, you will have to delete it manually.

The backing-store file occupies disk space until the snapshot is deleted, whether you use the -o unlink option to remove the backing-store file or you remove it manually.

How to Delete a UFS Snapshot

You can delete a snapshot either by rebooting the system or by using the fssnap -d command and specifying the path of the file system that contains the file-system snapshot.

  1. Become superuser.

  2. Identify the snapshot to be deleted.


    # fssnap -i
    
  3. Delete the snapshot.


    # fssnap -d  /file-system
    Deleted snapshot 1.
  4. (Optional) If you did not use the -o unlink option when you created the snapshot, you need to delete the backing-store file manually.


    # rm /file-system/backing-store-file
    

Example—Deleting a UFS Snapshot

The following example deletes a snapshot and assumes that the unlink option was not used.


# fssnap -i
    0    /    1    /usr
# fssnap -d /usr
 Deleted snapshot 1.
# rm /scratch/usr.back.file