Adding a disk to /home folder / Expand storage of home folder

Hello everyone,

I have Virtualmin running on Digital Ocean droplet. The operating system is CentOS Linux 7.8.2003
I got to a point where disk space was getting full so I couldn’t add more virtual servers.
What I did is I added another 50GB volume to the droplet thinking that would sort it out, but I found out now it’s not that simple and from reading a bit in the forum it seems like I need to mount the new disk to the /home folder in order to make it work.

I’m just hoping to get some help and guidance with this since I don’t want to mess on the setup that is already working.

Right now, in the dashboard I see:
Screen Shot 2020-08-01 at 13.00.29

And this:

When navigating to Hardware > Partitions on Local Disks, I see this:

Can I use this disk to extend my /home folder storage?
If yes, what are the steps needed to get this done?

And, is doing this the best practice?
If not, what is recommended in these cases?

Thanks in advance!

Hello @odizl, I wish I had better news but I have been unsuccessful in adding storage to a Virtualmin install in the manner that you are attempting - by mounting additional storage. Even when I mount the storage successfully, Virtualmin does not report quotas for the directories in the mounted drive correctly and Usermin works erratically for many operation, even simple ones such as adding or removing users from virtual servers which use the mounted drive for storage.

I would be elated if someone helped you and me with a solution for mounting drives within /home in a manner which would work seamlessly with Virtualmin.

Hey @calport, I’m sorry to hear you have a similar issue as I do.
I really hope someone with more experience can guide us on how get this done.

Hello again everyone, we can really use your help regarding this.
Can anyone possibly give us a hand with this?

Expanding the underlying filesystem is not trivial and is unrelated to webmin/virtualmin. Its no different than adding a second disk and then expecting the OS to see all the space as one disk. Its do-able but the problem is you now have data spread across two disks. If one disk fails, the whole file system on both disks is toast. just as if its a raid 0.

One option may be to just move /home to the new disk. You’d need to compare the size /home vs the size of the root OS to see if much space would be gained. But this can be done with a few copy and mount commands.

Does DO not offer an option to expand the existing 50G?

You will have to do this via the command line. Your easiest option would be to move the home drive to the second disk and change the mount point in the /etc/fstab but it appears you need the space from both HDs.

You can use the command line tool of mhddfs to merge two mount points into one assuming you’re system isn’t setup with lvm (sudo lvmdisplay -l) or fdisk -l | grep mapper

What you are trying to do though could go south real quick leaving your system down so make a backup.

1 Like

Hello @scotwnw and @stuckinthehouse

Thank you for your suggestions and recommendations.
I ended up asking a sysadmin friend to help me sort this out.
What he did was what @stuckinthehouse suggested, he the /home folder to the new drive and mounted it.
to be honest, not sure if I could have done it myself :slight_smile:

Thanks for the help.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.