* [linux-lvm] LVM Naming Convention
@ 2011-04-19 22:23 Mike Seda
2011-04-19 22:36 ` Joe Pruett
0 siblings, 1 reply; 5+ messages in thread
From: Mike Seda @ 2011-04-19 22:23 UTC (permalink / raw)
To: linux-lvm
Hi All,
Recently, I came across the new LVM naming convention in RHEL 6. This
convention places the output of "hostname -s" in the VG name. This
doesn't really fit into the way I've previously setup VGs, which was to
create a new VG for each type of disk attached to the system, e.g. RAID
1 SAS 10K (local), RAID 6 SATA 7.2K (SAN).
I guess I could modify the naming convention slightly as shown below:
- /dev/vg_`hostname -s`_[0-9][0-9]/lv_{foo|bar}
Another thought I had was that maybe I don't need a separate VG for each
type of disk since the lvcreate/lvextend commands seem to be able to
create/grow an LV by PV. My understanding is that this would allow you
to skip the step of growing the VG by the PV, right?
Essentially, I'm just wondering what other folks in my situation are
doing for LVM naming.
Thanks In Advance,
Mike
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [linux-lvm] LVM Naming Convention
2011-04-19 22:23 [linux-lvm] LVM Naming Convention Mike Seda
@ 2011-04-19 22:36 ` Joe Pruett
2011-04-20 6:48 ` Assarsson, Emil
0 siblings, 1 reply; 5+ messages in thread
From: Joe Pruett @ 2011-04-19 22:36 UTC (permalink / raw)
To: LVM general discussion and development
i have started putting the hostname in my vg names as well, mainly so
that if i have to move the drives to another system for upgrades,
crashes, etc, i don't get collisions between the local vg and the one
i'm hooking up temporarily.
On 04/19/2011 03:23 PM, Mike Seda wrote:
> Hi All,
> Recently, I came across the new LVM naming convention in RHEL 6. This
> convention places the output of "hostname -s" in the VG name. This
> doesn't really fit into the way I've previously setup VGs, which was
> to create a new VG for each type of disk attached to the system, e.g.
> RAID 1 SAS 10K (local), RAID 6 SATA 7.2K (SAN).
>
> I guess I could modify the naming convention slightly as shown below:
> - /dev/vg_`hostname -s`_[0-9][0-9]/lv_{foo|bar}
>
> Another thought I had was that maybe I don't need a separate VG for
> each type of disk since the lvcreate/lvextend commands seem to be able
> to create/grow an LV by PV. My understanding is that this would allow
> you to skip the step of growing the VG by the PV, right?
>
> Essentially, I'm just wondering what other folks in my situation are
> doing for LVM naming.
>
> Thanks In Advance,
> Mike
>
> _______________________________________________
> 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/
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [linux-lvm] LVM Naming Convention
2011-04-19 22:36 ` Joe Pruett
@ 2011-04-20 6:48 ` Assarsson, Emil
2011-04-20 9:01 ` James Hawtin
0 siblings, 1 reply; 5+ messages in thread
From: Assarsson, Emil @ 2011-04-20 6:48 UTC (permalink / raw)
To: LVM general discussion and development
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
> -----Original Message-----
> From: linux-lvm-bounces@redhat.com [mailto:linux-lvm-bounces@redhat.com] On
> Behalf Of Joe Pruett
> Sent: onsdag den 20 april 2011 00:37
> To: LVM general discussion and development
> Subject: Re: [linux-lvm] LVM Naming Convention
>
> i have started putting the hostname in my vg names as well, mainly so
> that if i have to move the drives to another system for upgrades,
> crashes, etc, i don't get collisions between the local vg and the one
> i'm hooking up temporarily.
>
> On 04/19/2011 03:23 PM, Mike Seda wrote:
> > Hi All,
> > Recently, I came across the new LVM naming convention in RHEL 6. This
> > convention places the output of "hostname -s" in the VG name. This
> > doesn't really fit into the way I've previously setup VGs, which was
> > to create a new VG for each type of disk attached to the system, e.g.
> > RAID 1 SAS 10K (local), RAID 6 SATA 7.2K (SAN).
> >
> > I guess I could modify the naming convention slightly as shown below:
> > - /dev/vg_`hostname -s`_[0-9][0-9]/lv_{foo|bar}
> >
> > Another thought I had was that maybe I don't need a separate VG for
> > each type of disk since the lvcreate/lvextend commands seem to be able
> > to create/grow an LV by PV. My understanding is that this would allow
> > you to skip the step of growing the VG by the PV, right?
> >
> > Essentially, I'm just wondering what other folks in my situation are
> > doing for LVM naming.
> >
> > Thanks In Advance,
> > Mike
> >
> > _______________________________________________
> > 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/
> >
>
> _______________________________________________
> 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/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [linux-lvm] LVM Naming Convention
2011-04-20 6:48 ` Assarsson, Emil
@ 2011-04-20 9:01 ` James Hawtin
2011-04-20 15:33 ` Males, Jess
0 siblings, 1 reply; 5+ messages in thread
From: James Hawtin @ 2011-04-20 9:01 UTC (permalink / raw)
To: LVM general discussion and development
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [linux-lvm] LVM Naming Convention
2011-04-20 9:01 ` James Hawtin
@ 2011-04-20 15:33 ` Males, Jess
0 siblings, 0 replies; 5+ messages in thread
From: Males, Jess @ 2011-04-20 15:33 UTC (permalink / raw)
To: LVM general discussion and development
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/
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-04-20 15:33 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-19 22:23 [linux-lvm] LVM Naming Convention Mike Seda
2011-04-19 22:36 ` Joe Pruett
2011-04-20 6:48 ` Assarsson, Emil
2011-04-20 9:01 ` James Hawtin
2011-04-20 15:33 ` Males, Jess
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.