Manage Basic Storage Flashcards

1
Q

What commands can be used to for disk partition?

A

df
fdisk (-l option lists partitions)

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

What are the steps to add a disk to a VM? (Include all options under fdisk)
Bonus: What command can you use to unmount?

A

Add disk to VM (If space is not already available)
fdisk -l - To view the disk you want to edit
fdisk /dev/sdb (name of disk added)
n - for new partition
p - for primary (or just hit enter for default)
1 - for partition number (or just hit enter)
2048 - for first sector (or just hit enter)
default or +size{K,M,G} (most likely default)
w - writing table to disk
mkfs.xfs /dev/sdb1 - assigns file system type
mkdir /anything - (can be anywhere)
mount /dev/sdb1 /anything - mount partition to fs
vim /etc/fstab - mounts on boot
/dev/sdb1 /anything xfs defaults 0 0
(tab between all values)
Bonus: To Unmount
umount /anything

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