On Wed, Sep 14, 2022 at 1:40 AM Dale <rdalek1...@gmail.com> wrote: > > Now to replace my /home drive which is also close to full. It's not > encrypted tho. The biggest difference in this and plain LVM, resizing > with cryptsetup or close and reopen. Keep in mind, while I did all > this, LUKS, cryptsetup, whatever was open. I'm not sure about this > being done while closed. I did find one mention that it had to be open > at certain points. >
If you want to do operations on a DM volume, then it needs to exist, which in the cryptsetup world means "open." Most of the details of how to do an operation like moving around encrypted volumes depends on the layers you're using (LUKS, LVM, mdadm, whatever), and how they're stacked. If you're running LVM on top of LUKS then you create new LUKS volumes and add them to LVM and move stuff around. If you're running LUKS on top of LVM then you add unencrypted volumes to LVM, extend the LV underlying LUKS, and then resize the LUKS volume. Last comes resizing whatever filesystems are on top if desired. When you want to get advice around these kinds of operations it is usually necessary to detail exactly how things are set up, because to Linux they're just layers and you can stack them however you want. A script that adds a hard drive to your setup will look different if you're running mdadm on the bottom vs LUKS vs LVM and so on. Plus if you do things in the wrong order there is actually a chance that it will work and leave you with half your filesystem on an encrypted drive and half of it on an unencrypted one, or whatever. DM doesn't care - it just shuffles around blocks and transforms them as told, and as long as you stack things up the same way every time it should still work. It just won't necessarily be doing what you want it to... -- Rich