Rich Freeman on 26 Nov 2016 17:22:16 -0800

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

Re: [PLUG] Repairing an LVM volume

On Sat, Nov 26, 2016 at 8:02 PM, Eric H. Johnson
<> wrote:
> I have an Ubuntu 16.04 machine that has a problem with the file system and
> will not boot to Linux, but shells out into initramfs. It is an encrypted
> LVM volume. If I boot from a thumb drive, I can mount the volume and all
> files seem to be present. I can also run fsck –n /dev/mapper/Ubuntu—vg-root,
> which will show the problems with the drive. However to fix the problems
> requires that the drive be unmounted. How do I run fsck against an unmounted
> encrypted LVM volume? I tried fsck –r /dev/sda5, but that just comes back
> telling me where fsck is located.

You would need to run it against the logical volume, not the physical
volume.  Run lvs and see if the volume is active.  Hopefully when you
unmount it your distro doesn't just deactivate the logical volume.

I believe the logical volume device will behave as an unencrypted device.

Disclaimer: I've used encrypted logical volumes, but never with LUKS,
so I couldn't tell you offhand how most distros set up their tooling
around it.

Philadelphia Linux Users Group         --
Announcements -
General Discussion  --