Report this

What is the reason for this report?

How can we move /home in ubuntu to a block storage?

Posted on September 13, 2017

Hi, I wanted to ask if we can add a block storage and then move /home there. That’s an easy process when installing ubuntu to a laptop with say 2 partitions but is this possible in these mounted volumes?

Thanks in advance



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
0

Yeah you can, it’s quite simple to do

  • mount your new block storage at let’s say /mnt
  • rsync /home over to /mnt
  • delete everything from /home (this is optional to create more space for root partition, MAKE SURE EVERYTHING IS THERE BEFORE DELETING)
  • unmount /mnt
  • mount the new storage with fstab to /home to have it mount on bootup

Well, this seems not to work anymore. Now they have some stupid thing called /dev/disk/by-id/scsi-0DO and I can’t change my location of the home with the above instructions. When I delete the home and mount it as above the home is gone when I reboot my system. Happy that I made a snapshot before I took this action.

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.