I got LPIC-level1 last week, so I will continue to take level2. Therefore, the main points of the test range are summarized below.

1. Capacity planning

Resource utilization

Resource monitoring tool (I can't remember)

Regarding other resource management

--Bottleneck by focusing on IO on a specific partition-> Try changing to faster storage --Rebuild kernel / adjust kernel parameters --swapon -s-> Check swap (/ proc / swaps)

2. Linux kernel


--4.9-rc1-> rc is Release Candidate (development version) --How to check the version ① ʻuname -r` ② / proc / version file ③ View Makefile

Kernel image

Kernel module

--Some functions are separated from the kernel and modularized (.ko)-> The kernel becomes compact and saves boot time and memory.

Kernel compilation

--Source code-> / usr / src --How to upgrade-> ① cp / boot / congig ... x86-64 .config (copy the previous configuration file to .config) -> ②make oldconfig --Kernel configuration-> make menuconfig --Compile-> make --Kernel module and kernel installation-> make modules_install-> make install --Since the image is created in / boot, use the default kernel. --DKMS-> Dynamic Kernel Module Support (automatically builds a third party kernel module)

Kernel parameters (/ proc / sys /)

--sysctl [-w] net.ipv4.ip_forward = 1 (disappears on reboot) / Write to /etc/sysctl.conf (persistent)

Initial ramdisk

--initrd / initramfs (cpio archive + compression) --Create initial ramdisk-> mkinitrd / mkinitramfs --Initramfs can be created under / boot with the latest CentOS-> dracut command

Kernel management and problem solving

3. System boot

Startup process

SysVinit --init reads / etc / inittab ---> /etc/rc[0-6].d/S85httpd etc. ---> Start login process and end

systemd --Unit (service / device / mount / swap / target) = processing unit --First, /etc/systemd/system/ Unit is processed ---> It is a symbolic link to /lib/systemd/system/ --Check running services-> systemctl list-units --type = ○○ --/etc/systemd/system/ configuration files (postfix.service, etc.)

Boot loader



Startup options ([e] key at startup)

--Specify root file system-> linux /boot/vimlinuz-.4.4.0 ro root = / dec / sda1 --Check boot options-> / proc / cmdline

System recovery

--Start in rescue mode from the installation CD / DVD-ROM --You have to specify the root directory such as rpm command-> Change the root directory with chroot --Modify GRUB configuration file-> grub (2) -mkconfig

Other boot loader

4. File system





Btrfs --Checking btrfs usage-> btrfs filesystem df / mnt --Snapshot with btrfs-> btrfs subvolume snapshot A B


Encrypting file system


--Repair from superblock backup-> ʻe2fsck -b 8193 / dev / sda2`

5. Advanced storage management




--Partition preparation (parted)-> Physical volume creation (pvcreate)-> Volume group creation (vgcreate)-> Logical volume creation (lvcreate)-> File system creation (mkfs)-> Mount (mount)

Management (reduce / remove attention)

Hard disk management

SSD --Record in flash memory instead of magnetic disk --When deleting, just flag the data instead of actually erasing it-> Performance degradation-> fstrim -v /


6. Network

7. System maintenance

Install software from source


--Local backup

--Remote backup

Notification to user

Extra .virtualbox


--Set the setting to NAT-> Bridge --ifup interface name --Try to ping

Recommended Posts