Partition a new disk on linux using fdisk, lsblk and mkfs

First, you’ve to create a new partition.

You can list all available storage device with:

If your disk is new, the new device will appear empty (without children on the tree).

Then:

Press m to show the manual.

To create a partition larger than 2TB, you’ve to use a GPT partition (g) then create a new extended partition (n) then with (p) it will show you how the partition will like before you write (w) them.

Then, lsblk will show the device with the new partition, e.g.:

Then format the new partition /dev/sdc1 with the specified filesystem (e.g. ext4):

If you haven’t take not of the UUID shown by mkfs after format, use blkid command to list the UUID of the device, so if device name change the fstab is still valid.

And add to /etc/fstab (put the last 0 to 1 to check filesystem on startup):

To get the UUID later:

Create the mount directory with:

Then mount the new partition with:

Proxied content from gemini://chirale.org/2019-02-02_4937.gmi (external content)

Gemini request details:

Original URL
gemini://chirale.org/2019-02-02_4937.gmi
Status code
Success
Meta
text/gemini; charset=utf-8
Proxied by
kineto

Be advised that no attempt was made to verify the remote SSL certificate.