Quantcast
Channel: Active questions tagged mount+fstab - Ask Ubuntu
Viewing all articles
Browse latest Browse all 699

Moving /home to another disk, which already contains some data, without erasing it

$
0
0

I have the /home folder on the same disk as the root, and I was planning to move it to another SSD drive ("ssd1" in the picture), which is already connected and containing some data:

folder structure

I checked the devices info with lsblk, and I got:

sda           8:0    0   1,8T  0 disk /media/sda1nvme1n1     259:0    0   477G  0 disk ├─nvme1n1p1 259:1    0   512M  0 part /boot/efi├─nvme1n1p2 259:2    0     1K  0 part └─nvme1n1p5 259:3    0 476,4G  0 part /nvme0n1     259:4    0   1,9T  0 disk └─nvme0n1p1 259:5    0   1,9T  0 part /media/ssd1

So, I was planning to do the following:

  • Make a backup of the original home folder:
sudo mv /home /home_orig    sudo mkdir /home
  • unmount the partition on the SSD disk from where it is now (/media) and mount it to the new /home folder:
sudo umount /dev/nvme0n1p1sudo mount /dev/nvme0n1p1 /home
  • finally, make a backup of the original fstab file, and modify it this way:
sudo cp /etc/fstab /etc/fstab_origsudo nano /etc/fstabUUID=<>    /home    ext4    defaults   0  2

Is this the correct procedure? I checked this link and this other answer, but the situation seems slightly different than mine...mostly, I'm worried about potentially deleting the data already present on ssd1.


Viewing all articles
Browse latest Browse all 699

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>