I have System with 128 GB SSD and 1 TB HDD.I have installed Ubuntu on SSD with /,/swap,/home partition. So What i want now is create a separate data partition on HDD and link some of the folders on /home partition to data partition on HDD which already has windows 10 on it.So what steps would be needed to do that.I am also attaching screenshot of lsblk -f command.
- 18,154
1 Answers
I recommend creating a single directory that will serve as the "mount point" for the data partition. The directory can be anywhere - just put it somewhere that's convenient. Leave the directory empty.
For my instructions below, I'll assume the data partition is /dev/sdb1 and that your data directory mount point is /home/myname/data
Then, from the command line type:
ls /dev/sd??
and see if you can tell from that which is the data partition. When you think you've identified it, then type this in the command line:
sudo mount /dev/sdb1 /home/myname/data
Then:
ls /home/myname/data
...to check that you've mounted the right device. If it doesn't have the files in it that you were expecting, then:
sudo umount -t ntfs-3g /dev/sdb1
and try again.
Once you've verified that you have the right device, then edit the /etc/fstab file to make the change permanent. Add a line like this, but with your own device and directory names:
/dev/sdb1 /mnt/backups ntfs-3g noatime,errors=remount-ro 0 1
Now test it. First unmount the data directory:
umount /home/myname/data
ls /home/myname/data
The directory should be empty. Now test your fstab file:
mount -a
ls /home/myname/data
You should see your data. And you're done!
The defaults for your new mount in the fstab should be fine. But in case you're interested in fine-tuning, here are the other options you could set: https://www.tuxera.com/community/ntfs-3g-manual/
- 2,536
