When you start using Linux' logical volume manager, one of the first question you have to answer is: what name will you give to your volume group? The usual answer is: vg1, vg2, etc. Although it does not bear any specific meaning, this naming convention is simple and seems functional enough.
In fact, this is a bad idea, which can have nasty consequences on the long term. Here is why: one day, your computer will eventually give out. To save your precious data, you will remove its drives and plug them into another computer. If you are using LVM with the same naming convention on that second computer, you will then get a name conflict, which will prevent you from seeing the volume group you want to recover.
The solution is to name volume groups uniquely across all your computers, and if possible other people's. An elegant way to achieve this is to use your host names as a basis. For instance, on a machine called “Piñacolada”, you would name a single volume group “pinacolada”, or two volume groups “pinacolada1” and “pinacolada2”. Or perhaps “vg-pinacolada0” or whatever, you get the idea.
5 comments
monday 17 september 2012 à 20:10 Andy Cater said : #1
monday 17 september 2012 à 21:28 Joachim Breitner said : #2
tuesday 18 september 2012 à 12:24 Ewoud Kohl van Wijngaarden said : #3
tuesday 18 september 2012 à 15:51 Ernesto Hernández-Novich said : #4
saturday 09 february 2013 à 01:20 sdawg said : #5