Adding an old hard drive

I recently installed Manjaro with KDE to my desktop SSD, but kept my other hard drive unplugged during the installation. How should I precisely go about adding a hard drive so that they'd be mounted on startup? I'd also like to have it accessible from its own directory in my home directory, but have the data actually stored on the hard drive, if that's easily possible.

Here's the output of fdisk -l for the drive:

Disk /dev/sdb: 1,8 TiB, 2000398934016 bytes, 3907029168 sectors
Disk model: WDC WD20EARS-00M
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x401a2371

Device     Boot  Start        End    Sectors  Size Id Type
/dev/sdb1  *      2048     206847     204800  100M  7 HPFS/NTFS/exFAT
/dev/sdb2       206848 3907026943 3906820096  1,8T  7 HPFS/NTFS/exFAT

You mean you want your home directory on that drive or you only want a folder in your home which points to that drive?

I meant the latter, a folder in my home which points to the other drive

  • Create your folder.
  • Find the partition UUID with lsblk -f
  • Edit /etc/fstab (sudo required) and add a line for that new mount point: https://wiki.archlinux.org/index.php/Fstab
  • It should mount automatically on next reboot. You can use mount -a in the meantime.
2 Likes

Thank you!

If anyone else is wondering about this, here's exactly what I did:
Created the dir ~/Data
Ran command lsblk -f:

NAME   FSTYPE   LABEL           UUID                                 FSAVAIL FSUSE% MOUNTPOINT
sda                                                                                 
├─sda1 vfat                     973E-B4EB                             299,1M     0% /boot/efi
├─sda2 ext4                     1e2ffe58-c52f-4822-977e-2a19e8e2fcbe    174G     9% /
└─sda3 swap                     759f595a-16fd-4a53-887a-5530ac5d98a5                [SWAP]
sdb                                                                                 
├─sdb1 ntfs     System Reserved CC247D3D247D2C18                                    
└─sdb2 ntfs     Tuomiopäivä     7EE4828CE482467D                         

Copied the UUID of sdb2, and changed started editing /etc/fstab (with sudo), and appended the following to the end of the file:

UUID=7EE4828CE482467D /home/hogis/Data ntfs defaults 0 2

I was not able to refer to the home directory with ~ here (eg. ~/Data), but using the exact path worked. The amount of whitespace between the different "columns" in fstab does not seem to matter, even though the file is initially neatly formatted into columns.
Then i ran mount -a, and it worked.

3 Likes

~ depends on the user making the action. Since many, like mounting, is usually done by root, it wouldn't valuate to what you would've expected.

Yes, that makes sense. Thanks again!

Several tutorials exist on the subject

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.

Forum kindly sponsored by