Skip to contentSkip to conversation

Non 512 byte sectors

linux-lvm Phillip Susi 3 participants 6 messages Dec 13, 2012 – Dec 14, 2012

lore
Share & tools
lore
#0 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Is it possible to get dm to report > 512 byte sector size? If so, how?

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (MingW32)
Comment: Using GnuPG with undefined - http://www.enigmail.net/

iQEcBAEBAgAGBQJQyfLWAAoJEJrBOlT6nu75G/IH/iJyXFY8FFlsspq3ivlFty0s MtR9bfGJYOHftz5noYlcwX99Mjd45fTIScMMKXEPxts8MTXobdiNgOY0PFOH2YSx uxXgHn/ssoD4vbAv7dhQZf7I+P1aZaFhc4BJWvuLEhVnj5SFIo93Dvkdk1r2Sb0K qQ4LSt/5zFhlmLOaUBgXsljbMDdeB28Ny/7ns/WzV6O+ixL23IJNydfryMCxlC8v 5TbwFEwm/FvMzbNwDv5xJGPYla47q/DpUm+B4NKy8n501bpRuEEMBpTrRbWdAhxr GnlhsSwAVO1jqqgoiotOMYNQvzEpdzXUck+UMxIyN7+PmQ2HpZB4XDIrZj0I7bs= =qrkW
-----END PGP SIGNATURE-----

#1 lore raw

On 12/13/2012 10:23 AM, Phillip Susi expounded in part:

Quoted 6 lines

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Is it possible to get dm to report > 512 byte sector size? If so, how?

blockdev --getss /dev/vg/lv (or any other block device)

That is probably logical sector size, however. The only way I know to get physical sector size is:

hdparm -I /dev/sda

which reports logical and physical sector size. Some WD devices are known to lie about physical sector size, however.

If you always align stuff to 4096, there won't be a problem. In fact, new technology tends to have much larger alignment requirements for optimum performance - say 128k, the size of an erase block, or 64k for a RAID chunk size. So aligning everything to 1M should hold you for a while.

#2 lore raw
In reply to Phillip Susi
Quoted 4 lines · Phillip Susi

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Is it possible to get dm to report > 512 byte sector size? If so, how?

DM will automatically stack the physical and logical sector sizes based on the devices that are assembled into the DM device.

So if you create an LV on a 4K device the associated DM device will report the same physical and logical block size. You can verify as much by looking at:

/sys/block/dm-X/queue/physical_block_size
/sys/block/dm-X/queue/logical_block_size

There are more details about IO limits stacking here:
http://people.redhat.com/msnitzer/docs/io-limits.txt

#3 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 10 lines · Mike Snitzer
Quoted 4 lines · Phillip Susi

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1

Is it possible to get dm to report > 512 byte sector size? If so, how?

DM will automatically stack the physical and logical sector sizes based on the devices that are assembled into the DM device.

Yes, but what if I am using two physical disks with 512 byte sectors, but want the dm to appear to have 2048 byte sectors?

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (MingW32)
Comment: Using GnuPG with undefined - http://www.enigmail.net/

iQEcBAEBAgAGBQJQy4R3AAoJEJrBOlT6nu75GM0H/i0g4eBfeN46t7vbtpT+r4OD mFCBtQbxOnfkfQ8IkPZ38Hsy1iH/Hz+Rp9EwImr0hLLj2VzsbUIuyvVNQ4gJAiev klU0runpVGCXb78QJMij98w4fgcadakpsdS6YYfHjk9jsTJnIsAH/cLNNvhIA00h GPUSGklLmjyoGdb7EaN2XpzSgoDvBTgjnuLN29cAI64N0CawuHttwZF+aicS59I4 uDxfSGe/7Za0K7+dWsVqqqjcup8eGouhVX94bGG2NdZTt+hQFDj9UQm5zQrjiqpn MMIqBbi1s3SqlHPzDomhD1pAMDkT6wwXin+ERt5FXudHnf9FqiEe4g0xLJ8CkTs= =UlfN
-----END PGP SIGNATURE-----

#4 lore raw
Quoted 9 lines · Phillip Susi

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 5 lines · Mike Snitzer
Quoted 2 lines · Phillip Susi

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1

Quoted 8 lines
Quoted 5 lines
Quoted 2 lines

Is it possible to get dm to report > 512 byte sector size? If so, how?

DM will automatically stack the physical and logical sector sizes based on the devices that are assembled into the DM device.

Yes, but what if I am using two physical disks with 512 byte sectors, but want the dm to appear to have 2048 byte sectors?

DM has no role in fabricating devices with artificial limits. What do you hope to accomplish with this?

#5 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 2 lines · Mike Snitzer

DM has no role in fabricating devices with artificial limits. What do you hope to accomplish with this?

I am trying to fix dmraid on pdc arrays that are > 2TB. It seems that pdc has the virtual disk use a larger sector size so that you can partition it with MBR.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (MingW32)
Comment: Using GnuPG with undefined - http://www.enigmail.net/

iQEcBAEBAgAGBQJQy6KOAAoJEJrBOlT6nu752aYH/Ax4h69oPwncDf4YGCheE9KQ WpVV5koPqaUkBd2hrB6Uj6XPjxl+ohr7amiT8w+KRfvKZcOGnWXJUre3cY/DbqBv 8nPL6aD5e2IRMPP1zVf4kaeVDc2FGEcT1GYcS7pmYZQjBxTJYS6a6zsYjkrfpNvZ l6k/Jvyfn/0zOHDWJ6w1FFO5u83vArva6hvY0HcwhZMUuTP3+U2fH/vge+GhQQWE +TD8Bv6fcjl7mZsF7dwKGUjZkPaFQ6yxnDALYiUw7O0tjtwnHf+3HAsAjCeYo7Nm L2TSjtHuAVd6ddpLMEO2SUNLcM1oropgaXL4Fuj2aoAhLjKWAgQtTOQ9dtjsWfM= =bn9p
-----END PGP SIGNATURE-----