Don’t do that.
Mount the partition or volume that is currently mounted on
/home. Use a bind mount if it’s not a separate volume or partition (but you should make it a separate volume or partition for the benefit of future you).
Don’t do that either. Mount that volume or partition on
You’re not doing anything with Virtualmin. You are literally mounting those partitions or volumes in the place in the filesystem hierarchy (
/var/lib/mariadb) where that kind of data belongs.
No, I’m not suggesting a symbolic (or hard) link.
It is not the only option, but it is the right option. And, it is so much more of a right option, that you’d be crazy to try to do it some other way. I’m sorry anybody suggested it changing all the paths, because that’s just a really bad practice and will bite you badly later.
We don’t supply that location, your OS does. These are conventions shared across the Linux world. User homes live in
/home (though there is some debate about whether we ought to instead put those homes in
/var/www, since these homes are intended to host websites, but I think the “home” aspect of it is more important than the “www” aspect of it, since mail and other stuff also goes there). Databases live in
/etc/fstab. Unless the extra disk is some sort of temporary disk (i.e. a USB disk) that was auto-mounted (in which case it probably has a filesystem entirely inappropriate for this purpose, like FAT32, which doesn’t even have permissions or quotas!), you will see a mount entry for this disk.
I recommend you read up on the following topics (this will save you a lot of time in the long run over doing something crazy like changing all the paths):
LVM, the Logical Volume Manager. Ideally, you will create two volumes on your big disk, one for
/home and one for
/var/lib/mysql, if you really only want databases stored there and everything else stored elsewhere). You could do this with raw partitions, but using LVM allows flexibility later, and also provides additional features, such as snapshots, disk mirroring and other RAID types, etc. Volumes are the right thing (but in a testing or development environment where you don’t care too much about the data or about backups or system upgrades or migrations later, filesystems on raw partitions is also fine).
fstab. This is the filesystem table, where mounted filesystems are defined. You will configure how the volumes I just mentioned get mounted. You decide where in the filesystem hierarchy a volume or partition will be mounted (e.g.
/ or whatever).
Your questions aren’t really Virtualmin questions. These are basic system administration topics, I’m just trying to steer you onto a reasonable path; changing all the locations of your databases and user homes is not a reasonable path.