Create Snapshot with LVM |
Server Training - Logical Volume Management | ||||||||
Create a SnapshotA snapshot is like a backup of the logical volume. Before you take a snapshot click on the logical volume that you will take a snapshot of from the Logical Volume Manager and then choose Edit Properties. This window will open that will give you additional information about your logical volume. You can see that this logical volume is mounted as /home. You will see the LV name at the top, the size of the LV and the Filesystem settings.
Once you have reviewed the Edit Properties, select the Logical Volume you want to create a snapshot for and choose Create a Snapshot. Here you can see in the Logical View that there are a number of snapshots that have been created. One thing to note is that when you take a snapshot it will only capture your data, not empty space. This makes your backups very useful in terms of conserving valuable space on the disk.
Here is an example of creating a snapshot for LogVol00, notice you can name the snapshot, edit the size with Extents, mount the system on reboot and select a new mount point. The purpose of naming the snapshot is related to either recognition of what the snapshot is a backup of or how you want to mount it on the filesystem.
Create a /data mount point with LV size 3. Make sure it is mounted when rebooted. Yes, you can create a backup and then mount it on the file system and immediately have access to the data on a newly mounted location. This is useful when you want to verify data, test new applications, etc. The system will not only mount it but create the volume and edit /etc/fstab for you. In this example the snapshot was named snap but the mount location is named /data. You will want to come up with a strategy which will help you create and label snapshots so you clearly understand which one is the backup and which is the actual mount point.
Here you can see the mount point is mounted and ready to receive data.
Because the snapshot was a backup of the /home directory, if you look inside of /data you will see the /home directories backed up and mounted.
Copyright CyberMontana Inc. and BeginLinux.com All rights reserved. Cannot be reproduced without written permission. Box 1262 Trout Creek, MT 59874
|