System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

SAN LUN partition best-practice with LVM

Simon Hargrave
Honored Contributor

SAN LUN partition best-practice with LVM

Hi

I'm polling for a concensus on the best way to utilise SAN LUNs in a Linux server. The way I see it there are 2 options: -

1. pvcreate on the base LUN (e.g. /dev/mapper/mpath1) and create/add to volume groups as normal.

2. fdisk/parted to create a partition the full size of the disk, set type to 8e, then pvcreate on the partition (e.g. /dev/mapper/mpath1p1).

In the first instance, it's easier to manage when resizing LUNs etc, and also less work per LUN. In the second instance it gives visibility so you can easily see that a LUN contains (or contained) PV's in the event of LUNs being published to other servers on the SAN.

Just after an idea of what other people do, whether there's a published best-practice etc. I can see arguments for both sides, but at the moment I'm in the second camp.

Thanks, Simon
1 REPLY
Modris Bremze
Esteemed Contributor

Re: SAN LUN partition best-practice with LVM

With Linux I usually use 2. It sort of feels safer that way and there is a possibility to assign only part of a disk to an LVM structure. On HP-UX, for comparison, the PV is created directly onto a disk device file.