how to create VG by PE size & how to create LV with specified number of LEs in LVM? |linux | RHEL

Опубликовано: 07 Июль 2020
на канале: Red hat Linux Training for beginners
834
13

Creating a VG by specifying the PE size
 To create a VG with specifying an PE size,
 First create a partition and also create a pvcreate
To create a vg with custom PE size use
#vgcreate name for the vg -s size of PE( 1-128) pv names
#vgcreate myvg2 -s 16 /dev/sda5
Verify the PE size using vgdisplay command

Creating an LV of 400MB, specifying no. of LE instead of giving size in MB or GB.
 To create an LV using LE, the things to keep in mind are
 Size of LE=Size of PE ( For example if the size of PE is 16, then the size of LE will also be 16.)
In Command we are specifying the no. of LE not the size of LE, as the size of LE is based on Size of PE.
 Steps to create an LV based on LE
 Check the size of PE using vgdisplay command
The syntax to create an LV with no. of LE is
#lvcreate -l no. of LE -n name for the LV volume group name
#lvcreate -l 25 -n lv2 vg2
Deleting a Volume Group
 To delete the volume a group, make sure that if there is any LV in it, it should not be mounted. Because while removing a vg it will also remove LV’s inside it. In our case we have
no LV in our volume group, so we will not be concerned about it.
 To delete a VG, use the following command.
#vgremove vgname

Deleting/Removing an LV:
 To Delete/Remove an LV, first unmount the file system.
 Remove the entry from /etc/fstab.
 Use the command lvremove i.e.
#lvremove LV name
#lvremove mylv ( it will prompt to you to continue, press y to continue)
 Verify it by using lvdisplay command


Смотрите видео how to create VG by PE size & how to create LV with specified number of LEs in LVM? |linux | RHEL онлайн, длительностью часов минут секунд в хорошем качестве, которое загружено на канал Red hat Linux Training for beginners 07 Июль 2020. Делитесь ссылкой на видео в социальных сетях, чтобы ваши подписчики и друзья так же посмотрели это видео. Данный видеоклип посмотрели 834 раз и оно понравилось 13 посетителям.