Series of the tutorial to learn LVM commands. In this part, learn how to sync LV and set it as a boot, root, swap device (lvsync, lvlnboot)
This is the last part of LVM command tutorials and last post for logical volume command too. Last all parts of this tutorial can be found on below links :
- Part 1 : Physical Volume (pvcreate, pvdisplay)
- Part 1 : Physical Volume (pvchange, pvmove)
- Part 2 : Volume group (vgcreate, vgdisplay, vgscan)
- Part 2 : Volume group (vgextend, vgreduce, vgexport, vgimport)
- Part 2 : Volume group (vgcfgbackup, vgcfgrestore, vgchange)
- Part 2 : Volume group (vgremove, vgsync)
- Part 3 : Logical Volume (lvcreate, lvdisplay, lvremove)
- Part 3 : Logical Volume (lvextend, lvreduce, lvchange)
Let’s start with our first command here.
It synchronizes stale PE in given LV. It’s used in mirroring environment. Whenever there is any disk failure or disk path issue, PE goes bad and LV, in turn, has stale PE. Once the issue is corrected we need to sync stale PE with this command if they don’t sync automatically.
The command doesn’t have many options. It should be supplied with the LV path only.
# /usr/sbin/lvsync /dev/vg00/lvol6 Resynchronized logical volume "/dev/vg00/lvol6".
This command used to define logical volume as a root, dump, swap or boot volume. You have to submit an LV path along with the specific option of your choice to command. Options are as below :
-RRecover any missing links
# lvlnboot -r /dev/vg00/lvol3 Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf # lvlnboot -b /dev/vg00/lvol1 Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf # lvlnboot -s /dev/vg00/lvol2 Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf # lvlnboot -d /dev/vg00/lvol2 Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf
We have already seen this command in root disk mirroring.
This concludes our LVM command tutorials!! Feel free to drop in any queries you have.
Share Your Comments & Feedback: