thanks pal, so the output of "block" for fdisk would have nothing to do with block size in general term? just wonder if there is any command to list out device block size (for device with no file system sitting on top of it, i.e, dumpe2fs can not be used to product output).
i am working on a project to compute the acutal disk usage, but just can not find a firm definition on this....like to learn more from you. thanks...
sample output from RAID device of my server (size in blocks, and seems the block size here have some relationship with the block number listed by fdisk)
----------------------------------------------------------------------
Personalities : [linear] [raid0] [raid1] [raid5]
read_ahead 1024 sectors
Event: 5
md4 : active raid5 hdb16[2] hdb15[1] hdb1[0]
1606272 blocks level 5, 4k chunk, algorithm 0 [3/3] [UUU]
md3 : active raid5 hdb14[3] lvmb[2] hdb2[1] lvma[0]
1240896 blocks level 4, 4k chunk, algorithm 0 [4/4] [UUUU]
md2 : active raid1 hdb4[1] hdb5[0]
803136 blocks [2/2] [UU]
md1 : active raid0 hdb6[1] hdb7[0]
1606272 blocks 4k chunks
md0 : active linear hdb8[1] hdb9[0]
1606272 blocks 32k rounding
sample output from fdisk -l of my server
----------------------------------------
fdisk -l
fdisk -l
Disk /dev/hda: 6448 MB, 6448619520 bytes
255 heads, 63 sectors/track, 784 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/hda1 1 81 650601 83 Linux
/dev/hda2 82 146 522112+ 82 Linux swap
/dev/hda3 147 537 3140707+ 83 Linux
/dev/hda4 * 538 784 1984027+ 83 Linux
Disk /dev/hdb: 15.3 GB, 15393079296 bytes
255 heads, 63 sectors/track, 1871 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/hdb1 1 100 803218+ 83 Linux
/dev/hdb2 101 200 803250 83 Linux
/dev/hdb3 201 1770 12611025 5 Extended
/dev/hdb4 1771 1871 811282+ 83 Linux
/dev/hdb5 201 300 803218+ 83 Linux
/dev/hdb6 301 400 803218+ 83 Linux
/dev/hdb7 401 500 803218+ 83 Linux
/dev/hdb8 501 600 803218+ 83 Linux
/dev/hdb9 601 700 803218+ 83 Linux
/dev/hdb10 800 900 811282+ 8e Linux LVM
/dev/hdb11 701 799 795154+ 8e Linux LVM
/dev/hdb12 901 1000 803218+ 8e Linux LVM
/dev/hdb13 1001 1100 803218+ 8e Linux LVM
/dev/hdb14 1101 1200 803218+ 8e Linux LVM
/dev/hdb15 1201 1300 803218+ 8e Linux LVM
/dev/hdb16 1301 1770 3775243+ 8e Linux LVM
Quote:
|
Originally Posted by Dolda2000 Any time Linux refers to block size, it is almost always 1024 bytes - Linux uses 1024-byte blocks as its primitive units for the buffer cache and everything The only times it isn't is in filesystem-specific drivers, since some filesystems use other granularities (for example, on a normal-sized ext3 filesystem, the filesystem block size is usually 4096 bytes). However, you almost never get to see the filesystem block size; almost the only way to actually see it is to be a kernel hacker or run programs like dumpe2fs.
What you are referring to with fdisk isn't actually a "block" size, but a cylinder size. A "cylinder" is the primitive unit of the standard PC partition table, and you will never ever have to worry about it except when you are using fdisk (it comes from the old bad days, before IDE hard drives, when the BIOS had to work with disk cylinders). |