Operating System - HP-UX
1836582 Members
1532 Online
110102 Solutions
New Discussion

Even out disk usage for a LV that spans over two disks

 
WL YU
Occasional Contributor

Even out disk usage for a LV that spans over two disks

O/S: HP-UX 10.20

Have two disks for the rootvg (vg00):

Primary disk : /dev/dsk/c0t5d0
Secondary disk : /dev/dsk/c1t1d0

All LVs in the rootvg are mirrored
except the LV that contains the /var
filesystem.

Information for the LV that contains /var:

lvdisplay -v /dev/vg00/lvol8

LV Name /dev/vg00/lvol8
VG Name /dev/vg00
LV Permission read/write
LV Status available/syncd
Mirror copies 0
Consistency Recovery MWC
Schedule parallel
LV Size (Mbytes) 800
Current LE 200
Allocated PE 200
Stripes 0
Stripe Size (Kbytes) 0
Bad block on
Allocation strict
IO Timeout (Seconds) default

--- Distribution of logical volume ---
PV Name LE on PV PE on PV
/dev/dsk/c0t5d0 160 160
/dev/dsk/c1t1d0 40 40

Free space left at the two disks are as follows:

/dev/dsk/c0t5d0: 40 PEs
/dev/dsk/c1t1d0: 160 PEs

I know that it is theoretically possible to
mirror /dev/vg00/lvol8 over the two
disks in vg00. But how could I do this? It seems that I am unable to even out the disk usage of any LVs in the server.

If I could install a spare harddisk to vg00, could my goal of making mirror copies of
/dev/vg00/lvol8 over disks /dev/dsk/c0t5d0 and /dev/dsk/c1t1d0 be acheived? If so, how
could I do this?

1 REPLY 1
Patrick Wallek
Honored Contributor

Re: Even out disk usage for a LV that spans over two disks

To mirror lvol8 you need to get all PEs onto a single disk first to make life a lot easier. pvmove is the command will do this.

Have a look at the man page for the exact syntax, but I believe the following will move the 40 PEs from c1t1d0 to c0t5d0:

# pvmove -n /dev/vg00/lvol8 /dev/dsk/c1t1d0 /dev/dsk/c0t5d0

After all PVs are on a single disk you can then:

# lvextend -m 1 /dev/vg00/lvol8