1/8/2024 0 Comments Linux volume manager![]() ![]() The command above does not actually increase the physical size of volume, to do that you need resize2fs /dev/mynew_vg/vol01 To increase the size of a logical volume by another 800 MB you can run this lvextend -L +800 /dev/mynew_vg/vol01 The biggest advantage of logical volume manager is that you can extend your logical volumes any time you are running out of the space. dev/mynew_vg/vol01 /home/foobar ext3 defaults 0 2īefore you mount do not forget to create a mount mkdir /home/foobar The -m option specifies the percentage reserved for the super-user, set this to 0 if you wish not to waste any space, the default is 5%.Īdd an entry for your newly created logical volume into /etc/fstab All you need to do is to create a mkfs.ext3 -m 0 /dev/mynew_vg/vol01 The logical volume is almost ready to use. In this case you have created a logical volume with a size of 1GB and the name of lvcreate -L 1000 -n vol02 mynew_vg * create a logical volume of size 4 GB -L lvcreate -L 400 -n vol01 mynew_vg * create a logical volume of size 400 MB -L 400 To create a logical volume, named “vol01”, with a size of 400 MB from the virtual group “mynew_vg” use the following command: To include both partitions at once you can use this vgcreate mynew_vg /dev/sdb1 /dev/sdb2įeel free to add new physical volumes to a virtual group by using the vgextend vgextend mynew_vg /dev/sdb2įrom your big cake (virtual group) you can cut pieces (logical volumes) which will be treated as a partitions for your linux system. To create a virtual group with the name “mynew_vg” which will include /dev/sdb1 partition, you can issue the following vgcreate mynew_vg /dev/sdb1 The pvdisplay command displays all physical volumes on your pvdisplayĪlternatively the following command should be pvdisplay /dev/sdb1Īt this stage you need to create a virtual group which will serve as a container for your physical volumes. Use the pvcreate command to create physical pvcreate pvcreate /dev/sdb2 It is possible to run pvcreate command on /dev/sdb, but I prefer to use partitions and from partitions I later create physical fdisk /dev/sda To do this you need partitions or a whole disk. First you need to create physical volumes. For this Linux lvm example you need an unpartitioned hard disk /dev/sdb.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |