See how to implement the linux file system block size
- 2020-05-12 06:42:52
- OfStack
On the linux system, you can use the command tune2fs, as tested below
[root@localhost test10g]# tune2fs -help
tune2fs 1.35 (28-Feb-2004)
tune2fs: invalid option -- h
Usage: tune2fs [-c max-mounts-count] [-e errors-behavior] [-g group]
[-i interval[d|m|w]] [-j] [-J journal-options]
[-l] [-s sparse-flag] [-m reserved-blocks-percent]
[-o [^]mount-options[,...]] [-r reserved-blocks-count]
[-u user] [-C mount-count] [-L volume-label] [-M last-mounted-dir]
[-O [^]feature[,...]] [-T last-check-time] [-U UUID] device
[root@localhost test10g]# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda2 8776068 7576504 753764 91% /
/dev/sda1 497829 16303 455824 4% /boot
none 517300 0 517300 0% /dev/shm
/dev/sda5 1035660 96452 886600 10% /tmp
[root@localhost test10g]# tune2fs -l /dev/sda1|grep Block
Block count: 514048
Block size: 1024
Blocks per group: 8192
[root@localhost test10g]# tune2fs -l /dev/sda2|grep Block
Block count: 2229018
Block size: 4096
Blocks per group: 32768
Above, Block size is the block size.
On the WINDOWS system, you can view it with the command fsutil and test it as follows:
C:\Documents and Settings\ct2
>
fsutil --help
--help is an invalid parameter.
-- supported commands --
behavior Controls file system behavior
dirty Manage the number of corrupted bits of the volume
file File specific command
fsinfo File system information
hardlink Hard link management
objectid object ID management
quota Quota management
reparsepoint Reanalysis point management
sparse Sparse file control
usn USN management
volume Volume management
C:\Documents and Settings\ct2>fsutil fsinfo ntfsinfo c:
NTFS Volume serial number : 0x72ccb5f2ccb5b129
version : 3.1
Area number : 0x0000000008ff8235
The total number of clusters : 0x00000000011ff046
Available cluster : 0x0000000000547b73
The total number of reserved : 0x0000000000000050
Number of bytes per sector : 512
Number of bytes per cluster : 4096
each FileRecord The number of bytes in a segment : 1024
each FileRecord The number of clusters : 0
Mft Effective data length : 0x0000000009cac000
Mft The starting Lcn : 0x00000000000c4df6
Mft2 The starting Lcn : 0x00000000008ff823
Mft Area starting : 0x0000000001067920
Mft Area at the end : 0x000000000108ce60
The number of cluster bytes above is the block size.
Note: the second extended file system (second Extended Filesystem,Ext2). Ext3 (third Extended Filesystem)
man fs
ext2 is the high performance disk filesystem used by Linux for fixed
disks as well as removable media. The second extended
filesystem was designed as an extension of the extended file
system (ext). ext2 offers the best performance (in terms of
speed and CPU usage) of the filesystems supported under Linux.
ext3 is a journaling version of the ext2 filesystem. It is easy to
switch back and forth between ext2 and ext3.
ext3 is a journaling version of the ext2 filesystem. ext3 offers the
most complete set of journaling options available among
journaling filesystems.