Update mailbox location to different hard drive

Operating system: Ubuntu
OS version:20.04
Hello there,
Virtualmin installed on a Ubuntu server through install.sh successfully,
But I need to change default mailbox location to new location on my new hard drive upon more space required,
Please help me on:
Is there any place in dashboard or config files to let me do that and how?
My new location is : /media/maildrive

In Virtualmin, it is best that you not do this.

The right thing to do would be to put the entire /home in your large HDD. Doing so ensures that the other components of Virtualmin work normally - e.g. disk quota for users is calculated correctly and enforced.

If you change just the default mailbox location then it will work but without things such as accurate disk usage info.

1 Like

@calport’s right. You’re gonna break quotas, among other things, by splitting user data across partitions like this. That’s not a Virtualmin issue, that’s how quotas in Linux work. But, even if you don’t care about quotas, it’s not recommended. You’re venturing into uncharted territory for no good reason.

You can either copy everything over, or if it’s a volume, you can add the new disk to the volume and expand the available space (this, again, isn’t a Virtualmin issue…expanding volumes and filesystems is pretty standard across all Linux distros). Webmin has modules for most of that, but I recommend you read up on it. Using Webmin just means you don’t need to know the syntax, but you still need to know the concepts and they’re quite complex.

1 Like

It would be wonderful if a configuration option were added to Virtualmin (yeah, I know, we wish to simplify and I am recommending the exact opposite!) to calculate disk quota in a few other paths and locations, in addition to /home.

This will give web service providers the added option of moving the mail storage of some clients who have very large requirements to another location (/media/maildrive in @gandalf’s case) and still have Virtualmin do its magic.

It’s just one extra config option to be able to specify a max of, say, three more paths to check for disk usage. Simplicity is all very good but Virtualmin should me made to evolve to let web service providers leverage the cheap and cloudy block storage that everyone now offers.


It’s not a limitation of Virtualmin. We’re not going to reimplement Linux disk quotas to support spreading across filesystems. We’re not the one calculating storage usage. Disk quotas are at the OS level (I think there probably is still some sort of soft quota support in Virtualmin, which would probably work with different homes, but it’s still a bad idea).

This isn’t a direction I think we should go. There are good tools already for making a filesystem bigger or moving to another bigger disk. That’s the right solution.

1 Like

I guess you are right, there are appropriate tools available. Thanks for clearing that up. :+1:

1 Like

Thank you Calport,
You are right, but I don’t know how or where can I change the location of /home in config files?
Does it need to turn off the virtualmin before? would you please give me a clue?


Thank you Joe,
I understand the principals of developing a platform,
Would you please let me know exactly how can I migrate my /home root to another root in Virtualmin or through any other tool? please name them or give me a clue, thanks again.

You do it in the OS, so Ubuntu in your case. Copy everything from the existing /home, then rename it, then mount the new drive as /home

Full guide here:

Thank you DominicS,
I just found a place to change the home location and in continue the rest will be done automatic by Virtualmin, just it needs to let virtualmin to create home folder by itself.

Good Luck

We’ve told you why that’s likely a mistake. But, I guess learning the hard way makes it stick.

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