Topic: Disk Full Issues (CentOS and equivalents)
Recently I discovered that the 50GB "cl-root" file system created by a standard Centos (Rocky and Alma too, I suppose) install was essentially full. Fortunately, I noticed this a day or two before complete disaster.
A little investigation revealed that Centos creates cl-root (which contains all folders except /home) as 50GB and uses all the rest of the disk for cl-home. This is the reverse of what one would want for iRedMail, which keeps almost nothing in /home. The main mail folders and nearly everything else are stuck sharing 50GB, even when the disk is much larger.
This isn't hard to fix, but can be confusing to look up as there are so many variations. I thought I would record what worked for me (adapted from https://cyberark-customers.force.com/s/ … tos-root). See the referenced article for the rationale of each step.
Use at your own risk, but this worked for me out of the box.
0. BACK UP YOUR SYSTEM
1. df -h (check filesystem layout, verify that cl-root is 50GB and cl-home is large and nearly empty)
2. cp -a /home /home2 (save /home folders to a folder in cl-root)
3. umount /dev/mapper/cl-home (unmount cl-home)
4. lvremove /dev/mapper/cl-home (delete it)
5. lvextend -l +100%FREE /dev/mapper/cl-root (extend cl-root)
6. xfs_growfs /dev/mapper/cl-root (grow the file system to fill the logical volume)
7. df -h (check that cl-home is gone and cl-root has grown)
8. mv /home2/* /home/ (move saved /home folders back -- but now in cl-root)
9. rmdir /home2 (delete backup folder)
10. edit /etc/fstab and remove the line with cl-home
11. reboot
----
Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.