Local File System and Swap Flashcards

1
Q

show mounted xfs file systems

A

mount -t xfs

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

Determine the UUID of a drive

A

sudo xfs_admin -u /dev/sda1
sudo blkid /dev/sda1
sudo lsblk -f /dev/sda1

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

label an XFS file system

A

sudo xfs_admin -L bootfs /dev/sda1

label is now bootfs

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

see free disk space of file system

A

df

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

From the beginning, make an ext4 and xfs files system

A

sudo parted /dev/sdb mklabel msdos
sudo parted /dev/sdb mkpart primary 1 101m
sudo parted /dev/sdb mkpart primary 102 201m
sudo mkfs -t ext4 /dev/sdb1
sudo mkfs.xfs /dev/sdb2 -f (-f remove any old partiioning or labeling info)
sudo lsblk -f /dev/sdb (finds UUID)
/etc/fstab entry:
UUID=”lkjl3254534lk” /ext4fs1 ext4 defaults 0 0
UUID=”lkjl3254534lk” /xfs4fs1 xfs defaults 0 0
mkdir /ext4fs1 /xfs4fs1
sudo mount -a
df -hT

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

create and mount xfs file system in VDO volume

A

sudo vdo create –device /dev/sdf –name vdo1 –vdoSlabSize 128 –vdoLogicalSize 16G
sudo vdo list
sudo mkfs.xfs /dev/mapper/vdo1
/etc/fstab entry:
/dev/mapper/vdo1 /xfsvdo1 xfs x-systemd.requires=vdo.service 0 0
sudo mkdir /xfsvdo1
sudo mount -a
lsblk /dev/sdf

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

create and mount ext4 and xfs file system in LVM Logical Volumes

A

sudo parted /dev/sdd mkpart pri 1 181m
sudo pvcreate /dev/sdd1
sudo vgcreate -s 16 vgfs /dev/sdd1
sudo lvcreate -n ext4vol -L 80 vgfs
sudo lvcreate -n xfsvol -l 80 vgfs
sudo mkfs.ext4 /dev/vgfs/ext4vol
sudo mkfs.xfs /dev/vgfs/xfsvol
ftab entry:
/dev/vgfs/ext4vol /ext4fs2 ext4 defaults 0 0
/dev/vgfs/xfsvol /xfsfs2 xfs defaults 0 0
mkdir /ext4fs2 /xfsfs2
sudo mount - a

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

Resize Ext4 and XFS file system in LVM Logical Volumes

A

sudo pvcreate /dev/sde
sudo vgextend vgfs /dev/sde
sudo vgs
sudo vgdisplay vgfs
sudo lvextend -L +40 /dev/vgfs/ext4vol
sudo fsadm resize /dev/vgfs/ext4vol (The resize subcommand instructs the fsadm command to grow the file system
to the full length of the specified logical volume)

sudo lvresize -r -L +40 /dev/vgfs/xfsvol
### -r = resizefs

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

Stratis Volume
Create, Mount, and Expand XFS

A

sudo stratis pool create strpool /dev/sdg
sudo stratis blockdev list strpool
sudo stratis filesystem create strpool strfs2
sudo stratis filesystem list
sudo lsblk /stratis/strpool/strfs2 -o UUID (finds UUID)
fstab entry:
UUID=”A;LSDKFJ3984” /strfs2 xfs x-systemd.requires=stratisd.service 0 0

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

refresh the free command every 3 seconds

A

free -hts 3

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

where is RAM info stored

A

/proc/meminfo

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

create and activate swap in partition and logical volume

A

sudo parted /dev/sdb mkpart primary 202 242 ##makes a 40MB partition
sudo lvcreate -L144 -n swapvol vgfs ##creates logical volume called swapvol
sudo mkswap /dev/sdb3 ## designates as swap
sudo mkswap /dev/vgfs/swapvol ##designates a swap
##edti fstab
UUID=”lj433” swap swap. pri=1 0 0
/dev/vgfs/swapvol swap swap pri=2 0 0
sudo swapon -a ##activates new swap area

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

determine amount of swap space on the system

A

sudo swapon

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

where is swap information stored

A

/proc/swaps

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