Various commands for the LFCS Storage Management domain, which at the time of this post can be found at https://training.linuxfoundation.org/images/pdfs/LFCS_Domains_Competencies_V2.16.pdf
mdadm
manage MD devices aka Linux Software RAID
lsblk
list block devices
1 2 3 4 5 6 7 8 9 10 |
|
- output filesystem info
1 2 3 4 5 6 7 8 9 10 11 12 |
|
fdisk
manipulate disk partition table
- list partition tables
1 2 3 4 5 6 7 8 9 10 11 12 |
|
- fdisk menu
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
|
gdisk
Interactive GUID partition table (GPT) manipulator
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
|
parted
a partition manipulation program
- list all partitions
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
|
mkfs
build a Linux filesystem
-t # filesystem type
types of filesystems
1 2 3 |
|
tune2fs
adjust tunable filesystem parameters on ext2/ext3/ext4 filesystems
- set label
1
|
|
e2label
Change the label on an ext2/ext3/ext4 filesystem
dumpe2fs
dump ext2/ext3/ext4 filesystem information
xfs_db
debug an XFS filesystem
mount
mount a filesystem
mount -t type device dir
- -a # mount all filesystems
- -r # mount read-only
-o # mount options
list all mounted filesystems
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
|
umount
unmount file systems
blkid
locate/print block device attributes
1 2 3 4 5 |
|
xfs_info
expand an XFS filesystem
1 2 3 4 5 6 7 8 9 10 |
|
mkswap
set up a Linux swap area
swapon, swapoff
enable/disable devices and files for paging and swapping
- display swap usage
1 2 3 |
|
pvscan
scan all disks for physical volumes
1 2 3 |
|
vgscan
scan all disks for volume groups and rebuild caches
1 2 3 |
|
lvscan
scan (all disks) for Logical Volumes
1 2 3 |
|
pvcreate
initialize a disk or partition for use by LVM
vgcreate
create a volume group
vgs
report information about volume groups
1 2 3 |
|
lvcreate
create a logical volume in an existing volume group
vgextend
add physical volumes to a volume group
lvextend
extend the size of a logical volume
lvremove
remove a logical volume
pvmove
move physical extents
vgreduce
reduce a volume group
pvremove
remove a physical volume
getfacl
get file access control lists
1 2 3 4 5 6 7 |
|
setfacl
set file access control lists
- give user dave read and write rights on a file
1
|
|
- set default ACL recursively on a directory for a group and give read and directory traversal permissions (but no execute for files)
1
|
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
|