Re: growing a luks volume: how to fill it with random data

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



A rather dirty but more straighforward way could be:

create an additional logical volume using all free extend.
Fill it with random data
release the extends again and grow the actual volume ...

Aside from that, afaik the lvm metadata is in the beginning of the partition, so yes, if you are sure the extends are consecutive you could find the right offset and just fill the area linear. But it might be a little too risky.

Regards

-Sven


Wolfgang Sailer schrieb:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Dear all!

It is generally recommended good practice to fill a device with /dev/urandom
before creating a LUKS encrypted device upon it. Fine, understood.

But how to do it in the following situation:
When I enlarge a LUKS volume, say by expanding the RAID or enlarging the
logvol (LVM partition) that hosts the LUKS volume, how can I then fill the
additional space with random data before enlarging the LUKS volume?

If the size before enlargement is x blocks can I then just
dd if=/dev/urandom of=/dev/logvol seek=x
?

How to make damn sure that dd starts at the right position and not before?

Should one refrain from filling the additional space?
Is there a parameter in "cryptsetup resize" that perhaps does the work for
me, like:
sudo cryptsetup --verbose --fill-with-dev-urandom resize LUKSNAME

regards, Wolfgang
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.1 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFJ6HiaR6b2EdogPFsRAusTAKCSVo9qKWlkKOHw4utxYxNtU7TpuACfZIxe
dQcYYiqfRgdbfE5OAh5DgfI=
=DEUy
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
dm-crypt mailing list - http://www.saout.de/misc/dm-crypt/
To unsubscribe, e-mail: dm-crypt-unsubscribe@xxxxxxxx
For additional commands, e-mail: dm-crypt-help@xxxxxxxx



---------------------------------------------------------------------
dm-crypt mailing list - http://www.saout.de/misc/dm-crypt/
To unsubscribe, e-mail: dm-crypt-unsubscribe@xxxxxxxx
For additional commands, e-mail: dm-crypt-help@xxxxxxxx


[Index of Archives]     [Device Mapper Devel]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite News]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux