Thursday, November 27, 2014

hard drive - Is it possible for the filesystem's logical block size to be less than the physical sector size?

Let's say we have a block device (eg. Hard Drive) with 4096 bytes sector size and no 512 bytes emulation is available (The hard drive only understands units of 4096 bytes size).


Is is possible to format the device with a file system which has a logical block of 512 bytes ? How will the fs use the disk blocks ? I mean is it just going to use 512 bytes out of the 4096 bytes and the rest is wasted (one to one mapping between disk sectors and fs blocks) ? I assume if the file system knows about this issue he can make some kind of 512-bytes emulation by itself (read disk sector, modify a portion of 512 bytes in RAM then write back sector to disk) although there will be some overhead or redundant work at every write. I'm not really sure if that makes any sense ! Correct me please.

No comments:

Post a Comment

linux - How to SSH to ec2 instance in VPC private subnet via NAT server

I have created a VPC in aws with a public subnet and a private subnet. The private subnet does not have direct access to external network. S...