Logical Volume Management Flashcards

1
Q

Steps in Creating a logical volume

A
  1. create lvm partitions
  2. create PVs
  3. create VG
  4. create LV
  5. Format LV
  6. mount the volume
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
1
Q

Create physical volume

A
pvcreate /dev/vdb1 /dev/vdb2
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
1
Q

Create volume group

A

vgcreate vg01 /dev/vdb1 /dev/vdb2

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

Create logical volume

A
lvcreate -n lv01 -L 300M vg01
lvcreate -n lv01 -l 32 vg01
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Show details of PV

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

Show details of LV

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

Show details of VG

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

Add a new PV to VG

A
vgextend vg01 /dev/vdb3
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

extend the LV

A
lvextend -L +500M /dev/vg01/lv01
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Extend an XFS FS to the LV size

A
xfs_growfs /mnt/data/
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Extend an EXT4 FS to the LV size

A
resize2fs /dev/vg01/lv01
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Extend the size of a LV

A
  1. Create partition
  2. Create PV
  3. Add PV to VG
  4. Extend LV
  5. Resize FS
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Extend Swap Space Logical Volumes

A
swapoff -v /dev/vg01/swap
lvextend -L +300M /dev/vg01/swap
mkswap /dev/vg01/swap
swapon /dev/vg01/swap
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Reduce Volume Group Storage

A
pvmove /dev/vdb3
vgreduce vg01 /dev/vdb3
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

FS that support shrinking

A

ext3 ext4

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

FS that do not support shriking

A

GFS2 and XFS

15
Q

Remove PV that is no longer required

A
lvremove /dev/vg01/lv01
16
Q

Remove VG that is no longer needed

A
vgremove vg01
17
Q

Remove PV that is no longer needed

A
pvremove /dev/vdb1 /dev/vdb2
18
Q

Prepare FS for removal of volumes

A
  1. Move and Backup data
  2. Umount FS
  3. Remove any entry from /etc/fstab