Certification Objective 9.02Performing Backup of a Mounted File System


Certification Objective 9.02—Performing Backup of a Mounted File System

Exam Objective 6.3: Backup a mounted file system by creating a UFS snapshot and performing a backup of the snapshot file.

As you already know, you cannot use the ufsdump command to make a backup of an active file system. However, if for some reason you do want to make a backup of an active file system, the first step is to take a snapshot of the system. A UFS snapshot is a temporary image of a UFS file system made for backup purpose. Solaris offers the fssnap command to create a read-only snapshot of a file system. The advantage of this command, of course, is that it can be used while the system is in multiuser mode and the file system is mounted: the disadvantage is that it may impede system performance when the snapshot is being taken.

The fssnap command creates a virtual device, and you can use the tar or cpio command to back up the snapshot to a storage device such as a tape. The syntax of the fssnap command for taking the snapshot of a file system is:

    fssnap [-F <fileSystem>] [-V] -o backing-store=<destPath>,    [<specificOptions>] <mountPoint> 

image from book
Exam Watch

The fssnap command can be used when the system is in multiuser mode and the file system is mounted. This command does not back up data to an external device, but creates a virtual device on the disk that can later be backed up to an external device by using commands such as ufsdump, tar, or cpio.

image from book

The <mountPoint> specifies the directory name to which the file system (that is to be snapshot) is mounted. You must also specify the path for the backing-store file, <destPath>. The backing-store file(s) are used by the snapshot subsystem to save the old file system data before it is overwritten. The name specified by <destPath> must not match an existing file name. If <destPath> specifies the name of an existing directory, the backing-store file will be created in that directory and a file name will be provided automatically. You can use the abbreviation bs for the backing-store option.

The <specificOptions>, which are not required, are described here:

  • unlink. Unlink the backing-store file when the snapshot is created.

  • chunksize=<n>. Specify the granularity of the data that will be sent to the backing file in units of kilobytes (k), megabytes (m), or gigabytes (g). For example, the value of <n> would be 32k to specify a granularity of 32 kilobytes.

  • maxsize=<n>. Specify the allowed maximum value for the sum of sizes of all the backing-store files. The units for <n> are the same as in the chunksize option. When the sum of sizes of the backing-store files exceed the size specified by maxsize, the snapshot is automatically deleted.

  • raw. Display to standard output the raw device name (instead of block device name) when a snapshot is created. The default is the block device name.

On the Job 

When you use the unlink option in creating a snapshot, the backing-store file will not be visible to you. That might make administration difficult. However, the file will be deleted automatically when the snapshot is deleted.

Remember that the backing-store files are the bitmap files that contain the copies of pre-snapshot data that has been modified since the snapshot was taken. Note the following about the backing-store files:

  • The destination of the backing-store files must have enough free space to hold the file system data.

  • The location for the backing-store files must be different from the file system that is being captured in the snapshot.

  • The size of the backing-store files depends on the amount of activity on the file system.

  • The backing-store files can reside on any type of file system, including another UFS file system or a file system mounted by NFS.

  • In the fssnap command you may specify the name of a backing-store file. The fssnap utility automatically creates additional backing-store files on an as-needed basis after the first backing-store file. For example, multiple backing-store files are created when you create a snapshot of a UFS file system that is larger than 512GB.

  • The additional backing-store files that will be automatically created will have the same name as the original file with suffixes of .2, .3, and so on.

Now that you know how the fssnap command works, here are some practical scenarios and their solutions related to using this command.

SCENARIO & SOLUTION

How would you issue the fssnap command to take a snapshot of a UFS file system mounted to the directory /export/home? The backing-store files should be created in the /var/tmp directory.

 fssnap -F ufs -o backing-store=/var /tmp/export/home 

How will the command change if you want the backing-store files deleted automatically when the snapshot is deleted?

 fssnap -F ufs -o backing-store=/var /tmp, unlink /export/home 

How can you use the ufsdump command to back up the file system /export/home without unmounting it?

 ufsdump 0uf /dev/rmt/0 'fssnap -F ufs -o backing-stores=/var/tmp, raw /export/home' 

You make backups of file systems so that they can be restored to recover lost data in case of a disk failure or a disaster such as fire.




Sun Certified System Administrator for Solaris 10 Study Guide Exams 310-XXX & 310-XXX
Sun Certified System Administrator for Solaris 10 Study Guide Exams 310-XXX & 310-XXX
ISBN: N/A
EAN: N/A
Year: 2005
Pages: 168

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net