Re: dm-integrity: estimate the size needed for separate integrity device
Thorsten Glaser <[email protected]> Fri, 10 Jul 2026 19:27:17 +0200 (CEST)
| Newsgroups | dev.linux.lists.cryptsetup |
|---|---|
| Message-ID | <[email protected]> |
Hi Ma, >But I'm not sure what size each "integrity tags" partition should be, >depending on the data device. I=E2=80=99ve wondered the same. I extracted some code from the Linux 5.10 kernel (as that=E2=80=99s what I= =E2=80=99m using on bullseye) to estimate that, once for an already created split-setup device (if you create it too large and want to shrink) and once before creating. It assumes defaults for most parameters, but it does support tag size and sectors per block. Use at your own risk. https://codeberg.org/mirabilos/useful-scripts/src/branch/master/integrityse= tup Thankfully, the kernel refuses to set up the device if the partition is too small, so you can test. Here=E2=80=99s to hoping newer kernels/cryptsetup versions don=E2=80=99t br= eak it ;) bye, //mirabilos --=20 FWIW, I'm quite impressed with mksh interactively. I thought it was much *much* more bare bones. But it turns out it beats the living hell out of ksh93 in that respect. I'd even consider it for my daily use if I hadn't wasted half my life on my zsh setup. :-) -- Frank Terbeck in #!/bin/mksh