4-2 Extend Existing Logical Volumes Flashcards

1
Q

after making partition

[root@localhost]# pvcreate /dev/newdisk
[root@localhost]# vgextend vg-name /dev/newdisk
[root@localhost]# vgdisplay

A

Extend a volume group with a new disk

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q
[root@localhost]# lvextend -L 5G /dev/vg-name/lvmname
lvdisplay
df -h
xfs_growfs /mnt/newdirxfs 
df -h
A

Extend the LVM to be exactly 5G in size

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

lvextend -L +5G /dev/vg-name/lvmname

Use the -l (lowercase L) option instead to use physical extents as the unit of measurements, use plus sign before number to add it or without to set it as total extents

lvdisplay
df -h

xfs_growfs /mnt/newdirxfs 
Or
resize2fs /mnt/newdirext
Or
resize2fs /mnt/newdirext4 

df -h

A

Extend the LVM and add an additional 5G

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

after adding another disk to same vg thats equal in size for data to fit, so the data on there has space to move to.

pvmove /dev/olddisk

vgreduce vg-name /dev/olddisk

vgdisplay
‘VG Size’ should be that much smaller

A

Move physical extents off of device to a different device in same volume group

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

lvextend -l +50%FREE /dev/vg-name/lvmname
lvdisplay

df -h

xfs_growfs /mnt/newdirxfs 
Or
resize2fs /mnt/newdirext
Or
resize2fs /mnt/newdirext4 

df -h

A

Increase by 50% of free space of volume

How well did you know this?
1
Not at all
2
3
4
5
Perfectly