2

My system is Ubuntu and there are three users on it. Also, I have some partitions: /dev/sda1, /dev/sda2 and /dev/sdc1.

For now the whole /home directory is mounted on the /dev/sda2, the whole root / is mounted on the /dev/sda1.

My question is: is it possible to mount the home directory of one of the three users, such as mounting /home/user1 on the /dev/sdc1? How to do it?

  • Yes, it is possible. Do you faced any issue? – Stack EG Aug 23 '18 at 6:26
  • @EBINGLADSON Yes. /dev/sda2 is almost full, and I have some empty partitions, so I want to remount users to some other partitions. – Yves Aug 23 '18 at 6:48
2
  1. Make sure the user is logged out and no process uses any file in their home directory
  2. Mount the sdc1 partition to some mountpoint (/mnt/sdc1 for example).
  3. Move the content of user1 directory to this location.

  4. Then unmount sdc1.

  5. Now you can edit your /etc/fstab by adding a line like this:

    UUID=THE-UUID-OF-SDC1   /home/user1   FS-TYPE  defaults   0   2
    

    To find the UUID of your partition you can use the blkidcommand which is part of the util-linux package. This will also give you the FS-TYPE of your partition.

    blkid /dev/sdc1
    

After a reboot you should have /home/user1 on your sdc1 partition.

But as always by manipulating partitions and mount point, be carefull and you better have a backup of your data.

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.