I have created a 500Gb server which I'm intending to use as a mail server. I have suddenly realised that the unit has defaulted to a 50Gb "/" partition or volume and a 480Gb "/home" partition or volume (sorry not sure on the terminology).
I began rsyncing the data from my original mail server (Zimbra) and after a couple of Gb had been transferred I realised that it was all being copied to the "/" partition which at 50Gb is WAY too small.
Is there a way to tell the server to reverse the partitions or actually delete the "/home" volume and only have the one volume, i.e. the "/' volume?
Or is the only way around this issue to destroy the whole thing and rebuild from scratch?
Many thanks in anticipation of some help with this.
Chris
Linux Distributions
Last Comment
Chris Kenward
8/22/2022 - Mon
Scott Silva
You should be able to find a partition resizing utility on CD and boot from it... Then you can shrink the /home partition, move it to the end of the drive, and enlarge the root...
Sanga Collins
copy /home/* to a new temporary directory
unmount /home
mount /opt on the same partition that was formerly /home
rename temp directory to /home
Finally modify /etc/fstab so that /opt mounts to the 480Gb partition.
You can now rebuild your zimbra server.
Scott Silva
IF you can unmount /home on a running system... Sometimes you can't...
Thanks for your quick response - wow - that was fast. Couple of things:
Although I'm pretty much OK at a lot of the admin tasks I need to do on the server(s) I run, there are limits to my ability.
The server is a VPS running on VMware Esxi and I do everything via ssh using terminal on a Mac so running a CD utility is a problem for me I think.
I'm not sure how to unmount a drive and don't know whether this is possible while the CentOS unit is running?
Not sure where the "/opt" came from in Sanga's reply.
All the best
Chris
Chris Kenward
ASKER
I have access to the Gnome GUI because I haven't disabled it yet. This means I can access the Disk Utility. I tried unmounting the "/" but it said cannot because it's busy. I tried and succeeded in unmounting the "/home" partition....
Does this help?
All the best
Chris
Sanga Collins
Provided /home is on a different partition, you can ssh login as root and unmount it to perform maintenance tasks. The way I accomplish this is by using an X11 capable ssh client.
On the centos Server, enable sshd X11 forwarding. This will allow you to open graphical utilities like gparted that will make life a lot simpler.
once logged in, you can run gparted from the command line and the gui will open giving you access to drive and partition management tools like unmount and resize.
You can attempt to resize the home partition, but i do not think you will be able to resize the root partition.
/opt partition:
Since this is a zimbra server and the default install directory is /opt/zimbra I always make /opt a mount point on a seperate partition or drive. This way if the zimbra mail store outgrows the partition, your entire server does not come to a halt due to no space on root.
The best setup i have found for /opt is a logical volume. Reason being when full you can just add another partition or drive to your virtual machine and then combine that new space with the existing logical volume allowing you to grow your server.
This can all be done while the server is live and users would never know.
Sadly this didn't work for me - perhaps I typed something wrong... I ended up with the /opt partition but the zimbra folder is gone. No matter - I'll rebuild the server from scratch. It's probably what I should have done in the first place.
Thanks both for your suggestions. Much appreciate the time you've spent on this for me.