How do I fix a full root partition?

NethServer Version: 7.8.2003

As the title says the root partition is full. I have done symbolic links for /var/www and for /var/lib/nethsrver/ibay to another partition to off load some of the bigger stuff and have manually deleted some tgz log files. I tried to run the find command that was referenced in another post, but all I end up with is a > prompt. I broke the command line down into its separate parts and it did show that there were a few files in the backup directory that were big. Without messing the system up can I symbolic link the backup directory to the other partition also?

I have looked at storage in the console and I can’t seem to find a way to shrink the large home partition that I have so that I can grow the root partition.

When I tried to copy and paste the referenced command line find command from the web post into the web console screen I get nothing. Is it operating as intended or is this an unintended enhancement?

@soscc

Hello Michael

So far, reading your post, you’ve done most sensible stuff!

Actually, to be honest, you can’t “fix” a full root partition, and XFS (as NethServer uses) doesn’t make it easier. XFS can’t be “schrunk” like ext4 (or NTFS with eg Acronis).

You can make space, put in another disk, or clone the whole thing to a larger disk.
But these do not “fix” the full root partition, they DO however, alleviate the problem so you can use your system again.

As to your question, you CAN symlink the backups folder, this should not present any further issues. But DO check and verify your backups are working, once you solve the space issue!

Your best bet would be to add in an additional disk (at least temporary), so you can clone / copy / create / delete partitions and contents as needed! (So you don’t lose any data, and backup will not work as the disk is too full).

NethServer doesn’t actually use /home, NethServer uses /var/lib/nethserver/users - I’m assuming you mean that partition. If you actually have a large partition /home, this can be deleted (normally). Verify before doing this, that we’re both talking about the same directory (and that there’s nothing in there!). Copy all the folders to the new temporary disk, delete the partition.
Resize / Recreate partitions needed and you should be good to go!

At the end verify your disks and structure are correct, space is available, then reboot and watch the screen if any errors crop up!

Good Luck

PS: Your case is one of the reasons why nowadays, in the year 2020, it is strongly suggested to NOT do bare metal installs anymore, but everything under a class 1 Hypervisor (Proxmox, VMWare ESXi, Microsoft Hyper-V or XEN. VirtualBox is NOT a class 1 Hypervisor! It’s usable, but a mere toy in comparison.). After 15 years of VMWare, I migrated my 25-30 clients to Proxmox 5 years ago! Clients are happy!
This means ALL servers, no matter if Windows or Linux…

A critical upgrade? Easy, do a snapshot before, test it, if good no need for the snapshot!
If bad, roll back from the snapshot…

Disk to small? Enlarge the disk image in the Hypervisor, run a small command in the VM, and your disk is larger (Can even be done LIVE, while users are accessing the System!).

Live Backups? Live Migration to another Hypervisor so you can add RAM / Disks to the old Hypervisor? Full High Availability? It’s all there!

Note:

Most Web-consoles are not copy/paste capable. Proxmox provides two, the standard, without copy / paste, and a serial based web-console (using a virtualized serial port) which IS copy/paste capable…

My 2 cents
Andy

I took the default install suggestions when I built the server. Why would it build the server with such a tiny root partition? If the suggestion is to run NethServer in a VM, then we’re looking at a way higher class of machine than what I have it on now. I’m just trying to get by on it, mostly for e-mail, for the next 8 months until I can get my business fully shut down and then it can go away.

I have something called /dev/centos/home that’s 875gb in size and it isn’t part of the root partition. That’s where I have been symbolic linking things to. I did see the /var/home folder with my user names as folders, but since I’m the only real user and I log in as root, the few script files there aren’t of any consequence.

Since my Linux skills are pretty atrophied, I’m gong to have to think about what to do about this issue for a little while.

Thanks

@soscc

Normally, NethServer will use the whole disk for installation! (as root partition)
If you first installed Centos, and NethServer over that, that’s a different animal!

NethServer does normally NOT have any folder called /dev/centos/home, so this must come from somewhere else, and might explain why your root disk is so small…

Just drop a note if you need any assistance…

PS:

My home NethServer is running on a 9 year old HP Proliant ML110 G6 with a quad core Xeon (with Hyperthreading shown as 8 cores!) and a mere 16 GB RAM. This box has 2 2 TB Disks in RAID1 and is running Proxmox (Free Version).

Although I’m in a similiar business as you are (were), this server is strictly for personal use, media, backups etc.

My 2 cents
Andy

The root partition would normally take almost all the space on the disk. What’s the output of df -h?

[root@nethserver ~]# df -h
Filesystem Size Used Avail Use% Mounted on
devtmpfs 3.8G 0 3.8G 0% /dev
tmpfs 3.8G 24K 3.8G 1% /dev/shm
tmpfs 3.8G 269M 3.6G 7% /run
tmpfs 3.8G 0 3.8G 0% /sys/fs/cgroup
/dev/mapper/centos-root 50G 25G 26G 50% /
/dev/sdb1 1014M 266M 749M 27% /boot
/dev/mapper/centos-home 873G 30G 844G 4% /home
/dev/sda1 1.9T 18G 1.9T 1% /run/media/root/backup
tmpfs 774M 0 774M 0% /run/user/0
tmpfs 774M 0 774M 0% /run/user/1179001107

OK, so your root partition is half full, so there isn’t an immediate problem, but there’s another partition at /home, which I wouldn’t expect Neth to create (since it doesn’t use that directory much). Did you install from the Nethserver ISO, or from a CentOS ISO?

It’s half full now since I move the backup folder and sym linked it. I used the Nethserver ISO on a flash drive when I rebuilt the server in the spring.

That sure isn’t the behavior I’m seeing with an installation from the Nethserver ISO:

I used whatever ISO was available around April 1st when I built it and basically took the defaults for the Linux install.

As long as it hangs in there for the next little while, I’ll be happy. When I no longer need it for critical e-mail I may rebuild it and use it for personal web hosting and file serving, paying more attention to how the disk is being set up.

I ran a backup and moving the backup folder to the other partition is working out so far.

Thanks for the help and suggestions.