this post was submitted on 27 May 2026
13 points (100.0% liked)

Selfhosted

59675 readers
2167 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

  1. Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don't duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

  7. No low-effort posts. This is subjective and will largely be determined by the community member reports.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 3 years ago
MODERATORS
 

Operation:

  • sudo vgs: ubuntu-vg 1 1 0 wz--n- 462.69g 362.69g
  • df -T / : /dev/mapper/ubuntu--vg-ubuntu--lv ext4 102626232 24338224 73028744 25% /
  • sudo lvextend -l +100%FREE /dev/ubuntu-vg/ubuntu-lv
  • sudo resize2fs /dev/ubuntu-vg/ubuntu-lv

Never did this before on an encrypted drive. Is this the proper procedure? Obviously a complete image back up is in order, however, are there any gotchas, caveats, pitfalls that I should be aware of before proceeding?

you are viewing a single comment's thread
view the rest of the comments
[–] irmadlad@lemmy.world 1 points 1 week ago (1 children)

hmmmm...I thought that the command sudo lvextend -l +100%FREE /dev/ubuntu-vg/ubuntu-lv would extend the encrypted volume, and this command sudo resize2fs /dev/ubuntu-vg/ubuntu-lv would extend the filesystem.

[–] themachine@lemmy.world 2 points 1 week ago (1 children)

I realize now i may have been confused as you didn't specify everything.Is the LUKS volume created right on the disk on a raw partition?

[–] irmadlad@lemmy.world 1 points 1 week ago (2 children)

Is the LUKS volume created right on the disk on a raw partition?

Yes. I'm sorry for the confusion and incomplete info. I'm flying a little blind here. The first two commands in the OP were to check what I have, and the last two were to extend the LUKS and then the filesystem.

[–] themachine@lemmy.world 2 points 1 week ago (1 children)

I saw in another comment your lsblk output and yes I see the LUKS partition spans the whole disk.

So yes, the commands you listed should be sufficient. It will extend the decrypted logical volume to use the remaining free space of your volume group.

[–] irmadlad@lemmy.world 0 points 1 week ago (1 children)

Thank you very much for your patience in trying to tweeze out all the proper info out of me. I feel like a slightly educated dumbass now. LOL Thanks again.

[–] PumaStoleMyBluff@lemmy.world 2 points 1 week ago

You are aware that you don't have all the information and that trying it yourself could cost you significantly more time than asking for help. Doesn't sound like dumbass behavior to me :)

[–] i_am_not_a_robot@discuss.tchncs.de 0 points 1 week ago (1 children)

lv* commands are for LVM logical volumes. They're not related to LUKS. Unless your LVM "physical" volume is on a LUKS encrypted device, you aren't using LUKS. You'll need to make the LUKS encrypted PV larger before you can grow your LV.

Unless your PV is already taking up the whole disk, in which case whether it is LUKS encrypted or not is irrelevant and the question you want to be asking is "how do I resize my LVM LV to fill the rest of my LVM PV?", which is probably what the commands you have do.

[–] irmadlad@lemmy.world 1 points 1 week ago

how do I resize my LVM LV to fill the rest of my LVM PV

Again, apologies for my confusion and not being able to articulate coherently or precisely.