This post will show you How to Create LVM Snapshot Volume in Linux Easily.
If you are interested in learning, Request you to go through the below recommended tutorial.
DevOps Full Course Tutorial for Beginners - DevOps Free Training Online
Docker Full Course Tutorial for Beginners - Docker Free Training Online
Kubernetes Full Course Tutorial for Beginners - Kubernetes Free Training Online
Ansible Full Course Tutorial for Beginners - Ansible Free Training Online
Openstack Full Course Tutorial for Beginners - Openstack Free Training Online
How to Create LVM Snapshot Volume in Linux Easily?
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 Create 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.
Hope you have got an idea How to Create LVM Snapshot Volume in Linux Easily.
Related Content on Linux might be useful to you to improve your Linux Skills.
How to Configure IP Address on Ubuntu using Netplan
How to Access Linux Server from Windows Remotely
Configure SSH Passwordless Login Authentication (SSH-keygen)
How to Create LVM Partition in Linux – LVM Tutorial
Install & Configure Samba Server on Linux (RHEL7 / CentOS7)
How to Access Linux Server from Windows Remotely
Configure SSH Passwordless Login Authentication (SSH-keygen)
How to Create LVM Partition in Linux – LVM Tutorial
Install & Configure Samba Server on Linux (RHEL7 / CentOS7)
Keep practicing and have fun. Leave your comments if any.
Support Us: Share with your friends and groups.
Stay connected with us on social networking sites, Thank you.
create lvm snapshot, how to create lvm snapshot in linux, create snapshot volume, how to take snapshot of lvm, lvm snapshot how it works, lvm snapshot backup
0 Comments