2110512023, 16:51 How to ereate LVM volume group and logical volume ~ CoP PSU IT Blog
How to create LVM volume group and logical volume
by Krlangirai Noothongkam + March 27, 2020+ Comments Off
Post Views: 1,299
LVM stands for Logical Volume Manager. The ability of LVM is to create logical partitions spanning muttiple hard
drives. The following steps are done on CentOS or Oracle Linux or Redhat Enterprise Linux. Debian side can
also be used. The same command works the same. but may need to install additional programs
The maximum size that LVM can do depends on the type of CPU and kemel used.
+ For Kemel 2.4 on 32-Bit CPUs, the maximum size is 2TB.
+ For Kernel 2.6 on 32-Bit CPUs, the maximum size is 16TB.
+ For Kernel 2.6 on 64-Bit CPUs, the size limit is 8EB.
+ Current Kemel Model ? CPU 64-Bit No answer yet.
ns no larger than 1EB.
But when formatted to exté file system, it can only create parti
It depends on the fle system used
+ can start
+ Log in with a user account that has root privileges, either as root itself or as a user in the wheel group.
afosu-
mrusiantariqunas root
or
1 sudo -i
onucuntanrunasdtadsuneaod
to be able to make further orders
+ Check which hard drives are in use with the command
a | ath
+ Approximate results are obtained as shown in Fig
npe:'syeadmin.peu.acth'2020103127ihow-o-create-wm-volume-group-ane-ogical-ylumal
wr2110512023, 16:51 How to ereate LVM volume group and logical volume ~ CoP PSU IT Blog
+ Inthe image above, /devisda is already in use, /dev/sda‘ and /devisda2. Check if there are other child
disks with the command
| fdisk -lgrep /dev
fdisk
+ You can see that /devisdb, Jdev/sde, and /devisdd are empty.
+ will use /devisdb
+ Start by creating a space for doing LVM first with the command
I fdisk /dev/sdb
Press n, then p, then 1, then enter twice.
Press t then type 8e and press w as shown in the picture
hips eysacmin, pu,c.h/2020/08/27 haw-lo-create-hm-volume-group-anclogcal-volumel a2119512028, 16:51 How to ereate LVM volume group and logical volume ~ CoP PSU IT Blog
fdisk
+ Create an LVM physical volume using the pvereate command
| pvereate /dev/sdb1
+ Create an LVM volume group named vg_u0t
| vecreate vg_uet /dev/sdba
+ Create an LVM log
contained in vg_u01
volume group named Iv_u01 in a volume group named vg_u01 with all sizes,
| Avereate =n Iv_uen =1 100%FREE ve_uoa
as pictured
hitps sysadmin. psu. ac.tv202003122110512023, 16:51 How to ereate LVM volume group and logical volume ~ CoP PSU IT Blog
pvcreate, vgcreate, lvcreate
+ View the status that LVM has been created with the command
| pvscan
pvscan
+ Check the status of how much Physical Volume you have with the command
| pvdisplay
hips eysacmin, pu,c.h/2020/08/27 haw-lo-create-hm-volume-group-anclogcal-volumel
an2110512023, 16:51 How to ereate LVM volume group and logical volume ~ CoP PSU IT Blog
pydisplay
+ Before using it, don't forget to format it. The device that needs to be formatted will become
idevivg_u0‘/lv_u01 and be named u01
| mkfs.exta -L vel /dev/vg_u91/1v_ue1
hips eysacmin, pu,c.h/2020/08/27 haw-lo-create-hm-volume-group-anclogcal-volumel 87How to ereate LVM volume group and logical volume ~ CoP PSU IT Blog
2110512023, 16:51
mkis.ext4
+ Create a mount point for l_u01
| mkdir for
+ mount Iv_u01 to /u01
| mount LABEL=ue1 /ue2
+ Verify that /u01 has been executed, use -h to specify size in GMK.
hips eysacmin, pu,c.h/2020/08/27 haw-lo-create-hm-volume-group-anclogcal-volumel ar211052023, 16:51 How to ereate LVM volume group and logical volume ~ CoP PSU IT Blog
mkdir, mount, df
+ Instruct it to mount automatically every boot time by adding the following to the /etc/fstab file:
LABEL=u01 /uel — ext4 defaults @ @
fstab
+ Have fun in the end
hips eysacmin, pu,c.h/2020/08/27 haw-lo-create-hm-volume-group-anclogcal-volumel wW