Create and configure file systems Flashcards Preview

RHCSAv8.2 > Create and configure file systems > Flashcards

Flashcards in Create and configure file systems Deck (25)
Loading flashcards...
1

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

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

2

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

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

3

Mount and unmount an NFS share on serverb called cards.

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

4

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

vgdisplay vg01 (Verify VG has available space)
lvextend -r -L +300M /dev/vg01/lv01

5

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

chmod g+s data

6

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

chmod 2770 data

7

How do you enable VDO (Virtual Disk Optimizer)?

Install the vdo and kmod-kvdo packages
yum install vdo kmod-kvdo

8

Create a 50GB VDO volume.

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

9

Display the status of all VDO volumes.

vdo status

10

Display the status of VDO volume named vdo1.

vdo status --name=vdo1

11

Display a list of VDO volumes that are currently started.

vdo list

12

How do you stop and start a VDO volume?

vdo stop --name=vdo1
vdo start --name =vdo1

13

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

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

14

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

vdostats --human-readable

15

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

yum install stratis-cli stratisd
systemctl enable --now stratisd

16

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

stratis pool create pool1 /dev/vdb

17

Add block device /dev/vdc to Stratis pool1

stratis pool add-data pool1 /dev/vdc

18

List available pools

stratis pool list

19

View block devices of pool1

stratis blockdev list pool1

20

Create a file system from pool1

stratis filesystem create pool1 fs1

21

View the list of available file systems

stratis filesystem list

22

Create a snapshot of fs1 of pool1

stratis filesystem snapshot pool1 fs1 snapshot1

23

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

lsblk --output=UUID /stratis/pool1/fs1

24

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.

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

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

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