Hi there,
I seem to have some problems involving my LVM setup and hope I can get some advice on this list.
I have a rather simple setup. One PV (on a RAID1-MD-Device), one VG, 3 LVs and one thin pool that holds my Linux Containers (LXD). These container volumes are created directly by LXD.
Yesterday, I noticed that my backups are no longer working. In order to backup the containers, I used to do the following:
1. Make a snapshot of the container using LXD. This creates a LV snapshot.
2. Mount the snapshot.
3. Use the mount for backing up all files
4. Unmount, delete snapshot.
I remember this used to work fine. So I tried doing this step by step and already failed at the second step. I could not mount the snapshot because it never got even created as a device in /dev/mapper.
I thought that maybe something changed in LXD and that I had to forcefully activate the snapshot. I then tried something with the -Ky flag but nothing really worked. And after I rebooted the server, all of a sudden all volumes were inactive.
With the help of a couple of internet guides, in particular this one:
LVM Transaction ID mismatch and metadata resize error – Monotok, I managed to get everything working again. So the system is booting fine, the containers too. I can even mount the containers fine.
But something is still very wrong. For example, I tried to resize one of the thin LVs from 10G to 20G with automatic resizing of the FS. While the LV resizing seems to have worked fine, the FSresize did not.
This is how it looks when I try to run resize2fs on one of the containers
# resize2fs /dev/vg0/containers_cont1
resize2fs 1.44.1 (24-Mar-2018)
resize2fs: Device or resource busy while trying to open /dev/vg0/containers_cont1
Couldn't find valid filesystem superblock.
resize2fs 1.44.1 (24-Mar-2018)
resize2fs: Device or resource busy while trying to open /dev/vg0/containers_cont1
Couldn't find valid filesystem superblock.
Here's the output of running fdisk on the volume
# fdisk /dev/mapper/vg0-containers_cont
Welcome to fdisk (util-linux 2.31.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
The old ext4 signature will be removed by a write command.
Device does not contain a recognized partition table.
Created a new DOS disklabel with disk identifier 0x174c0f1c.
Welcome to fdisk (util-linux 2.31.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
The old ext4 signature will be removed by a write command.
Device does not contain a recognized partition table.
Created a new DOS disklabel with disk identifier 0x174c0f1c.
It clearly looks like something is wrong. One of the steps I had to take when following the guide mentioned above is to backup the vg and change the id of the thin pool to another value. Maybe this messed up something else.
Though I am confused that things overall seem to work. lsblk -f recognizes the filesystem in the thin volumes, I can mount them, I can work with them. But I cannot resize them and I cannot seem to create snapshots successfully. If I do and mount them, they are empty.
Any pointers would be much appreciated.
Thanks,
Viktor
_______________________________________________ linux-lvm mailing list linux-lvm@xxxxxxxxxx https://listman.redhat.com/mailman/listinfo/linux-lvm read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/