How to Create LVM Snapshot Volume in Linux

create snapshot volume, how to take snapshot of lvm, how to create lvm snapshot, how to create lvm snapshot in rhel server, lvm2 snapshot, lvm snapshot backup

How to create LVM Snapshot Volume in Linux
This post shows you how to create a LVM Snapshot volume in Linux.

What is LVM Snapshots?
LVM Snapshots means Point-In-Time copies of logical volumes. However, snapshots are not true copies of the reference LVs. If the original LV has been changed after the creation of the snapshot then the original data in the snapshot will be copied into the snapshot first, Copy-on-Write

How to take a LVM Snapshot in Linux?
Snapshot volume can be as large or a small as you like but it must be large enough to hold all the changes that are likely to happen to the original volume during the lifetime of the snapshot. We suggest you to have the same size of Source volume while creating a snapshot.

For example, Lets say we have a volumegroup vg00, in which the source volume size is 4GB and we have free space of 4 GB Left in the volumegroup. So we can take snapshot of the source volume to the snapshot volume. If we dont have free space to create a snapshot volume, try to add a new disk to the existing volumegroup and create a snapshot volume.
[root@server1:~]# vgdisplay
  --- Volume group ---
  VG Name               vg00
[...]
  VG Size               7.98 GiB
  PE Size               4.00 MiB
  Total PE              2044
  Alloc PE / Size       1022 / 3.99 GiB
  Free  PE / Size       1022 / 4.00 GiB                           ==> 4 GB Free space available
  VG UUID               YTEj9f-9LCT-EOP5-JBEA-YHSz-c0R1-TMzVmy
We will use the free space 4GB to create a snapshot volume in Linux.
[root@server1:~]# lvcreate -l100%FREE -s -n snap_vol1 /dev/vg00/vol1
  Logical volume "snap_vol1" created
Where '-s' to take a snapshot of the volume specified at the last in the command and '-n' to specify the snapshot volume name.

To verify the data, mount the snapshot volume snap_vol1 on some folder and ensure the data available or not.
[root@server1:~]# mount /dev/vg00/snap_vol1 /mnt
Your data will be available under /mnt, this can be used to restore the data from this snapshot volume anytime. And also you can remove the snapshot volume using lvremove command (lvremove /dev/vg00/snap_vol1) if you dont need this snapshot volume anymore.

Thanks for reading our post. share with your friends. We appreciate your feedback, Leave your comments if any.
We have more articles to be updated soon. To not miss any updates, Follow us on social networking sites and Subscribe us on our Youtube channel. create snapshot volume, how to take snapshot of lvm, how to create lvm snapshot, how to create lvm snapshot linux, how to create lvm snapshot in rhel server, lvm2 snapshot, lvm snapshot restore, lvm snapshot in redhat linux, lvm snapshot how it works, lvm snapshot backup, lvm snapshot in redhat linux, how to take snapshot in linux from terminal, how to take backup in linux command, how to take backup in linux redhat, how to take backup in linux using commands, how to take backup in linux server, what is lvm snapshot in linux, How to Take Snapshot of Logical Volume in LVM, Taking a Backup Using Snapshots, Create root filesystem snapshots with LVM
June 16, 2016

Post a Comment

[disqus][facebook][blogger]

Contact Form

Name

Email *

Message *

Powered by Blogger.
Javascript DisablePlease Enable Javascript To See All Widget