OS : Fedora 34
One month back, I built an AMD Ryzen based desktop PC which does Chia coin farming.
I have several 12 TB and 18 TB mechanical Hard drives (Western Digital and Seagate) attached to the motherboard. For each disk, I created an ext4 filesystem covering the whole disk. i.e. no LVMs involved.
Typically, in linux, when you want to create an ext4 filesystem, following is what you would do.
Step1. Partition the HDD using fdisk or parted.
$ parted -s /dev/sdc mklabel gpt
$ sudo parted -s /dev/sdc unit mib mkpart primary 1 100%
Result of the above commands is a /dev/sdc1
partition which uses GPT partitioning scheme.
Step2. Run mkfs.ext4
command in the newly created /dev/sdc1
mkfs.ext4 /dev/sdc1
Now /dev/sdc1
is ready to be mounted on the directory tree of Linux
But, my friend, who is a java developer and not very familiar with Linux and doing Chia farming was creating the filesystems directly from the attached SATA HDD as shown below. i.e. he was running mkfs.ext4
command directly on the newly attached disks WITHOUT paritioning them first. So, I too did the same.
Following is the output from Fedora 34 when I ran mkfs.ext4
command directly on one of my 14TB HDDs
$ sudo mkfs.ext4 /dev/sdc
mke2fs 1.45.6 (20-Mar-2020)
Creating filesystem with 3418095616 4k blocks and 427261952 inodes
Filesystem UUID: 0cb9a4a8-19b5-4d93-91de-89ecbf31f643
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968,
102400000, 214990848, 512000000, 550731776, 644972544, 1934917632,
2560000000
Allocating group tables: done
Writing inode tables: done
Creating journal (262144 blocks): done
Writing superblocks and filesystem accounting information: done
When I ran the below command to query what the partition table type of the above disk, it was listed as ‘loop’ . If I partitioned the disk using gpt partitioning scheme, it would have been listed as gpt
$ sudo parted /dev/sdc print
Model: ATA WDC WD141KFGX-68 (scsi)
Disk /dev/sda: 14.0TB
Sector size (logical/physical): 512B/4096B
Partition Table: loop ----------------------------------> here
Disk Flags:
Number Start End Size File system Name Flags
1 1049kB 14.0TB 14.0TB primary
I was in a rush and I ended up formatting all the HDDs like above. Now, after 1 month, the filesystems created like above seem to be OK.
But, could this (creating filesystems without partitioning the disks first) cause any performance or functional issues ?
I haven’t ‘farmed’ (equivalent term for mining in Chia world) any chia coins yet despite farming for 1 month. It may or may not be related how my Hard drives are formatted in the weird manner as mentioned above.
But, I wish Linux errored out when I ran $ sudo mkfs.ext4 /dev/sdc
and forced me to partition the disks first.