Why LVM?
David Christensen [2024-04-08 11:28:04] wrote:
Why LVM?
Personally, I've been using LVM everywhere I can (i.e. everywhere
except on my OpenWRT router, tho I've also used LVM there back when my
router had an HDD. I also use LVM on my 2GB USB rescue image).
To me the question is rather the reverse: why not?
I basically see it as a more flexible form of partitioning.
Even in the worst cases where I have a single LV volume, I appreciate
the fact that it forces me to name things, isolating me from issue
linked to predicting the name of the device and the issues that plague
UUIDs (the fact they're hard to remember, and that they're a bit too magical/hidden for my taste, so they sometimes change when I don't want
them to and vice versa).
Stefan
If I have a hot-pluggable device (SD card, USB drive, hot-plug SATA/SAS
drive and rack, etc.), can I put LVM on it such that when the device is connected to a Debian system with a graphical desktop (I use Xfce) an icon
is displayed on the desktop that I can interact with to display the file systems in my file manager (Thunar)?
If I have a hot-pluggable device (SD card, USB drive, hot-plug SATA/SAS
drive and rack, etc.), can I put LVM on it such that when the device is
connected to a Debian system with a graphical desktop (I use Xfce) an icon >> is displayed on the desktop that I can interact with to display the file
systems in my file manager (Thunar)?
In the past: definitely not. Currently: no idea.
I suspect not, because I think the behavior on disconnection is still
poor (you want to be extra careful to deactivate all the volumes on the
drive *before* removing it, otherwise they tend to linger "for ever").
I guess that's one area where partitions are still significantly better
than LVM.
Stefan "who doesn't use much hot-plugging of mass storage"
I can only recommend you to read carefully the Wiki: https://raid.wiki.kernel.org/index.php/Dm-integrity
Having /boot on a LVM non enabled dm-integrity logical volume does not
work either, as soon as there is ANY LVM dm-integrity enabled logical
volume anywhere (even not linked to booting), grub2 complains (at boot
time or at update-grub) about the rimage LV.
I will try this work-around and report back here. As I said, I can
live with /boot on RAID without dm-integrity, as long as the rest can be dm-integrity+raid protected.
metadata tags to some PVs prevented grub from assembling them,
I will try this work-around and report back here. As I said, I can
live with /boot on RAID without dm-integrity, as long as the rest can be dm-integrity+raid protected.
I found this [1], quoting: "I'd also like to share an issue I've
discovered: if /boot's partition is a LV, then there must not be a raidintegrity LV anywhere before that LV inside the same VG. Otherwise, update-grub will show an error (disk `lvmid/.../...' not found) and GRUB cannot boot. So it's best if you put /boot into its own VG. (PS: Errors
like unknown node '..._rimage_0 can be ignored.)"
Hmm... I've been using a "plain old partition" for /boot (with
everything else in LVM) for "ever", originally because the boot loader
was not able to read LVM, and later out of habit. I was thinking of
finally moving /boot into an LV to make things simpler, but I see that
it'd still be playing with fire
(AFAICT booting off of LVM was still not
supported by U-Boot either last time I checked). ????
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 307 |
Nodes: | 16 (2 / 14) |
Uptime: | 108:16:09 |
Calls: | 6,852 |
Calls today: | 3 |
Files: | 12,355 |
Messages: | 5,416,059 |