Operating System - HP-UX
1843981 Members
1753 Online
110226 Solutions
New Discussion

Stripping many disk from the command line

 
ROSS HANSON
Regular Advisor

Stripping many disk from the command line

Hello,
I am trying to do a lvcreate command and I want to stripe across 18 drives. Yes, I now have all the drives in the volume group. But, I do not know the correct "flags" to do a 0/1 stripe.
Can anyone help
Ross Hanson
9 REPLIES 9
James R. Ferguson
Acclaimed Contributor

Re: Stripping many disk from the command line

Hi Ross:

If you mean stripping and mirroring that is not a valid combination.

You can implement "extent-based mirrored stripes", however. The essential difference is one of stripe granularity.

Have a look at the 'lvcreate' (1M) and 'lvmpvg(4)' man pages for more information.

Regards!

...JRF...
Tim D Fulford
Honored Contributor

Re: Stripping many disk from the command line

Hi

There is only one option if you do not have hardware mirroring and that is extent based striping & mirroring. What is actually happening is the first extent is on the first disk, the next extent is on the next disk & so forth.

To do this you need to set up PVGs (Physical volume groups) say "primary" with 9 disks & "mirror" with 9 disks. To do this create a file called /etc/lvmpvg as per the layout in "man lvmpvg"

You do not actually mirror the disks you mirror the logical volumes. You can create a striped LV in the following manner.
# lvcreate -D y -s g -n -L -m 1

This will create an extent based striped & mirrored logical volume.

Regards

Tim

do this by
-
Stuart Abramson_2
Honored Contributor

Re: Stripping many disk from the command line

 
Rodney Hills
Honored Contributor

Re: Stripping many disk from the command line

* Here I create striping between 2 drives with mirroring on another 2 drives.

mkdir /dev/vg01
mknod /dev/vg01/group c 64 0x010000
vgcreate -g vg01ms -s 1 -e 2100 /dev/vg01 /dev/dsk/c7d0s2 /dev/dsk/c8d0s2 /dev/dsk/c9d0s2 /dev/dsk/c10d0s2
vgextend -g vg01ss /dev/vg01 /dev/dsk/c11d0s2
lvcreate -n lvol1 -m 1 -s g /dev/vg01
lvextend -L 1 /dev/vg01/lvol1 /dev/dsk/c7d0s2 /dev/dsk/c9d0s2
lvextend -L 2 /dev/vg01/lvol1 /dev/dsk/c8d0s2 /dev/dsk/c10d0s2
lvextend -L 3 /dev/vg01/lvol1 /dev/dsk/c7d0s2 /dev/dsk/c9d0s2
lvextend -L 4 /dev/vg01/lvol1 /dev/dsk/c8d0s2 /dev/dsk/c10d0s2
( Up to -L 1200 )

By using -g option of vgcreate and -L option of lvextend, you can control the drives placement of extents. Note on lvextend their are 2 physical drives given. The primary and the mirror.

HTH

-- Rod Hills
There be dragons...
Tim D Fulford
Honored Contributor

Re: Stripping many disk from the command line

Quick note

Stuarts striping CANNOT BE MIRRORED in LVM. If you do use this striping method you will need hardware mirroring for the RAID1 bit

Tim
-
ROSS HANSON
Regular Advisor

Re: Stripping many disk from the command line

Good info folks! We are using a SANS VA7400 and will be using hardware mirroring. So, will that change anything?
Ross Hanson
Tim D Fulford
Honored Contributor

Re: Stripping many disk from the command line

Yep... & no All replies are equally valid Stuarts reply for kilobyte & JRF & mine for extent.

The VA actually stripes across your disks as each LUN exists on all disks within the redundancy group (VA7400 has two RG). The VA stripe size is 256kB & is not configurable.

IMHO you should still stripe, but obviously you need to be sure you do not pick a stripe width that will cause periodicity & unwittingly hit the same disk continually(unlikely, but theoretically possible). For this reason it may be best if you avoid kilobyte striping & go for extent based stripes (un-mirrored) as the VA stripe size << extent size. You really need to choose

Basically you do not need to mirror as the VA will do it for you (that is one of the reasons you bought it I assume) so you can use either method

Kilobyte striping, 4,8,16,32 or 64kB width
# reate -i 18 -I -n -L

Extent stripping (LVM default 4MB width) no mirroring required
use lvmpvg
# lvcreate -D y -s g -n -L

Or if you are feeling really rich
Extent stripping & mirror (LVM default 4MB width)
use lvmpvg
# lvcreate -m 1 -D y -s g -n -L

Regards

Tim
-
Pete Randall
Outstanding Contributor

Re: Stripping many disk from the command line

Not being familiar with VA's, I'll throw this out from a FC60 background.

When you set up your LUN's, you indicate what type of RAID you want. Simply select RAID 0/1 and let the hardware do this for you. There is no need (and probably a penalty) to involve LVM.

Of course the VA's may be different. If so, disregard!


Pete


Pete
Tim D Fulford
Honored Contributor

Re: Stripping many disk from the command line

Pete,

You are right. A major difference VA/FC60 is that on FC60 you have to pick the disks in the LUN, on the VA you only decide which redundancy group (2x redundancy group, each contains 1/2 of you disks) the LUN is built from.

Given this VA functionality, it is tempting to just generate ONE or two large LUNS. I think this is a mistake as your disk queues on this (these) LUNS will get very large, very quickly under moderate loads. This information will be backed up on the OS (I infere HP-UX here)

If it is accepted that multiple small LUNS is better than one big LUN; some people don't accept this. Then the load should be split evenly over each LUN; similar disk queue reasoning/arguments.

It seems we disagree on the second point.... [or my eloquance has changed your opionion!!! wink wink.]

Regards

Tim

-