On Sun, Mar 15, 2015 at 7:34 PM, Chris Murphy
I got the wrong commit, it's this one from e2fsprogs 1.41.12 "When mke2fs is ratcheting down the blocksize for small filesystems, or when a blocksize is specified on the commandline, we should not willingly go below the physical sector size of the device." http://git.kernel.org/cgit/fs/ext2/e2fsprogs.git/commit/?id=bb1158b92ed8a12a...
I tried this on a 1 TiB external drive and e2fsprogs wrongly detected the drive as having a physical sector size of 512 bytes. By using the commit you accidentally referred to earlier, forcing e2fsprogs to see the drive as having a 4 KiB physical sector size did indeed force a 100 MiB partition to be created with a 4 KiB block size. So this commit does indeed seem to work as intended.
Also, the release notes for e2fsprogs 1.41.10 (February 10, 2010) says it will warn at mkfs time if there's misalignment. http://git.kernel.org/cgit/fs/ext2/e2fsprogs.git/commit/?id=ecced2c3586fed83...
With the 4 KiB physical sector size being forced by the MKE2FS_DEVICE_SECTSIZE environment variable, no warning was received when a filesystem was created on a misaligned partition. I have a feeling though that this check might not be respecting the environment variable, so it would probably be useful if someone could verify this on an internal Advanced Format drive that is properly reported by e2fsprogs. These tests were conducted on a RHEL 6 machine with a version of e2fsprogs with the above mentioned commits. Brandon Vincent -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org