1755707 Members
4870 Online
108837 Solutions
New Discussion

vg00 disk move.

 
Jerry M
Occasional Contributor

vg00 disk move.

I have this server that was configured with the wrong disks for vg00. They need to be on same controller and then mirrored to the other disks on the other controller.  How can I move them around to make it

correct. I was told not to use pvmove since that would hang. Is this even possible while OS is running.

Here is the info about vg00.

 

 

Class     I  H/W Path       Driver   S/W State   H/W Type     Description
==========================================================================
disk      0  0/0/1/1/0/4/0.8.0               sdisk    CLAIMED     DEVICE       HP 36.4GST336753LC
                           /dev/dsk/c0t8d0   /dev/rdsk/c0t8d0
disk      1  0/0/1/1/0/4/0.10.0              sdisk    CLAIMED     DEVICE       HP 36.4GST336753LC
                           /dev/dsk/c0t10d0   /dev/rdsk/c0t10d0
disk      2  0/0/1/1/0/4/1.8.0               sdisk    CLAIMED     DEVICE       HP 36.4GST336753LC
                           /dev/dsk/c1t8d0   /dev/rdsk/c1t8d0
disk      3  0/0/1/1/0/4/1.10.0              sdisk    CLAIMED     DEVICE       HP 36.4GST336753LC
                           /dev/dsk/c1t10d0   /dev/rdsk/c1t10d0

vgdisplay -v vg00

 

   --- Logical volumes ---
   LV Name                     /dev/vg00/lvol1
   LV Status                   available/syncd
   LV Size (Mbytes)            528
   Current LE                  66
   Allocated PE                66
   Used PV                     1

   LV Name                     /dev/vg00/lvol2
   LV Status                   available/syncd
   LV Size (Mbytes)            20480
   Current LE                  2560
   Allocated PE                2560
   Used PV                     1

   LV Name                     /dev/vg00/lvol3
   LV Status                   available/syncd
   LV Size (Mbytes)            1024
   Current LE                  128
   Allocated PE                128
   Used PV                     1

   LV Name                     /dev/vg00/lvol4
   LV Status                   available/syncd
   LV Size (Mbytes)            1024
   Current LE                  128
   Allocated PE                128
   Used PV                     1

   LV Name                     /dev/vg00/lvol5
   LV Status                   available/syncd
   LV Size (Mbytes)            4096
   Current LE                  512
   Allocated PE                512
   Used PV                     1

   LV Name                     /dev/vg00/lvol6
   LV Status                   available/syncd
   LV Size (Mbytes)            1024
   Current LE                  128
   Allocated PE                128
   Used PV                     1

   LV Name                     /dev/vg00/lvol7
   LV Status                   available/syncd
   LV Size (Mbytes)            4096
   Current LE                  512
   Allocated PE                512
   Used PV                     1

   LV Name                     /dev/vg00/lvol8
   LV Status                   available/syncd
   LV Size (Mbytes)            4096
   Current LE                  512
   Allocated PE                512
   Used PV                     2

   LV Name                     /dev/vg00/lvol9
   LV Status                   available/syncd

   LV Size (Mbytes)            4096
   Current LE                  512
   Allocated PE                512
   Used PV                     1

   LV Name                     /dev/vg00/lvol10
   LV Status                   available/syncd
   LV Size (Mbytes)            4096
   Current LE                  512
   Allocated PE                512
   Used PV                     1


   --- Physical volumes ---
   PV Name                     /dev/dsk/c0t10d0
   PV Status                   available
   Total PE                    4340
   Free PE                     0
   Autoswitch                  On
   Proactive Polling           On

   PV Name                     /dev/dsk/c1t10d0
   PV Status                   available
   Total PE                    4340
   Free PE                     3110
   Autoswitch                  On

 

 

# bdf

 

/dev/vg00/lvol3    1048576  142848  898688   14% /
/dev/vg00/lvol1     521200   63704  405376   14% /stand
/dev/vg00/lvol8    4194304 2292320 1887376   55% /var
/dev/vg00/lvol9    4194304    2196 3930173    0% /var/adm/crash
/dev/vg00/lvol7    4194304 1555840 2617976   37% /usr
/dev/vg00/lvol6    1048576    2464 1038008    0% /tmp
/dev/vg00/lvol5    4194304 2381992 1798184   57% /opt
/dev/vg00/lvol10   4194304    2129 3930171    0% /nsr
/dev/vg00/lvol4    1048576    3248 1037208    0% /home

 


 

 

10 REPLIES 10
Jeff_Traigle
Honored Contributor

Re: vg00 disk move.

You could simply mirror as is. I guess it wouldn't be as pretty a configuration, but you would be mirrored across controllers.

 

If you want it to be pretty, I don't see why pvmove wouldn't work for the extents on /dev/dsk/c1t10d0. Given the extents used on the current devices, it's not likely to be the boot disk. Check the output of the following command to make sure the LVs for /stand, swap, and / aren't on it.

 

pvdisplay -v /dev/dsk/c1t10d0

--
Jeff Traigle
jerrym
Trusted Contributor

Re: vg00 disk move.

I think I may have it figured out.  Side note, I was told not to use pvmove since it can hang.

 

So far I have done this:

 

pvcreate -B -f  /dev/rdsk/c0t8d0

pvcreate  -f  /dev/rdsk/c1t8d0


mkboot /dev/rdsk/c0t8d0

mkboot -a "hpux -lq (;0)/stand/vmunix" /dev/rdsk/c0t8d0


 vgextend /dev/vg00  /dev/dsk/c0t8d0
/dev/dsk/c1t8d0  -need to add this also.

 lvextend  -m  1   /dev/vg00/lvol1  /dev/dsk/c0t8d0

 lvextend  -m  1  /dev/vg00/lvol2   /dev/dsk/c0t8d0

lvextend  -m  1  /dev/vg00/lvol3   /dev/dsk/c0t8d0

lvextend  -m  1  /dev/vg00/lvol4   /dev/dsk/c0t8d0

lvextend  -m  1  /dev/vg00/lvol5   /dev/dsk/c0t8d0

lvextend  -m  1  /dev/vg00/lvol6   /dev/dsk/c0t8d0

lvextend  -m  1  /dev/vg00/lvol7   /dev/dsk/c0t8d0

lvextend  -m  1  /dev/vg00/lvol8   /dev/dsk/c0t8d0 /dev/dsk/c1t8d0   -think I need to add this also. see lvol8

lvextend  -m  1  /dev/vg00/lvol9   /dev/dsk/c0t8d0

lvextend  -m  1  /dev/vg00/lvol10   /dev/dsk/c0t8d0

 

lvol8 contains two disks:
 

 --- Logical volumes ---
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)            4096
Current LE                  512
Allocated PE                512
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/c0t10d0   306       306
   /dev/dsk/c1t10d0   206       206

 

 

 

Then I guess I will do a lvreduce on the mirrors I do not want to be primary boot disks. , etc...  to get them all on c0t8 and c0t10 so they are on the same controller. And then mirror them back the other way to

c1t8 and c1t10 disks.

 

More to come.

 

 

Steven E. Protter
Exalted Contributor

Re: vg00 disk move.

Shalom,

pvmove has always worked well for me on 11.31.

Please post:
uname -a
swlist -l bundle | grep OE

Always good to know the OS and OE we are dealing with.

post bdf for guidance on lvol8

Your procedure looks good for me so far.

If the disks are the same size you could use dd to duplicate the entire disk.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Torsten.
Acclaimed Contributor

Re: vg00 disk move.

Looks like you have 1 dual port SCSI controller and 2 DS21x0 disk enclosures, can you confirm?

 

Consider to pvmove lvol8 to a single disk chassis, then do the mirroring.

 

If you don't want to use pvmove, you may restore a backup to the correct disks or start in lvm maintenance mode, export vg00, swap disk 8 in enclosure 1 with disk 10 in enclosure 2 and vgimport vg00.


Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Torsten.
Acclaimed Contributor

Re: vg00 disk move.

To solve your problem you may also do this:

 

- currently your system is on c0t10d0 and c1t10d0

- mirror lvol8 to c0t8d0

- unmirror lvol8 from c0t10d0 and c1t10d0

 

 

now your system is on c0t10d0 (lvol1 to 7) and c0t8d0 (lvol8)

 

- mirror lvol1 to 7 to c1t10do (use this disk as boot disk)

- mirror lvol8 to c1t8d0

 

now you have one side of the mirror on c0t8d0+c0t10d0 and the other side on c1t8d0+c1t10d0


Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
jerrym
Trusted Contributor

