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....

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....

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

LVM - How to Activate or Deactivate a Volume Group

Well, I hardly need to activate or deactivate LVM volume groups. But when I do, I also hardly remember the command required to do that. So hopefully, I can refer to this post should I need to perform one of these tasks in the future. Since a volume group is activated by default when it is created, let’s start with a command to deactivate it. # vgchange -a n example_volume_group Like wise, to activate a volume group, use the following command:...

February 3, 2022 · 1 min · 114 words · kenno

Resizing KVM qcow2 Image

I’m quite sure I’d resized qcow2 images before. However, when I needed to resize an image today for my VM at home, I totally forgot about it. Well, this means it’s a good excuse for me to just write down a few commands to help me in the future. If you try to follow a long, two things you wanna keep in in mind: do it at your own risk, and always backup your data before you make change to it....

December 25, 2021 · 5 min · 902 words · kenno

LVM Device Blah Excluded by Filter

If you use LVM frequently enough, especially when re-using existing disks, you might come a cross a problem when you’re unable to create a physical volume from that disk. For example, here is what I encountered today when I tried to create a physical volume on a device called /dev/sdb. [root@db3 ~]# pvcreate /dev/sdb Device /dev/sdb excluded by a filter. I’m sure I haven’t had any filters in /etc/lvm/lvm.conf. To fix this, I needed to wipe the signature from this device with wipefs command....

June 18, 2021 · 1 min · 169 words · kenno

Blacklisting Local Disk from Multipath

In my previous post, I wrote about my quest to identify a disk presented by the Dell server itself. At the end of the post, I mentioned that I should be able to resume with creating a LVM volume on the new disk. LVM stands for Logical Volume Management. There is a good tutorial available at this page if you’re interested in – How To Use LVM To Manage Storage Devices on Ubuntu 16....

January 28, 2018 · 3 min · 474 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....

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

Managing LVM

LVM stands for Logical Volume Manager. It is a tool for logical volume management allowing us to allocate disks, strip, mirror and resize logical volumes. With LVM, we can manage partitions dynamically. Recently at work, we opted to use LVM to create logical partitions instead of physical partition on Linux desktop. This post is just a note to remind me of some common used commands. If you want to learn more about LVM, hit this link instead....

July 4, 2014 · 2 min · 394 words · kenno