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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

keeping each LP copy on different storage box 1

Status
Not open for further replies.

ogniemi

Technical User
Nov 7, 2003
1,041
PL
let's say I have a volume group built of 8 the same size LUNs.
4 LUNs come from one storage box and the other 4 from second storage box
there is a LVM mirroring enabled for all LVs in the VG

how to avoid that during filesystem increasing its new LPs will land on two drives from the same storage box? as far as I knw there are no option to specify drives on which LV/FS should allocate new PPs during increasement...
 
1. Remove the LUNs of one storage box from the LV.
2. Increase the LV with PPs from the remaning storage box.
3. Copy the PPs on LUNs of the other storage box.
4. Expand the filesystem.
5. Sync the LV.

Example:
root@srtshv92:/root> lsvg -l rootvg | grep test2
lv_test2 jfs2 4 8 2 open/syncd /test2
log_lv_test2 jfs2log 1 2 2 open/syncd N/A
root@srtshv92:/root> lslv -m lv_test2
lv_test2:/test2
LP PP1 PV1 PP2 PV2 PP3 PV3
0001 0193 hdisk0 0193 hdisk1
0002 0194 hdisk0 0194 hdisk1
0003 0195 hdisk0 0195 hdisk1
0004 0196 hdisk0 0196 hdisk1
root@srtshv92:/root> rmlvcopy lv_test2 1 hdisk1
root@srtshv92:/root> lslv -m lv_test2
lv_test2:/test2
LP PP1 PV1 PP2 PV2 PP3 PV3
0001 0193 hdisk0
0002 0194 hdisk0
0003 0195 hdisk0
0004 0196 hdisk0
root@srtshv92:/root> extendlv lv_test2 4 hdisk0
root@srtshv92:/root> lslv -m lv_test2
lv_test2:/test2
LP PP1 PV1 PP2 PV2 PP3 PV3
0001 0193 hdisk0
0002 0194 hdisk0
0003 0195 hdisk0
0004 0196 hdisk0
0005 0198 hdisk0
0006 0199 hdisk0
0007 0200 hdisk0
0008 0201 hdisk0
root@srtshv92:/root> chfs -a size=1G /test2
Filesystem size changed to 2097152
root@srtshv92:/root> mklvcopy -ex -k lv_test2 2 hdisk1
root@srtshv92:/root> syncvg -l lv_test2
 
Hi,

you can also use migratelp
Usage: migratelp lvname/lpartnum[/copynum] destpv[/ppartnum]
Migrates a single logical partition.

but it´s not the best way ... ;-)

 
I don't allow automatic increase of LV while increasing FS size (MAX LPs = Number of LPs). When I need to increase a FS, I modify MAX LPS, then I increase the LV while specifying an LVMAP file. Then I chfs the filesystem to use the additional space in the LV.

Hard work I'm afraid...

HTH,

p5wizard
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top