Foreword
The aim of this guide is to provide the quickest path possible towards passing the LFCS exam. The way you are evaluated in this exam is based on practical exercises, so that’s where I put the focus on with these guides.
If you are a newcomer to Linux, I beg you to not stop here, Operating Systems is an amazing subject. Its history is full of bright engineers who came up with clever solutions that you use on your day to day life. Take a full dive on other articles about the concepts these commands use here.
Learning objectives
Learning Goal | Command |
---|---|
Manage physical storage partitions | fdisk |
Manage and configure LVM storage | `{vg |
Create and configure encrypted storage | `cryptsetup [luksFormat |
Configure and manage swap space | mkswap `swap [on |
Create and manage RAID devices | mdadm `mdadm [–scan |
Create and configure FS | `makefs.{xfs |
Configure filesystems to be mounted on boot | /etc/fstab |
Mount filesystems on demand | mount |
Setup user/group disk quotas for FS | quotacheck edquota repquota |
Create and manage advanced FS permissions | getfacl setfacl |
Review Questions
- Create a SWAP partition that is mount on boot
- Same but using a SWAP file instead
- Modify Swappiness value of the system
- Create a software RAID-6 from two partitions
- Once the RAID is create save its config
- Destroy the created RAID
- Re-create it from the config of step 4.1
- Add a new spare device to the RAID
- Expand the RAID with the new device
- Remove the device from the RAID
- Create two 200 MB partitions of type raid (fd) either on your hard disk using fdisk, or using LVM.
- Create a RAID 1 device named /dev/md0 using the two partitions.
- Format the RAID device as an ext4 filesystem. Then mount it at /myraid and make the mount persistent.
- Place the information about /dev/md0 in /etc/mdadm.conf , using mdadm
- Examine /proc/mdstat to see the status of your RAID device
- Setup an encrypted partition
- Create a FS in that partition
- COnfigure the encrypted partition to be mounted on boot
- Add a quota to a specific FS for a specific user
- Make that quota persistant across reboots
- Create new ACL that allows only the user bob to read and write a file
- Make that ACL the default option
- Remove the default entry
- Remove all the entries
- Get the ACL of the file
- Create LVM LV from a VG consisnting on two PVs.
- Expand the LV by adding a new disk.
- Reduce the LV by removing the previously added disk
TODO
- Make list prettier
- Make each item of the list a link to a different post
- Link to conceptual articles