It is common to create a partition in order to create a filesystem.
Modern Linux fdisk
will do block alignment automatically, starting the partition at sector 2048
.
In this case the filesystem will also start at sector 2048
. Below is just an example.
fdisk -l /dev/nvme1n1
Disk /dev/nvme1n1: 5 GiB, 5368709120 bytes, 10485760 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xc14701c1
Device Boot Start End Sectors Size Id Type
/dev/nvme1n1p1 2048 10485759 10483712 5G 83 Linux
But it is also possible to create a filesystem directly on device, without any partition.
In tis situation, in which block the filesystem will start?
Will it start at sector 0
? If so, does it mean it is aligned by default?