Virtualmin only using /dev/vda1 - now full

3 posts / 0 new
Last post
#1 Sun, 06/02/2019 - 17:13
brad100

Virtualmin only using /dev/vda1 - now full

Hi there

Can anyone assist me with a serious issue I have just encountered,

I have just discovered that my vps has two storage areas - /dev/vda1 (10GB) and /dev/vdb1 - (100GB)

My Virtualmin install is only using /dev/vda1 - and reached 100% .

I see in /etc/fstab - /dev/vdb1 /data ext4 defaults 0 0

How do I setup my /home and /var directories to use /dev/vdb1 without destroying my current vps or loosing any data?

Any help would be gratefully accepted

Kind regards Brad

Sun, 06/02/2019 - 20:02
andreychek

Howdy,

Well, this is the short answer -- but the most common setup there would be to use /dev/vdb1 as /home.

First, you'd need to partition it, then mount it somewhere temporarily, such as /mnt/tmp.

Then, copy all the data from /home to /mnt/tmp, using a tool such as rsync.

Once the copy is finished, unmount /mnt/tmp, create an entry for it in /etc/fstab, then mount it over top of /home.

Test to ensure it's working, and if it is, you can then delete the old /home data from /dev/vda1.

Some folks put /var, or maybe /var/lib/mysql, onto the /home partition, and then make a symlink to it at it's original location.

-Eric

Mon, 06/03/2019 - 03:38
brad100

Hi Eric

Thank you for your reply and advice

I found an article using mount --bind and am considering trying that for /home

adding something like this to /etc/fstab

/data/home /home none bind 0 0

Would Virtualmin cope with me doing the same to /var ?

/data is mounted to my vdb of course.

Kind Regards Brad

Topic locked