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

Re: add disk to LVM



> What would be the way to do that using LVM ?

I think you already had the answers you need, but I'll just point out
that it is possible to use LVM on a "removable" disk (a disk which you
sometimes take out of a machine to put into another), and as a matter of
fact, it would make a fair bit of sense in several situations.

Sadly, currently the LVM tools don't support doing this very well if you
intend to do it without rebooting the machine: it's pretty easy to
connect a disk with an LVM VG on it and start using it (you just need
to do an "LVM scan" beforehand, but that's cheap and can be automated
without too much trouble) and it's not too hard to "unregister" the LVM
structures before disconnecting the disk either (basically
`vgchange -an` usually does the trick), but AFAIK there is standard
support for doing those things for you currently (and if you forget to
`vgchange -an` before you disconnect the disk then you end up with
stale LVM structures which can become quite annoying and can prevent
you from accessing that drive from that machine until you reboot it).

Maybe it's time people start reporting these hurdles as bugs and provide
patches to `pmount`, `systemd.mount`, etc...
So we can start using LVM as the "standard" partitioning mechanism for
GNU/Linux.


        Stefan


Reply to: