{"id":7086,"date":"2017-10-11T18:34:12","date_gmt":"2017-10-11T10:34:12","guid":{"rendered":"http:\/\/rmohan.com\/?p=7086"},"modified":"2017-10-11T18:49:04","modified_gmt":"2017-10-11T10:49:04","slug":"lvmlogical-volume-manager","status":"publish","type":"post","link":"https:\/\/mohan.sg\/?p=7086","title":{"rendered":"LVM(LOGICAL VOLUME MANAGER)"},"content":{"rendered":"<p>LVM(LOGICAL VOLUME MANAGER)<br \/>\n            LVM(LOGICAL VOLUME MANAGER)<br \/>\n        &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<\/p>\n<p>1>first create partion<\/p>\n<p>#partprobe -s<\/p>\n<p>#pvcreate \/dev\/sda?<\/p>\n<p>#pvcreate \/dev\/sda?<\/p>\n<p>#vgcreate vg0 \/dev\/sda? \/dev\/sda?<\/p>\n<p>#vgdisplay<\/p>\n<p>#pvdisplay<\/p>\n<p>#lvdisplay<\/p>\n<p>#lvcreate -n lvm0 -L 150M vg0   (where -n&#8212;->name, -L&#8212;>length)<\/p>\n<p>#lvdisplay<\/p>\n<p>#mkfs.ext3 \/dev\/vg0\/lvm0<\/p>\n<p>#mkdir \/mnt\/lvm1<\/p>\n<p>#mount \/dev\/vg0\/lvm0 \/mnt\/lvm0<\/p>\n<p>#vim \/etc\/fstab<br \/>\n\/dev\/vg0\/lvm0 \/mnt\/lvm0 ext3 defaults 0 0<\/p>\n<p>#mount -a<\/p>\n<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<\/p>\n<p>Steps To Extend The LVM<br \/>\n&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<\/p>\n<p>#lvextend -L 300M \/dev\/vg0\/lvm0<br \/>\n         (OR)<br \/>\n#lvextend -L +150M \/dev\/vg0\/lvm0<\/p>\n<p>#lvdisplay<\/p>\n<p>#df -h<\/p>\n<p>#resize2fs \/dev\/vg0\/lvm0 (To give the information abt changing the size to the system)<\/p>\n<p>#df -h<br \/>\n&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<\/p>\n<p>Steps To Reduce The Size Of LVM<br \/>\n&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<\/p>\n<p>#umount \/mnt\/lvm0<\/p>\n<p>#e2fsck -f \/dev\/vg0\/lvm0   (forcefully check the file system type)<\/p>\n<p>#resize2fs \/dev\/vg0\/lvm0 200M<\/p>\n<p>#lvreduce -L 200M \/dev\/vg0\/lvm0<\/p>\n<p>#lvdisplay \/dev\/vg0\/lvm0<\/p>\n<p>#mount \/dev\/vg0\/lvm0 \/mnt\/lvm0<\/p>\n<p>#df -h<br \/>\n&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<\/p>\n<p>To Extend Existing VG<br \/>\n&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br \/>\n1> create a partion<\/p>\n<p>#partprobe -s<\/p>\n<p>#pvcreate \/dev\/sda?<\/p>\n<p>#vgextend vg0 \/dev\/sda?<\/p>\n<p>#vgdispaly<\/p>\n","protected":false},"excerpt":{"rendered":"<p>LVM(LOGICAL VOLUME MANAGER) LVM(LOGICAL VOLUME MANAGER) &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<\/p>\n<p>1>first create partion<\/p>\n<p>#partprobe -s<\/p>\n<p>#pvcreate \/dev\/sda?<\/p>\n<p>#pvcreate \/dev\/sda?<\/p>\n<p>#vgcreate vg0 \/dev\/sda? \/dev\/sda?<\/p>\n<p>#vgdisplay<\/p>\n<p>#pvdisplay<\/p>\n<p>#lvdisplay<\/p>\n<p>#lvcreate -n lvm0 -L 150M vg0 (where -n&#8212;->name, -L&#8212;>length)<\/p>\n<p>#lvdisplay<\/p>\n<p>#mkfs.ext3 \/dev\/vg0\/lvm0<\/p>\n<p>#mkdir \/mnt\/lvm1<\/p>\n<p>#mount \/dev\/vg0\/lvm0 \/mnt\/lvm0<\/p>\n<p>#vim \/etc\/fstab \/dev\/vg0\/lvm0 \/mnt\/lvm0 ext3 defaults 0 0<\/p>\n<p>#mount -a<\/p>\n<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<\/p>\n<p>Steps To Extend The [&#8230;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[],"_links":{"self":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/7086"}],"collection":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=7086"}],"version-history":[{"count":1,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/7086\/revisions"}],"predecessor-version":[{"id":7087,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/7086\/revisions\/7087"}],"wp:attachment":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=7086"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=7086"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=7086"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}