Snapshot of LVM logical volume - a brief howto

Recently, after an OS updated and rebooted, I was not able to login to the desktop environment. When that happened, I thought to myself, “I wish I could just do a quick EBS snapshot like I would on the cloud before running any OS updates.” On my Linux desktop, the root volume is an LVM volume, I knew that snapshot was possible, but never tried to create one before. A friend at work encouraged that I should make use of it, and it was not that hard to get started. Well, let’s see how it goes as I’m about to explore how LVM snapshot works on my desktop. ...

July 26, 2024 · 3 min · 491 words · kenno

Deleting old LVM devices file PVID <ID> last seen not found

On one of my servers, I used to have a storage device, /dev/sdb, attached to it. That storage was used as an LVM physical volume. It has later been removed, and now I just noticed the following message: [root@banan ~]# lvs Devices file PVID CuDRE3nMN5FMNqYLViHrnE1D7OFDlbX6 last seen on /dev/sdb not found. LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert root almalinux -wi-ao---- <28.40g swap almalinux -wi-ao---- 2.01g Based some research found online, there could be outdated device entries in the device files located in /etc/lvm/devices/system.devices. ...

October 26, 2023 · 2 min · 275 words · kenno

Resizing an LVM logical volume

One of the logical volumes on my desktop is running out of space. I want to add 200GB to that volume. Here is one way to achieve this task. First a bit of warning. Don’t, or never, just copy and paste what you see here if you want to apply it to your own system. You may accidentally destroy your precious data. # lvs LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert backup data -wi-ao---- 200.00g scratch data -wi-ao---- 1.00t home system -wi-ao---- 90.00g root system -wi-ao---- 100.00g swap system -wi-ao---- 16.00g tmp system -wi-a----- 4.00g var system -wi-ao---- 20.00g Let’s check the available disk space of volume groups we can use: ...

July 20, 2016 · 2 min · 253 words · kenno