[dm-crypt] Re: Aligning entire LUKS/LVM/Ext4 filesystem stack to 4K sectors
Erwin van Londen <[email protected]> Thu, 25 Mar 2021 18:01:16 +1000
| Newsgroups | de.saout.dm-crypt |
|---|---|
| Message-ID | <5621b9d7e6e577a6388695cfa27d20fc3a2c8271.camel@erwinvanlonden.net> |
I think the quickest way to find out is: "lsblk -o name,phy-sec,log-sec" Output like this shows it nicely: [ monster % ~ ] lsblk -o name,phy-sec,log-sec [ 5:57PM ] NAME PHY-SEC LOG-SEC sda 512 512 ├─sda1 512 512 └─sda2 512 512 ├─vg_monster-lv_home 512 512 ├─vg_monster-lv_swap 512 512 └─vg_monster-lv_root 512 512 sdb 512 512 ├─sdb1 512 512 └─sdb2 512 512 Obviously playing around with the output parameters gives you plenty flexibility. Cheers Erwin On Wed, 2021-03-24 at 20:53 +0100, Johnny Dahlberg wrote: > > > On Fri, 19 Mar 2021 at 23:21, Carlos E. R. > <[email protected]> wrote: > > On 19/03/2021 22.39, Johnny Dahlberg wrote: > > > On 19/03/2021, Carlos E. R. <[email protected]> wrote: > > > > On 19/03/2021 21.24, Johnny Dahlberg wrote: > > > > > On 19/03/2021, Maksim Fomin <> wrote: > > > > > > > On Friday, 19 March 2021 г., 19:09, Johnny Dahlberg <> > > > > > > > wrote: > > > > > > > > ... > > > > > > > > Related question: > > > > > > > > How can one, on an exiting encrypted partition, find out what > > > > size is > > > > using each layer, and if they are aligned or not? > > > > > > > > I am using encrypted partitions on SSD and I'm a bit worried. > > > > > > > > > > > > > > Hello Carlos! > > > > > > First you would check the physical sector size of your SSD. It is > > > most > > > likely 4096 bytes (4K). You can check this by doing: > > > > > > cat /sys/block/(the parent device such as > > > nvme0n1)/queue/physical_block_size > > > > On the two machines I have running now, both have an nvme system > > disk, > > but only one has the encrypted partition on it; both use 512: > > > > cer@Telcontar:~> cat /sys/block/nvme0n1/queue/physical_block_size > > 512 > > cer@Telcontar:~> > > > > Isengard:~ # cat /sys/block/sda/queue/physical_block_size > > 512 > > Isengard:~ # > > > > Hum! > > > > > Since January 2011, all manufacturers began using Advanced Format > (4096 bytes): https://en.m.wikipedia.org/wiki/Advanced_Format#History > > From what I can find online, your Samsung 970 Evo Plus uses 8K > sectors physically. > > > > > I think I'm good - no worries :-) > > > > Thanks! :-) > > > > _______________________________________________ > > dm-crypt mailing list -- [email protected] > > To unsubscribe send an email to [email protected] _______________________________________________ dm-crypt mailing list -- [email protected] To unsubscribe send an email to [email protected]