Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

LVM Question

Status
Not open for further replies.

johndrake

Technical User
Jul 25, 2002
97
0
0
Hi,

I am trying to use LVM in order to spread 2 GB across a
VG. Using LVM I created a logical volume with the following
characteristics ( I have also used striping ). My question
is will this evenly spread out the 2 GB between the 4 disks
in the volume group:



LOGICAL VOLUME: datalv01 VOLUME GROUP: allstatedbvg
LV IDENTIFIER: 000c30cdaba44890.1 PERMISSION: read/write
VG STATE: active/complete LV STATE: closed/syncd
TYPE: jfs WRITE VERIFY: off
MAX LPs: 512 PP SIZE: 32 megabyte(s)
COPIES: 1 SCHED POLICY: striped
LPs: 64 PPs: 64
STALE PPs: 0 BB POLICY: relocatable
INTER-POLICY: maximum RELOCATABLE: no
INTRA-POLICY: middle UPPER BOUND: 4
MOUNT POINT: N/A LABEL: None
MIRROR WRITE CONSISTENCY: on
EACH LP COPY ON A SEPARATE PV ?: yes
STRIPE WIDTH: 4
STRIPE SIZE: 128K

Thank you,

-Joe




 
or is this correct

LOGICAL VOLUME: datalv01 VOLUME GROUP: allstatedbvg
LV IDENTIFIER: 000c30cdaba44890.1 PERMISSION: read/write
VG STATE: active/complete LV STATE: closed/syncd
TYPE: jfs WRITE VERIFY: off
MAX LPs: 512 PP SIZE: 32 megabyte(s)
COPIES: 1 SCHED POLICY: parallel
LPs: 64 PPs: 64
STALE PPs: 0 BB POLICY: relocatable
INTER-POLICY: minimum RELOCATABLE: yes
INTRA-POLICY: middle UPPER BOUND: 4
MOUNT POINT: N/A LABEL: None
MIRROR WRITE CONSISTENCY: on
EACH LP COPY ON A SEPARATE PV ?: yes
 
here is more info for the last part:$ lsvg allstatedbvg
VOLUME GROUP: allstatedbvg VG IDENTIFIER: 000c30cdaba44890
VG STATE: active PP SIZE: 32 megabyte(s)
VG PERMISSION: read/write TOTAL PPs: 2168 (69376 megabytes)
MAX LVs: 256 FREE PPs: 2104 (67328 megabytes)
LVs: 1 USED PPs: 64 (2048 megabytes)
OPEN LVs: 0 QUORUM: 3
TOTAL PVs: 4 VG DESCRIPTORS: 4
STALE PVs: 0 STALE PPs: 0
ACTIVE PVs: 4 AUTO ON: yes
MAX PPs per PV: 1016 MAX PVs: 32


 
hi,

Form what i understand is if you specify a striped logical volume , it means extent based striped i.e. if you have 4 disks and you say create a 2GB filesystem on the 4disks , if you do lslv -m fred it will show

LP PP1 PV1
0001 1 hdisk1
0002 2 hdisk2
0003 3 hdisk3
0004 4 hdisk4
0005 5 hdisk1
0006 6 hdisk2
0007 7 hdisk3
0008 8 hdisk4

It will add to hfisk1,2,3,4 and then 1,2,3,4 etc...


With the LV spread of more than one disk it will fill the first disk up first nad then use the other one , or unless you create a bit on the 1st disk thenextend it on the 2nd then extend it again on the 3rd and so on

I would use the striped method.

HTH
 
I believe your data will be spread evenly across the 4 hdisks.

Remember, if you ever need to add to your volume group you will have to add 4 more hdisks to maintain the same striping.
 
In case of striping the data is evenly spread across the disks. But when you add more disks to the volume group you may not be able to extend your filesystem if it does not satisfy the stripe width. So another solution is instead of striping you can specify inter policy as maximun. So that it spreads across all the available disks in the vg. Also there is no problem in expanding the filesystem.

Create the lv using the following command and then make filesystem on using the lv.
mklv -y lv_name -e 'x' vg_name no_of_pps
 
Important things to consider when using `smit mklv`, which is my preferred method:

Fourth line, PHYSICAL VOLUME names, allows you to specify only certain disks to lay the PPs on. Handy for if you have 25 disks in your vg but you only want to spread across five, for example.

RANGE of physical volumes, line seven, defaults to minimum. I set to maximum to get the PP spread evenly. As anshudad said, no problem is expanding the fs later because of this setting, any additional PP will be allocated accoring to this policy.

I leave everything else at default. Once that is done, I create my fs using `smit crjfslv` so I don't have to do any more math. It puts the fs on the lv and fills it up.

hth IBM Certified -- AIX 4.3 Obfuscation
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top