[root@rhce-ryanrudolf]# rm -rf / 2> /dev/null

things I break/fix for fun and learning

May 9, 2020 - 3 minute read - Comments

Additional Storage for Thinkpad T540p

My trusty daily driver Thinkpad T540p is getting low on storage. Currently it has a 480GB SSD for my Linux install and a 120GB SSD for my Windows10 install. With all the files I’ve accumulated through the years (game backups, music, family pictures, videos), my storage space is getting smaller and smaller. I decided to install additional storage on this machine, with the end-goal being accessible both in Linux and Windows.

I settled for Seagate Firecuda 2TB. I got the item from amazon warehouse deals as I had good experience with them. Item arrived sealed in original packaging although the packaging has cosmetic damage (dent). Other than that, the item looks new and priced cheaper due to the minor cosmetic damage on the packaging. I will be using the caddy from my Thinkpad T420s to get this going.

I wanted this to be accessible both in Linux and Windows. I decided to use the default NTFS filesystem that came with the drive. Windows uses NTFS by default so no issues and no additional configuration needed. On the other hand, Linux also supports NTFS but need to do some minor configuration for it to work.

First I need to identify which block device it is using. I will use the lsblk command -

[ryanrudolf@t540p ~]$ lsblk
sda      8:0    0 447.1G  0 disk 
├─sda1   8:1    0   350M  0 part /boot/efi
├─sda2   8:2    0    32G  0 part /
├─sda3   8:3    0     8G  0 part [SWAP]
└─sda4   8:4    0 406.8G  0 part /home
sdb      8:16   0 111.8G  0 disk 
├─sdb1   8:17   0    16M  0 part 
└─sdb2   8:18   0 111.8G  0 part 
sdc      8:32   0   1.8T  0 disk 
├─sdc1   8:33   0    16M  0 part 
└─sdc2   8:34   0   1.8T  0 part
[ryanrudolf@t540p ~]$ blk

sda, sdb and sdc are the three storage devices. sda is 447GB which is my Linux install. sdb is 111GB which is my Windows install. And sdc is 1.8T which is the Firecuda. sdc is divided into two partitions - a tiny 16M sdc1 which is the reserved MS Partition, and 1.8T labeled as sdc2.

The next step is to get the UUID of sdc2. To get the UUID, simply issue the blkid command -

[ryanrudolf@t540p ryanrudolfoba.com]$ blkid | grep sdc
/dev/sdc2: LABEL="FIRECUDA" BLOCK_SIZE="512" UUID="1C86B74D86B72664" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="992a3bc4-e0ab-4656-b21b-9a4ac14bcc8d"
[ryanrudolf@t540p ryanrudolfoba.com]$ 

The UUID is 1C86B74D86B72664.

The next step is to create a mount point for sdc2. For my system, I created the mount point in /mnt/caddy -

[ryanrudolf@t540p ~] sudo mkdir -p /mnt/caddy
[ryanrudolf@t540p ~]

Finally we need to edit /etc/fstab to put all the pieces together. /etc/fstab defines the partitions and which mount points they go to. I added the below lines to /etc/fstab to automatically mount sdc2 to /mnt/caddy -

UUID=1C86B74D86B72664 /mnt/caddy        auto    defaults        0 0

Editing /etc/fstab is risky! One mistake and it will make the system not boot. To be sure that everything works before rebooting, issue the mount -a command. If there are no errors, it means the entries in /etc/fstab are correct and it is safe to reboot!

[ryanrudolf@t540p ryanrudolfoba.com]$ mount -a
[ryanrudolf@t540p ryanrudolfoba.com]$ reboot

After reboot, my additional storage device is now automatically accessible in /mnt/caddy. Ths can be confirmed using the df -h command.

[ryanrudolf@t540p ryanrudolfoba.com]$ df -h | grep sdc2
/dev/sdc2       1.9T  850G 1014G  46% /mnt/caddy
[ryanrudolf@t540p ryanrudolfoba.com]$ 

Time to utilize the extra storage!