# At first glance, you'll think this excessive. # This is the product of much experience, so the additional partitions # such as '/var/lib' and '/var/lib/docker' are highly useful because # the customers I support often do not disclose their use of docker # for example, put it into production, then later I have to coordinate # with them so that /var/lib is not filled up due to a # non-existent /var/lib/docker - so that is why (for example) # /var/lib/docker exists # # You may find other partitions that are needed. # I make a "/usr" partition because some admins or companies # occasionally place software in "/usr" and that will fill up "/" # if I don't make a "/usr". Is this overkill? Absolutely. # I'm good with overkill, this won't solve every problem # but when you have to after-the-fact-build resolve "/" filling up # or "/var" filling up, you begin to adopt overkill. # # Why are there "fsoptions" here? Or "/home" partition? For STIG requirements. # Many larger companies will use an NFS-mounted /home/ drive for users for # centralized users files so their home drive is available regardless of what # server they log into. # Do all the suggestions below work in all environments? Absolutely not, # so please adjust for your own environment. # clearpart --all zerombr part /boot --fstype=xfs --size=5072 part pv.008065 --fstype="lvmpv" --ondisk=sda --size=100 --grow clearpart --all --drives=sda volgroup osdisk --pesize=4096 pv.008065 ### logvol / --fstype=xfs --vgname=osdisk --name=slash --size=65655 logvol /opt --fstype=xfs --vgname=osdisk --name=opt --size=30000 logvol /home --fstype=xfs --vgname=osdisk --name=homestig --size=1000 logvol /var --fstype=xfs --vgname=osdisk --name=var --size=32768 --fsoptions="nodev" logvol /var/lib --fstype=xfs --vgname=osdisk --name=varlib --size=42768 --fsoptions="nodev" logvol /var/lib/docker --fstype=xfs --vgname=osdisk --name=docker --size=15768 --fsoptions="nodev" logvol /var/log --fstype=xfs --vgname=osdisk --name=varlog --size=23384 --fsoptions="nodev" logvol /var/log/audit --fstype=xfs --vgname=osdisk --name=varlogaudit --size=9300 --fsoptions="nodev,nosuid,noexec" logvol /var/tmp --fstype=xfs --vgname=osdisk --name=vartmp --size=8000 --fsoptions="nodev" logvol /var/spool --fstype=xfs --vgname=osdisk --name=varspool --size=8192 --fsoptions="nodev" # everything else logvol /remainder --fstype=xfs --vgname=osdisk --name=remainder --size=100 --grow logvol /tmp --fstype=xfs --vgname=osdisk --name=tmp --size=16384 --fsoptions="nodev,nosuid" logvol /usr --fstype=xfs --vgname=osdisk --name=usr --size=21384 logvol swap --fstype=swap --vgname=osdisk --name=swap --size=16584