Disk Usage df -H
Filesystem Size Used Avail Use% Mounted on /dev/mapper/centos-root 8.4G 76M 8.4G 1% / devtmpfs 4.1G 0 4.1G 0% /dev tmpfs 4.1G 672k 4.1G 1% /dev/shm tmpfs 4.1G 9.5M 4.1G 1% /run tmpfs 4.1G 0 4.1G 0% /sys/fs/cgroup /dev/mapper/centos-usr 13G 4.5G 8.2G 36% /usr /dev/sdb2 521M 124M 397M 24% /boot /dev/sdb1 210M 10M 200M 5% /boot/efi /dev/mapper/centos-tmp 8.4G 101M 8.3G 2% /tmp /dev/mapper/centos-opt 4.2G 222M 4.0G 6% /opt /dev/mapper/centos-var 8.4G 650M 7.8G 8% /var /dev/mapper/centos-usr_local 4.2G 34M 4.2G 1% /usr/local /dev/mapper/centos-home 418G 728M 418G 1% /home /dev/mapper/centos-var_log 8.4G 40M 8.4G 1% /var/log /dev/mapper/centos-var_ftp 17G 34M 17G 1% /var/ftp /dev/mapper/centos-var_tmp 8.4G 221M 8.2G 3% /var/tmp /dev/mapper/centos-var_www 17G 34M 17G 1% /var/www /dev/mapper/centos-var_log_audit 4.2G 41M 4.2G 1% /var/log/audit
Partitions ssm list
------------------------------------------------------------- Device Free Used Total Pool Mount point ------------------------------------------------------------- /dev/sda 465.76 GB PARTITIONED /dev/sda1 0.00 KB 465.76 GB 465.76 GB centos /dev/sdb 29.82 GB /dev/sdb1 200.00 MB /boot/efi /dev/sdb2 500.00 MB /boot /dev/sdb3 0.00 KB 29.13 GB 29.13 GB centos ------------------------------------------------------------- ---------------------------------------------------- Pool Type Devices Free Used Total ---------------------------------------------------- centos lvm 2 0.00 KB 494.89 GB 494.89 GB ---------------------------------------------------- -------------------------------------------------------------------------------------------------- Volume Pool Volume size FS FS size Free Type Mount point -------------------------------------------------------------------------------------------------- /dev/sdb2 500.00 MB xfs 496.67 MB 403.61 MB /boot /dev/sdb1 200.00 MB vfat /boot/efi /dev/centos/home centos 389.42 GB xfs 389.23 GB 389.18 GB linear /home /dev/centos/opt centos 3.91 GB xfs 3.90 GB 3.90 GB linear /opt /dev/centos/root centos 7.81 GB xfs 7.80 GB 7.77 GB linear / /dev/centos/swap centos 11.72 GB linear /dev/centos/tmp centos 7.81 GB xfs 7.80 GB 7.80 GB linear /tmp /dev/centos/usr centos 11.72 GB xfs 11.71 GB 8.46 GB linear /usr /dev/centos/usr_local centos 3.91 GB xfs 3.90 GB 3.90 GB linear /usr/local /dev/centos/var centos 7.81 GB xfs 7.80 GB 7.49 GB linear /var /dev/centos/var_ftp centos 15.62 GB xfs 15.62 GB 15.62 GB linear /var/ftp /dev/centos/var_log centos 7.81 GB xfs 7.80 GB 7.80 GB linear /var/log /dev/centos/var_log_audit centos 3.91 GB xfs 3.90 GB 3.90 GB linear /var/log/audit /dev/centos/var_tmp centos 7.81 GB xfs 7.80 GB 7.80 GB linear /var/tmp /dev/centos/var_www centos 15.62 GB xfs 15.62 GB 15.62 GB linear /var/www ---------------------------------------------------------------------------------------------------
Physical Layout lsblk -f
NAME FSTYPE LABEL UUID MOUNTPOINT sda └─sda1 LVM2_member a334rb-LNkM-dAIj-N6kW-hIx8-Hx2Y-Ezj1Y3 ├─centos-usr xfs 59f1078f-b490-49ad-857e-19e900ca1bb1 /usr ├─centos-root xfs 88a3ed46-8b52-4af0-bc01-08919c56273a / ├─centos-var_log xfs 3e34c5c0-c57d-43e2-b8b9-10fa85a099b2 /var/log ├─centos-var_log_audit xfs db59e840-4895-4d89-8f3a-fa48f3ec6788 /var/log/audit ├─centos-usr_local xfs 604610c6-92b4-4345-8902-2534958c71ff /usr/local ├─centos-var xfs 732fcdf5-58a2-4c39-b609-87ffb9b2d8f6 /var ├─centos-var_www xfs f94144df-5048-4fb7-b138-6ab64c91299e /var/www ├─centos-opt xfs 7f1f28a6-c1ca-4e53-9be6-2021401aa634 /opt ├─centos-var_ftp xfs 38c8ac21-b627-4a75-ba17-5eb1b3cb5486 /var/ftp ├─centos-var_tmp xfs 8acfbc0c-be82-4ef7-822a-170ea6abefac /var/tmp └─centos-home xfs 91854fad-c0e5-49dd-9fd8-fe0788c43659 /home sdb ├─sdb1 vfat 80E2-BDAF /boot/efi ├─sdb2 xfs 59d38d61-952a-4f94-bb78-a0874416cd51 /boot └─sdb3 LVM2_member Y14PAN-0zpI-RyPp-yppy-Wbrp-JNEH-Y3Rip6 ├─centos-swap swap f8ac001a-79de-4774-b893-8de417d3ad09 [SWAP] ├─centos-root xfs 88a3ed46-8b52-4af0-bc01-08919c56273a / ├─centos-tmp xfs 3e2373b7-9a87-46a7-86f0-a9105e85cb78 /tmp └─centos-opt xfs 7f1f28a6-c1ca-4e53-9be6-2021401aa634 /opt
Commentary
This is the partitioning structure used on my Dell 15z Laptop. I also set up servers in a similar manner, though some of them may have six (or more) hard disk drives. Occasionally, I need to be able to access files without access to the Internet. This configuration facilitates the operation of local provision servers. I also find it convenient to serve those files via a local Git repository, web server, and/or ftp server - all running on the laptop.The partitioning structure works well for servers also. There are plenty of web resources discussing the various methodologies as to creating Linux partitions, so I will keep things simple.
- /boot
- Boot from the on-board 32GB SSD and start the Centos LVM in the left over 29 GBs. Why? If the 500GB is removed from the laptop, recovery is going to be extremely difficult.
- /opt
- Google Chrome and other software will install to the opt directory. I prefer to keep these types of installations away from the operating system.
- /tmp
- Typically emptied upon reboot.
- /var/ftp
- Combined with PureFTP for secure FTP for anonymous transfers.
- /var/tmp
- I have read articles which suggest binding
/var/tmp
to/tmp
. In short, they are not the same./var/tmp
does not get emptied upon reboot and Gnome 3 seems to like it without thenoexec
attribute set in fstab. - /var/www
- For the web server. I provide plenty of room to work on projects as well as run a server for clients to interact with.
- /vars/*
- The various
/var
partitions are split off to keep them from filling up the hard drive and shutting down the system due to DDOS or other activity.
Partition size choices are purely a result of two factors: I have no intention of filling up a laptop drive with anything other than temporary data, and experience of what is more than enough for each respective partition.
xfs partitions can be grown, but at this time they can not be shrank. The only way to handle a shrink action is to backup the partition, remove it, and recreate it with the new size.
ssm
may need to be installed sudo yum install system-storage-manager