New Storage/Work Drive

So I have a new computer that I never brought up (I’ve had it about 6 months, but again, never posted the new specs here – I’ll be doing that soon as well!) and I’ve got 2 SSDs in it (smallish for me – 240GB each) which one is root, and the other is home… But I’ve recently installed a 3TB 7200RPM Hard drive to use for storage and work space (I’ll keep downloads and other files on it so as not to waste space on the SSD)…

I wanted to write down how I did it for future reference, and to let anyone else know how it was done!

So first, we format the drive! I opened my terminal and did the following:
lsblk – which showed me I have a sda1/2 (swap and root), sdb1 (home) and sdc with nothing (unmounted).

So from there, I did the following:

sudo parted -s -a optimal /dev/sdc mklabel gpt
sudo parted -s -a optimal /dev/sdc mkpart primary 0% 100%
sudo mkfs.xfs /dev/sdc1

The first line configured my new hard drive to use GPT (since it’s 3TB, and msdos label won’t work).
The second line then made the partition as a primary partition, and then used the full amount of the hard drive.
The third link then formatted it as an XFS file system.

The next thing we’ll want to do is set it so that it auto mounts up on booting up (just like root and home do) so to do that, we’ll need to modify fstab – but before doing that, we’ll want to use the uuid of the hard drive – so that the system will ALWAYS mount just this hard drive to the specific location (which I should probably create as well).


sudo blkid
sudo mkdir /mnt/storage
sudo vim /etc/fstab

And then I simply added
UUID=[blkid] /mnt/storage xfs defaults 0 0
to my fstab file.

After rebooting, I now had my storage drive… Then I just need to do the following:

sudo mkdir /mnt/data/musicalcoder
sudo chown musicalcoder:musicalcoder /mnt/data/musicalcoder
sudo chmod 700 /mnt/data/musicalcoder

Then I can simply copy which folders I want from my home directory to my new storage drive, and then create a symbolic link to the new location in my home directory… I’ll use Downloads as an example…

mv -v ~/Downloads /mnt/data/musicalcoder/
ln -s /mnt/data/musicalcoder/Downloads ~/Downloads

Simply do that for each of the folders I wish to have on the storage drive (which for me were Downloads, Music, Videos, and Work), and voila!!!

Never B Flat, Sometimes B Sharp, Always B Natural