Re: vg00 disk move.

Info requested by Steven.  See my comments below this.

 

# uname -a
HP-UX mabank B.11.11 U 9000/800 3342735662 unlimited-user license

 

# bdf |egrep "File|vg00"
Filesystem          kbytes    used   avail %used Mounted on
/dev/vg00/lvol3    1048576  145384  896168   14% /
/dev/vg00/lvol1     521200   63704  405376   14% /stand
/dev/vg00/lvol8    4194304 2292328 1887360   55% /var
/dev/vg00/lvol9    4194304    2196 3930173    0% /var/adm/crash
/dev/vg00/lvol7    4194304 1555776 2618040   37% /usr
/dev/vg00/lvol6    1048576    2472 1038000    0% /tmp
/dev/vg00/lvol5    4194304 2583264 1598528   62% /opt
/dev/vg00/lvol10   4194304    2129 3930171    0% /nsr
/dev/vg00/lvol4    1048576    3248 1037208    0% /home

 

# swlist -l bundle | grep OE
  HPUX11i-OE-MC         B.11.11.0406   HP-UX Mission Critical Operating Environment Component
----------------------------------------------------------------------------------------------------------------------------

Info requested by Torsten.

 

Class     I  H/W Path       Driver   S/W State   H/W Type     Description
==========================================================================
disk      0  0/0/1/1/0/4/0.8.0               sdisk    CLAIMED     DEVICE       HP 36.4GST336753LC
                           /dev/dsk/c0t8d0   /dev/rdsk/c0t8d0
disk      1  0/0/1/1/0/4/0.10.0              sdisk    CLAIMED     DEVICE       HP 36.4GST336753LC
                           /dev/dsk/c0t10d0   /dev/rdsk/c0t10d0
disk      2  0/0/1/1/0/4/1.8.0               sdisk    CLAIMED     DEVICE       HP 36.4GST336753LC
                           /dev/dsk/c1t8d0   /dev/rdsk/c1t8d0
disk      3  0/0/1/1/0/4/1.10.0              sdisk    CLAIMED     DEVICE       HP 36.4GST336753LC
                           /dev/dsk/c1t10d0   /dev/rdsk/c1t10d0

-------------------------------------------------------------------------------------------------------------------------


I am trying to get everything on c0t8d0 and c0t10d0 as primary boot drives. I have all four disks:

c0t8d0 c0t10d0 c1t8d0 c1t10d0 added to vg00 to work with them. I have mirrored lvol1 - lvol8 to

c0t8d0 and then, if I understand, I will break the mirror from c0t10d0 so I can mirror c1t10d0,

which contain lvol9 lvol10, to c0t10d0.   I don't know about lvol8. It has c0t10d0 and c1t10d0

added to it for extra space butI will need it to mirror back for lvol9 and lvol10.

 

Keep in mind that this system is running and I cannot afford to make a mistake. Reboot should

not be needed here and I cannot reboot without going through a request for downtime.

Again, I was told not to use pvmove since they know of some problem with using that according

to the sr. admin.

 

When I lvreduce the disk c0t10d0 from lvol1 - lvol8  I assume the system will continue to run on

c0t8d0. ??    Will it let me lvreduce the disk c0t10d0 from lvol1 - lvol8 ??

 


 

jerrym
Trusted Contributor

Re: vg00 disk move.

I forgot to mirror lvol5 and now I am out of space.

 

# lvextend  -m  1  /dev/vg00/lvol5 /dev/dsk/c0t8d0
lvextend: Not enough free physical extents available.
Logical volume "/dev/vg00/lvol5" could not be extended.
Failure possibly caused by strict allocation policy

 

 

Any ideas?

 

I could try to reduce the sizes of some of the partitions.

 

Don't forget that lvol2 - swap is on this disk also.

 

--- Physical volumes ---
PV Name                     /dev/dsk/c0t8d0
VG Name                     /dev/vg00
PV Status                   available
Allocatable                 yes
VGDA                        2
Cur LV                      7
PE Size (Mbytes)            8
Total PE                    4340
Free PE                     306
Allocated PE                4034
Stale PE                    0
IO Timeout (Seconds)        default
Autoswitch                  On
Proactive Polling           On

   --- Distribution of physical volume ---
   LV Name            LE of LV  PE for LV
   /dev/vg00/lvol1    66        66
   /dev/vg00/lvol2    2560      2560
   /dev/vg00/lvol3    128       128
   /dev/vg00/lvol4    128       128
   /dev/vg00/lvol6    128       128
   /dev/vg00/lvol7    512       512
   /dev/vg00/lvol8    512       512

 


 

Torsten.
Acclaimed Contributor

Re: vg00 disk move.

Why you did not follow my advise???

 

Just specify both destination disks in the lvextend command.


Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
jerrym
Trusted Contributor

Re: vg00 disk move.

Sorry Lorsten. It was not necessary. I had to do some juggling but managed to get everything

over to the two 36 gig drives on c0t8 and c0t10, without having two drives allocated to lvol8, and 

then mirror them back to c1t8 and c1t10.

 

But, why are these two boot drives different?  I am missing something here or typed something

wrong.

 

c0t10d0 was the original primary and c0t8d0 should be the new primary boot drive. c0t8 does

show up as a boot disk. But c1t8 does not.  And why does Dump not have an alternate dump

device listed like root and swap?

 

I did run:

 

# pvcreate -B  -f  /dev/rdsk/c0t8d0

# mkboot /dev/rdsk/c0t8d0

# mkboot -a "hpux -lq (;0)/stand/vmunix" /dev/rdsk/c0t8d0

 

# pvcreate -B  -f /dev/rdsk/c1t8d0

# mkboot /dev/rdsk/c1t8d0
# mkboot -a "hpux -lq (;0)/stand/vmunix" /dev/rdsk/c1t8d0

 

 

# setboot -p 4/0.8.0 -a 4/1.8.0

 

With addresses from ioscan -funCdisk

 

Class     I  H/W Path       Driver   S/W State   H/W Type     Description
==========================================================================
disk      0  0/0/1/1/0/4/0.8.0               sdisk    CLAIMED     DEVICE       HP 36.4GST336753LC
                           /dev/dsk/c0t8d0   /dev/rdsk/c0t8d0
disk      1  0/0/1/1/0/4/0.10.0              sdisk    CLAIMED     DEVICE       HP 36.4GST336753LC
                           /dev/dsk/c0t10d0   /dev/rdsk/c0t10d0
disk      2  0/0/1/1/0/4/1.8.0               sdisk    CLAIMED     DEVICE       HP 36.4GST336753LC
                           /dev/dsk/c1t8d0   /dev/rdsk/c1t8d0
disk      3  0/0/1/1/0/4/1.10.0              sdisk    CLAIMED     DEVICE       HP 36.4GST336753LC
                           /dev/dsk/c1t10d0   /dev/rdsk/c1t10d0


 

 

 

# lifls -l /dev/rdsk/c0t8d0

volume ISL10 data size 7984 directory size 8 07/06/08 17:02:22

filename   type   start   size     implement  created

===============================================================

ISL        -12800 584     306      0          07/06/08 17:02:23

AUTO       -12289 896     1        0          07/06/08 17:02:23

HPUX       -12928 904     848      0          07/06/08 17:02:23

PAD        -12290 1752    1580     0          07/06/08 17:02:23

LABEL      BIN    3336    8        0          11/06/28 18:16:36

 

# lifls -l /dev/rdsk/c1t8d0
volume c1t8d0 data size 29 directory size 1 11/06/29 15:27:47
filename   type   start   size     implement  created
===============================================================
LABEL      BIN    8       8        0          11/06/29 15:27:47

 

 

# lvlnboot -v
Boot Definitions for Volume Group /dev/vg00:
Physical Volumes belonging in Root Volume Group:
        /dev/dsk/c0t10d0 (0/0/1/1/0/4/0.10.0) -- Boot Disk
        /dev/dsk/c1t10d0 (0/0/1/1/0/4/1.10.0)
        /dev/dsk/c0t8d0 (0/0/1/1/0/4/0.8.0) -- Boot Disk
        /dev/dsk/c1t8d0 (0/0/1/1/0/4/1.8.0)
Boot: lvol1     on:     /dev/dsk/c0t8d0
                        /dev/dsk/c1t8d0
Root: lvol3     on:     /dev/dsk/c0t8d0
                        /dev/dsk/c1t8d0
Swap: lvol2     on:     /dev/dsk/c0t8d0
                        /dev/dsk/c1t8d0
Dump: lvol2     on:     /dev/dsk/c0t8d0, 0