I have two hard drives (250G, and 150G) taken out from laptops, and can attach them to my computer using SATA/USB adapter. (I don't have an enclosure case, and what tools do you think are the best to access the hard drives, enclosure case, SATA/USB adapter, RAID, NAS?)

I would like to use them as backup devices. Each of them is a bootable disk, and has at least two partitions (one for / and one for /home).

Is it a good idea to create PVs, VGs, and LVs on them using LVM?

If yes, is it the same process of create PVs, VGs, and LVs on a hard drive inside a computer? For example:

  • Is it better to create a single PV per hard drive, and then a single VG per hard drive or a VG on the two hard drives?

  • After creating PVs, VGs, and LVs on them, do I need to vgexport them before detaching them from my computer?

  • When I want to reattach them to my computer, do I need to vgimport them?


closed as primarily opinion-based by Jeff Schaller, Stephen Harris, jimmij, Mr Shunz, Haxiel Feb 27 at 9:04

Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 3
    Tim, you know -- "is it a good idea" and "is it better" attracts opinions. – Jeff Schaller Feb 26 at 14:08
  • The question would do better without digressing into enclosure case brands. – Rui F Ribeiro Feb 26 at 14:10
  • The second comment would do better without misinterpreting my questions into enclosure case brands. I only know my posts attract bullies and the first comment encourages that. – Tim Feb 26 at 14:18
  • See man7.org/linux/man-pages/man7/lvmsystemid.7.html to know what does "export" and "import" mean. Nobody knows what "connect to" means – 炸鱼薯条德里克 Feb 26 at 14:18
  • Tim, I'm just trying to guide your question into something that doesn't get closed -- so you can get an Answer. I see that you're actively editing the question, and I have not yet voted on it in any way (up/down/close). – Jeff Schaller Feb 26 at 14:23

How shall I create PVs, VGs an LVs on external hard drives?

In my opinion you shouldn’t. LVM is useful because it allows volumes to be resized, created, removed, and snapshotted easily; none of these are particularly useful on removable volumes, where typical usage patterns involve a single partition occupying all the available space. In addition, LVM introduces ownership and namespace constraints which make it harder to share a volume between multiple computers (involving exports and imports as you mention). Removable devices with traditional partitions are easy to use in current desktop environments and across multiple operating systems; removable devices with LVM involve extra steps which have to be dealt with manually in most cases. This becomes particularly troublesome when removable devices are used in stressful situations (data recovery etc.).

(I realise this goes against some of my previous advice; I had forgotten about external devices when I said that I used LVM everywhere.)

  • Thanks. I now have used LVM on most part of a boot disk in a laptop, except a EFI partition. If one day I need to take it out of the laptop, what do I need to do (e.g. vgexport) before take it out? If I need to reattach it to a computer, what do I need to do (e.g. vgimport) after that? – Tim Feb 26 at 20:21
  • That’s a different question. – Stephen Kitt Feb 26 at 20:29

This is an opinion, but for drives you plan on treating as removable then I would not use LVM at all. Just stick with partitions.

I use LVM for situations where I might want to dynamically create or resize volumes. So on my virtual server host I can create a new virtual machine with the virtual hard disk being a newly created logical volume. If my backup partition fills up then I can extend the LV associated with it and resize the filesystem.

But a disk that I might plugin, do work, unmount, unplug... that I just use standard partitions.

Not the answer you're looking for? Browse other questions tagged or ask your own question.