User Tools

Site Tools


docs:tips_n_tricks:luks.html

This is an old revision of the document!


LUKS

Resize an encrypted LV managed by cryptsetup

While it is seems to be quiet obvious for most people 1) how to resize any stack of LUKS, ext2,3,4, LVM, MSDOS or GPT partitions, it becomes strange if you're using Ubuntus package cryptsetup 2)

~ # lvresize -L 22.5G /dev/vg_sys/lv_home
~ # cryptsetup resize home
~ # resize2fs /dev/mapper/home
resize2fs 1.42.10 (18-May-2014)
resize2fs: Device or resource busy while trying to open /dev/mapper/home
Couldn't find valid filesystem superblock.
~ # mount | fgrep home  
/dev/mapper/home_unformatted on /home type ext3 (rw,relatime,data=ordered)
~ # resize2fs /dev/mapper/home_unformatted
resize2fs 1.42.10 (18-May-2014)
open: No such file or directory while opening /dev/mapper/home_unformatted
~ #

The remedy is simple:

dmsetup rename home home_unformatted
resize2fs /dev/mapper/home_unformatted
dmsetup rename home_unformatted home 

Linux LVM LUKS cryptsetup resize2fs

Gnome Keyring

Not exactly LUKS related, but shows up in the context

Reset LUKS password accidently stored "forever"

Change default answer to LUKS password question (e.g.) in Thunar

2)
Meaning, if you are using /etc/crypttab and cryptdisks_(start|stop) for automatic handling of mounts
docs/tips_n_tricks/luks.html.1649014365.txt.gz · Last modified: 03.04.2022 21:32 CEST by peter

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki