RHCSA Ch9 Flashcards

1
Q

create a partition with gdisk

A

sudo gdisk /dev/vdb
Command (? for help): n =for new partition
partition number
first sector
last sector = +500M
Command (? for help): p = to print
Command (? for help): w = write
cat /proc/partitions

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

where is partition info stored

A

/proc/partitions

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

create a physical volume

A

sudo pvcreate /dev/vdb1

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

list physical volumes

A

sudo pvs
sudo pvdisplay

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

create a volume group

A

sudo vgcreate vgdata /dev/vdb1

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

show virtual groups

A

sudo vgs
sudo vgdisplay

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

create logical volume

A

sudo lvcreate –name lvdata –size 495 vgdata
vgdata is the volume group

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

show logical volume

A

sudo lvs
sudo lvdisplay

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

where are logical volumes stored

A

/dev/VolumeGroupName/LogicalVolumeName
Example = /dev/vgdata/lvdata

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

linux formatting tools

A

mkfs
mke2fs

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

format a logical volume to xfs

A

sudo mkfs -t xfs /dev/vgdata/lvdata

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

show format type of all drives

A

sudo blkid

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

mount drive

A

mount source destination
mount /dev/vgdata/lvdata /media/lvdata

to make persistant, edit fstab
vim /etc/fstab
/dev/vgdata/lvdata /media/lvdata xfs defaults 1 2
UUID=13546464984565198 media/lvdata etc….. = this way is better bc /dev/sdb or sdc can change on boot

to test this, unmount the run
mount -a
this will mount all in the /etc/fstab

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

get the UUID of a partition

A

sudo blkid

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

give a partition a label

A

sudo e2label /dev/vdb3 backups
can use label in /etc/fstab
LABEL=backups /media/vdb3 etc…..

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

extend a logical group

A

sudo vgextend vgdata /dev/vdc1

vgdata = the volume group
/dev/vdc1 is a new partition or separate partition

17
Q

after adding a drive to a volume group,
extend logical volume to fill the whole drive

A

sudo lvresize -l 100%FREE /dev/vgdata/lvdata

18
Q

newly extended logical volume needs still needs to be formatted, how?

A

sudo xfs_growfs /dev/vgdata/lvdata

19
Q

mount a network drive

A

mount -t nfs 192.168.0.2:/share /mnt/folderToMount

Edit /etc/fstab to make persistant
192.168.0.2:/share /mnt/folderToMount nfs _netdev 0 0