Linux disk block size...help please
Any guru here know about Linux disk block size setting? i assume it should be 512bytes, but no command that I know can list that value out. also puzzled by the block size of fdisk partition (fdisk -l), is that that block size is the actual block size? as for fdisk, block size= unit size / 1024, unit size=512 * sector * sector per track, sometimes this size can be some weird number such as 504 bytes.
thanks for help and input in any form.
the output from linux raid is also in blocks, is this block same as the block in fdisk output? (cat /proc/mdstat)
thanks for reply, just want to deep further....
thanks...your message really helps, thanks, just to clear more doubt as i can not get anyone so familiar with linux around me... :lol: .
before this project, i always thought "block size" refer to file system block size, but now seems it is not really, it also used to describe device (or partition) size (with no file system mount /build on it), all device size output is in blocks, (e.g /proc/partitions or sfdisk -s ), also there are those funny rounding up or down (e.g 80293+, 265072+), which i felt would not accurately reflect the actual disk size.
yes, i am using C, look at function such as ioctl and stat (thanks for your input), but i want to know the linux internal mechanism before writing the code.
i think df can not be used if there is not file system, isn't it? just have a test on my system and output sounds weird.
thanks, but want to make this issue crystal clear.
Originally Posted by Dolda2000
I was wondering about data sizes, was working with an iomega hdd
I was wondering about data sizes, was working with an iomega hdd.
It is a network drive that the network component crapped out on it.
I removed the drive from the case, connected to a USB case and attempted to read it in Windows with no luck. I then plugged it into to a virtual version of Ubuntu.
I was able to read data but not copy it to another drive.
I tried sharing the drive on ubuntu but after ten times with Ubuntu not being able to download files to make Samba work I gave up and ordered another iomega drive with the same model number. Hopefully I can get the almost one terabyte of data off it.