VG Related command tips in Linux:
This post will help you to keep remember Volume Group - VG related commands in Linux at the time of interview Preparation.
Display Volume Group
vgdisplay -v
vgs -v
vgs -a -o +devices
vgs flags:
#PV - number of physical devices
#LV - number of configured volumes
vgs attributes are:
1. permissions (r)|(w)
2. resi(z)eable
3. e(x)ported
4. (p)artial
5. allocation policy - (c)ontiguous, c(l)ing, (n)ormal, (a)nywhere, (i)nherited
6. (c)luster
Create VG :
vgcreate VolData00 /dev/sdb1 /dev/sdb2 /dev/sdb3
vgcreate VolData00 /dev/sdb[123]
## Use 32MB extent size
# vgcreate VGName -s 32 /dev/sdb1
Common Attributes that you may want to use:
-l maximum logical volumes
-p maximum physical volumes
-s physical extent size (default is 4MB)
-A autobackup
Extend / Reduce / Remove Volume Group :
vgextend VGName /dev/sdb3
vgreduce VGName /dev/sdb3
vgreduce --removemissing --force VolData00
vgremove VGName
Change in VG :
vgchange -a n VolData00
Common Attributes that you may want to use:
-a control availability of volumes within the group
-l maximum logical volumes
-p maximum physical volumes
-s physical extent size (default is 4MB)
-x resizable yes or no (see VG status in vxdisplay)
Check and rename Volume Group :
#vgrename VGName VGName_New //no LV should be activate at the time of rename
#vgck VolData00 //checking consistency of Meta data
Convert / Merge / Split Volume Group:
#vgconvert -M2 VGName //convert one type to anothe type (lvm1 to lvm2)
#vgmerge New_Vol_Group Old_Vol_Group /old vg will be merged to new VG
#vgsplit Old_Vol_Group New_Vol_Group [physical volumes] [-n logical volume name]
Import / Export Volume Group
#vgimport VGName
#vgexport VGName
Backup and Restore:
# vgcfgbackup VGname
# vgcfgrestore -f /var/backup/VGname_bkup VGName
4 Comments
ReplyDeleteIn the world of custom apparel, using high-quality materials is essential for achieving professional results. When you are ready to start your project, make sure to have everything prepared beforehand. For a seamless process, you can rely on dtf transfers ready to press to ensure your designs are perfect and durable. This approach helps save time and guarantees a polished final product. Proper preparation and the right supplies are key to success.
157EEC6F
ReplyDeleteYozgat
Tekirdağ
Kastamonu
Burdur
Isparta
Mardin
Yalova
Ardahan
Ordu
58012C57
ReplyDeleteBeypazarı
Gökçeada
İskenderun
Beyoğlu
Elbistan
Bitez
Altınova
İçmeler
Balçova
1B6F51F7
ReplyDeleteGemlik
Saray
Kınık
Tarsus
Bayraklı
Bornova
Yakuplu
Edremit
Bayındır