Create and configure file systems Flashcards

1
Q

Create an XFS file system on logical volume /dev/vg01/lv01 and configure a persistently mount to /data. Mount and then unmount to test.

A
mkfs -t xfs /dev/vg01/lv01
mkdir /data
vim /etc/fstab (for persistent mount)
Add line - /dev/vg01/lv01 /data xfs defaults 1 2
mount /data
unmount /data
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Create an EXT4 file system on logical volume /dev/vg01/lv01 and configure a persistently mount to /data. Mount and then unmount to test.

A
mkfs -t ext4 /dev/vg01/lv01
mkdir /data
vim /etc/fstab (for persistent mount)
Add line - /dev/vg01/lv01 /data ext4 defaults 1 2
mount /data
unmount /data
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Mount and unmount an NFS share on serverb called cards.

A

mkdir -p /data (mountpoint)
mount -t nfs -o rw,sync serverb:/cards /data
vim /etc/fstab (for persistent mount)
Add line - serverb:/cards /data nfs rw,soft 0 0
umount /data

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

Increase an logical volume /dev/vg01/lv01 by 300 MB.

A
vgdisplay vg01 (Verify VG has available space)
lvextend -r -L +300M /dev/vg01/lv01
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

How do you add a setgid bit to a directory called data?

A

chmod g+s data

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

Set the setgid bit and add read/write/execute permissions for user and group, with no access
for others, on data

A

chmod 2770 data

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

How do you enable VDO (Virtual Disk Optimizer)?

A

Install the vdo and kmod-kvdo packages

yum install vdo kmod-kvdo

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

Create a 50GB VDO volume.

A

vdo create –name=vdo1 –device=/dev/vdd –vdoLogicalSize=50G

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

Display the status of all VDO volumes.

A

vdo status

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

Display the status of VDO volume named vdo1.

A

vdo status –name=vdo1

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

Display a list of VDO volumes that are currently started.

A

vdo list

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

How do you stop and start a VDO volume?

A

vdo stop –name=vdo1

vdo start –name =vdo1

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

Format VDO volume vdo1 with XFS filesystem, mount it to /mnt/vdo1 and verify it mounted.

A

mkfs.xfs -K /dev/mapper/vdo1
mkdir /mnt/vdo1
mount /dev/mapper/vdo1 /mnt/vdo1
mount

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

What command do you use to view the initial statistics and status of the VDO volume?

A

vdostats –human-readable

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

To use Stratis, what packages must be installed and what service needs to be running?

A

yum install stratis-cli stratisd

systemctl enable –now stratisd

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

Create a Stratis pool called pool1 on block device /dev/vdb

A

stratis pool create pool1 /dev/vdb

17
Q

Add block device /dev/vdc to Stratis pool1

A

stratis pool add-data pool1 /dev/vdc

18
Q

List available pools

A

stratis pool list

19
Q

View block devices of pool1

A

stratis blockdev list pool1

20
Q

Create a file system from pool1

A

stratis filesystem create pool1 fs1

21
Q

View the list of available file systems

A

stratis filesystem list

22
Q

Create a snapshot of fs1 of pool1

A

stratis filesystem snapshot pool1 fs1 snapshot1

23
Q

How do you find the UUID of a stratis file system /stratis/pool1/fs1 to use in /etc/fstab?

A

lsblk –output=UUID /stratis/pool1/fs1

24
Q

When configure /etc/fstab to persistently mount a Stratis file system, what is important to include to ensure the machine will start properly and will abort to emergency.target the next time it is rebooted.

A

vim /etc/fstab
UUID=31b9363b-add8-4b46-a4bf-c199cd478c55 /dir1 xfs defaults,xsystemd.requires=stratisd.service 0 0

Make sure that that the below is included.
x-systemd.requires=stratisd.service

25
Q

how to configure a system to auto mount a NFS share as a users home directory

A

yum install autofs
vim /etc/auto.master.d/NFShome.autofs
/- /etc/auto.NFShome

getent passwd user (this is to see where you need to mount the home dir to make sure its not set to something special)

vim /etc/auto.NFShome
/home/user -rw server.example.com:/dirs/user
systemctl enable –now autofs