Answer the question
In order to leave comments, you need to log in
How to specify the cluster size when creating a file system?
Hello everybody! When creating a file system, for example, in windows fat32, you can specify the cluster size when formatting. For example 4kb. How to do it in linux? Maybe there is some parameter in mkfs? I did not find such settings in gparted.
For example, in the ext4 file system, btrfs, xfs, f2fs, etc.
Answer the question
In order to leave comments, you need to log in
Maybe there is some parameter in mkfs?
man mkfs.ext4:
OPTIONS
-b block-size
Specify the size of blocks in bytes. Valid block-size values
are 1024, 2048 and 4096 bytes per block. If omitted, block-size
is heuristically determined by the filesystem size and the
expected usage of the filesystem (see the -T option). If block-
size is preceded by a negative sign ('-'), then mke2fs will use
heuristics to determine the appropriate block size, with the
constraint that the block size will be at least block-size
bytes. This is useful for certain hardware devices which
require that the blocksize be a multiple of 2k.
-C cluster-size
Specify the size of cluster in bytes for filesystems using the bigalloc feature. Valid cluster-size values are from 2048 to 256M bytes per cluster. This can only be specified if the bigalloc feature is enabled. (See the ext4 (5) man page for more details about bigalloc.) The default cluster size if bigalloc is enabled is 16 times the block size. -O bigalloc
man mkfs.ext4
-C cluster-size
Specify the size of cluster in bytes for filesystems using the bigalloc feature. Valid cluster-size values are from 2048 to 256M bytes per cluster. This can only be specified if the bigalloc feature is enabled. (See the ext4 (5) man page for more details about bigalloc.) The default cluster size if bigalloc is enabled is 16 times the block size.
-b block-size
Specify the size of blocks in bytes. Valid block-size values are 1024, 2048 and 4096 bytes per block. If omitted, block-size is heuristically determined by the filesystem size and the expected usage of the filesystem (see the -T option). If block-size is preceded by a negative sign ('-'), then mke2fs will use heuristics to determine the appropriate block size, with the constraint that the block size will be at least block-size bytes. This is useful for certain hardware devices which require that the blocksize be a multiple of 2k.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question