Advanced Storage part Flashcards

1
Q

list availabe physical volumes

A

sudo pvs
-v for detailed output

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

list availabel Volume Groups

A

sudo vgs

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

explaing Physical Extent and how to see its current setting

A

An exten is the smallest allocatable unit of space in LVM. Default is 4 MB. In a 20GB physical volume, there would be 5,000 PE’s

sudo vgdisplay rhel | grep ‘PE Size’

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

list availabel logical volumes

A

sudo lvs

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

What is a Logical Extent

A

a set of physical extents allocated to the logical volume

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

create a physical volume and volume group

A
  1. Make partition - see previous chapter
  2. Set the flag on the partition to lvm - not required
    sudo parted /dev/sdd set 1 lvm on
  3. verify with print
  4. create PV with sdd1 and sde
    sudo pvcreate /dev/sdd1 /dev/sde
  5. Create Volume Group (-s = PE size)
    sudo vgcreate -vs 16 vgbook /dev/sdd1 /dev/sde
  6. Verify
    sudo vgs vgbook
    sudo vgdisplay -v vgbook
    sudo pvs
    sudo pvdisplay /dev/sdd1
    “ “ /dev/sde
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

create logical volume

A
  1. create LV with default name, -L to specify volume size in MB (can specify GB or TB if needed)
    sudo lvcreate -vL 120 vgbook
    - with a different name and custome logical extent
    sudo lvcreate -l 12 -n lvbook1 vgbook
    2 verify
    sudo lvs
    sudo vgdisplay -v vgbook
    sudo lvdisplay /dev/vgbook/lvol0
    sudo lvdisplay /dev/vgbook/lvbook1
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

extend VG

A

sudo vgextend vgbook /dev/sdd2
sudo vgs

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

extend LV

A

sudo lvextend -L +144 /dev/vgbook/lvbook1
sudo vgdislplay -v vgbook

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

rename lvol0 to lvbook2

A

sudo lvrename vgbook lvol0 lvbook2

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

reduce size of LV lvbook2

A

sudo lvreduce -L 50 /dev/vgbook/lvbook2

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

add storage to LV

A

sudo lvresize -L +32 /dev/vgbook/lvbook2
(32MB)

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

remove LV

A

sudo lvremove /dev/vgbook/lvbook1 -f
***desrtuctive, back up all data!!!

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

reduce size of VG
then remove VG

A

sudo vgreduce vgbook /dev/sd1 /dev/sde
removes sdd1 and sde

sudo vgremove vgbook

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

uninitialize PV

A

sudo pvremove /dev/sdd1 /dev/sdd2 /dev/sde

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

create stratis pool

A

install stratis and enable with systemctl

sudo stratis pool create bookpool /dev/sdg

verify
sudo stratis pool list

17
Q

list the block device that is used to form the stratis pool

A

sudo stratis bolckdev list bookpool

18
Q

create stratis file system call bookfs in the bookpool

A

sudo stratis filesystem create bookpool bookfs

verify
sudo stratis filesystem list

19
Q

create directoty call /bookfs1 and mount new file system

A

sudo mkdir /bookfs1
sudo mount /stratis/bookpool/bookfs /bookfs1

20
Q

check stratis pool usage

A

sudo stratis pool list

21
Q

expand stratis bookpool

A

sudo stratis pool add-data bookpool /dev/dsh

22
Q

rename stratis pool

A

sudo stratis pool rename bookpool rhcsapool

23
Q

destroy stratis file system and pool

A

sudo umount /bookfs1
sudo stratis filesystem destroy rhcsapoool rhcsafs