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

Re: [linux-lvm] LVM Naming Convention



I concur with the OP on this convention.  My usage scenario is different though.  Most of my linux boxes are on VMware and I rely on cloning and templates a great deal.  I leave the vg name generic so the templates are less messy.  I don't have to worry about SAN naming conventions because my SAN storage is vmfs first, before files are carved out and handed to VMs.  I suppose I could add a vg_rename as part of my cloning/templating instantiation process, but I'm unlikely to pass disks around.

-- Jess

________________________________________
From: linux-lvm-bounces redhat com [linux-lvm-bounces redhat com] On Behalf Of James Hawtin [oolon ankh org]
Sent: Wednesday, April 20, 2011 5:01 AM
To: LVM general discussion and development
Subject: Re: [linux-lvm] LVM Naming Convention

Assarsson, Emil wrote:
> We have also started to use hostnames in the VG names for the same reason. Starting with vg makes is easier to auto complete when using bash :-P. I don't see any reason why to use "lv" to the LV's but it doesn't hurt. I also try to use UUID's in the /etc/fstab as much as possible.
>
> Best regards
> Emil Assarsson
>
I also use the hostname in the volume group name for all the reasons
already suggest, its particularly valuable when dealing with san disk,
as any mistake is very obvious.

personally I use

/dev/<hostname>_<type><number>_vg/<filesystem>_lv

Where type is l for local disk s for san. I keep my raid 1 and raid 5 in
different volume groups to avoid mistakes, however both are called l or s.

Where the disk is for use to virtual machines I used

/dev/<hostname>_<type><number>_vg/<virtual machine>_v<number>_lv

I put _vg at the end of all volume groups mostly for completeness, and
avoidance of any change of a name clash, I also thing _lv is useful as
alots of devices can be mixed up in /dev/mapper so giving them a
seperate namespace so the don't get mixed up with multipathed disk, (and
in the old days raw devices) etc. I can do a ls /dev/mapper/*_lv to see
all my logical volumes all in one go, independant of group.


James

_______________________________________________
linux-lvm mailing list
linux-lvm redhat com
https://www.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/


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