0

On a completely fresh install of Ubuntu, I created only one root partition "/" on "DriveFOO" which holds all my system files, including my "/home" folder.

Now, I wish to instead have my "/home" mount point on another drive. No problem, in terminal I have run

sudo cp -rp /home/user /media/DriveBAR

Now I'll edit my fstab, and mount /home to "DriveBAR"... reboot, and no problem here!

What I am asking now is simply: after changing the mount point of "/home" what happens to the files that were in "/home" when its mount point was on DriveFOO's "/" ?

Thanks,

Brian

EDIT: in addition to accepted answer from bodhi.zazen, see link posted in comment to my question from user68186.

  • See askubuntu.com/questions/29656/… – user68186 Feb 18 '14 at 17:55
  • OK, started to reply to your first comment then saw you edited to link this. So it is in fact possible to mount over a non-empty folder, and I understand the consequences now. Thanks. Also, I believe my copy command is correct, because the user folder goes in the root of DriveBAR, since DriveBAR is itself /home after mounting so in fstab. If DriveBAR had a home folder in itself, then it would incorrectly become /home/home/user – brneuro Feb 18 '14 at 18:01
  • Sorry about the confusion. You can rename the /home folder in DriveFOO to /oldhome or something after unmounting DriveBAR. Then you have to create an empty /home folder to mount DriveBAR again. Looks like @bodhi.zazan has already suggested this. – user68186 Feb 18 '14 at 18:06
0

The old files are still on the old hard drive. If you boot to recovery mode and unmount home you will see them.

You can not see them with the new home mounted is all, they are sort of masked as you are pointing the location /home to the new space.

  • interesting... is there any way to 'unmask' them, or clear them for space without going into recovery mode? – brneuro Feb 18 '14 at 17:55
  • Not easily, you can not have /home point to two separate, independent locations at the same time. I suggest you boot to recovery mode and then move the old home, for example mv /home /home_old; mkdir /home – Panther Feb 18 '14 at 18:01
  • thanks for your info, and also the link provided by user68186 helps understand why this is the case. – brneuro Feb 18 '14 at 18:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.