Great, above output confirms that LVM partition is mounted on /data directory. Verify the mount using following df command $ sudo df -Th /dataįilesystem Type Size Used Avail Use% Mounted on To access this file system, create a mount point using mkdir command and mount it. $ sudo mkfs.ext4 $ sudo mkfs.ext4 /dev/vg01/lv01Ībove output shows that lvm has been formatted with ext4 filesystem successfully. In this demonstration, I am formatting the lvm partition with ‘ ext4’ file system. To format LVM partition, we can use mkfs command. So, to start using this lvm partition, first we must format it. Perfect, above output shows that lv has been created successfully. Verify the logical volume status by running following commands, Rounding up size to full physical extent 9.99 GiB In our case, I would be creating a lv of size 10 GB with name ‘lv01’. To create a logical volume (lv) from volume group (vg), use following command Step 3) Create Logical volume (LV) from Volume Group (VG) Verify the volume group status using following commands, $ sudo vgscanĪbove output confirm that volume group vg01 has been created successfully and size of each physical extent is 4 MB (this is the default size). So, in our case, command would be $ sudo vgcreate vg01 /dev/sdb Run beneath command to create volume group, $ sudo pvscanĬreating volume group (vg) means adding physical volume (pv) to vg. Verify the PV status using following commands. Note: In case pvcreate command is not available in Ubuntu system then install lvm2 package using following apt command. Physical volume "/dev/sdb" successfully created. $ sudo pvcreate … $ sudo pvcreate /dev/sdb So, let’s create physical volume (pv) using following command. As we can clearly see that we have a disk of 10 GB (/dev/sdb) which have no partition and available as raw disk.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |