-1

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.

enter image description here

Kulfy
  • 17,696
  • Filesystem ext4 or ntfs? – George Udosen Dec 23 '18 at 12:38
  • ext4 is better if Windows doesn't need to access it. ntfs is better if both Linux and Windows have to access it. If you can use ext4, then in my instructions, substitute "ext4" for "ntfs-3g" – Eric Mintz Dec 23 '18 at 12:45
  • Please run lsblk -f and add it to your question! – George Udosen Dec 23 '18 at 12:53
  • Some examples: http://askubuntu.com/questions/524943/dual-boot-with-ssd-and-hdd-storage & https://askubuntu.com/questions/921778/windows-10-dual-boot-ubuntu-on-ssd-and-data-on-hdd & https://askubuntu.com/questions/1013677/storing-data-on-second-hdd-mounting & https://askubuntu.com/questions/1058756/installing-all-applications-on-a-ssd-disk-and-putting-all-files-on-hdd-disk – oldfred Dec 23 '18 at 15:26

1 Answers1

0

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/

Eric Mintz
  • 2,516
  • 12
  • 24