1

I have this disk set up like so:

/dev/sda3 mounted to: /usr/local

if I just change this (in fstab, right?) to:

/dev/sda3 mounted to: /usr

What happens? Do I lose anything or does it all just default to the new mount point?

1 Answer 1

2

If you just changed the mount point in your fstab, without copying files over, then the contents that were in /usr/local/ will appear in /usr/. The original contents of /usr/ would be hidden from the OS.

Because /usr/ contains many of your system settings, libraries, binaries, and other important files, I am sure that your system would not work properly after remapping the drive's mount point.

In effect, the OS would not be able to find anything it would be looking for in /usr/ or its subdirectories (including /usr/local). The /usr/ directory is full of libraries which include symbolic links, and some of it's files have very specific ownership and permissions requirements.

I would not suggest changing the mount points, copying, or moving these files unless you have to.

4
  • What if I were to copy over /usr to someplace, change the mountpoint as above and then move that data back to the (new) usr dir?
    – Jesse
    Oct 1, 2013 at 5:28
  • 1
    It would be better to copy the contents of /usr into the new partition first and then mount it on /usr. And I would recommend using tar to do the copy.
    – Sazhen86
    Oct 1, 2013 at 8:19
  • 2
    Or use cp --archive. Oct 1, 2013 at 8:36
  • 1
    Also remember to move all data that previously was in /usr/local to the "new" /usr/local. Oct 1, 2013 at 8:47

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .