Create Disk Partition With GNU Parted

My favourite tool to create disk partitions on Linux is c[fg]disk. cfdisk used to create MBR based partition, and cgdisk is for GPT one. Today, I want to learn to use another tool called GNU Parted. After plugging an external disk, we can use udiskctl command to identify the disk device. # udisksctl status MODEL REVISION SERIAL DEVICE -------------------------------------------------------------------------- Samsung SSD 850 EVO 250GB EMT01B6Q S21MNXAG919308T sda ST2000DM001-1ER164 HP51 Z4Z46TMA sdb ST2000DM001-1ER164 HP51 Z4Z46W3E sdc Samsung SSD 850 EVO 250GB EMT01B6Q S21MNXAG919312Y sdd Samsung SSD 840 EVO 250G 0309 533144424E4541443837343335324120 sde The last Samsung SSD 840 (/dev/sde) is the one that I’m going to work with....

May 20, 2020 · 2 min · 419 words · kenno

How to Label an XFS Filesystem

When I plugged in an external drive to my laptop, the drive was displayed as a string consits random letters and numbers. Here is an example: ❯❯❯ df -Th | grep sdb /dev/sdb1 xfs 481M 26M 456M 6% /run/media/kenno/5428b182-c92e-466b-89d2-b5b31b80ba48 Though the drive worked perfectly fine, I think it’s ugly, and I wanted to properly give it a good name. Let’s call it externo. But how to do this? You may not believe it, I forgot how to do this....

October 27, 2019 · 2 min · 304 words · kenno

Labeling an XFS Partition

Let’s say I have a partition as /dev/sdc1 formatted using XFS file system, and I want to give a label to it as externo. Here is one way to do it: # xfs_admin -L externo /dev/sdc1 writing all SBs new label = "externo" To read the label: # xfs_admin -l /dev/sdc1 label = "externo" Reference: HowTo Rename a XFS-Filesystem (label it)

September 29, 2016 · 1 min · 61 words · kenno