Pages

Wednesday, May 21, 2014

importvg failed

The situation so far: a customer has two systems with a couple of luns presented to them. Two luns (hdisk2 and hdisk7) were imported as testvg on Node 2. Exporting the VG on Node 2 worked fine, importing on Node 1 failed (unfortuanatly I've no error message here). First I checked the physical volumes (note that I only take a closer look at hdisk2 and hdisk7 which belongs to the VG testvg):

# lspv
hdisk2  00f84119358323ae  testvg  active
hdisk7  none              None


The task was now to add the the disk hdisk7 to the VG testvg. The first thing I tried was extendvg:

# extendvg testvg hdisk7
0516-322 extendvg: The Device Configuration Database is inconsistent.
        Execute redefinevg to correct the database.
0516-792 extendvg: Unable to extend volume group.


The following redefinevg command failed:

# redefinevg -d hdisk7 testvg
0516-1939 : PV identifier not found in VGDA.


And synclvodm also failed:

# synclvodm -v testvg
0516-510 synclvodm: Physical volume not found for physical volume
        identifier 00f8411affb1f1a60000000000000000.
0516-548 synclvodm: Partially successful with updating volume
        group testvg.
synclvodm: Logical volume u01_lv updated.


The first I really needed to do was the mark the disk hdisk7 as a physical volume:

# chdev -l hdisk7 -a pv=yes

After that the physical volume ID was available:

# lspv
hdisk2  00f84119358323ae  testvg  active
hdisk7  00f8411affb1f1a6  None


With redefinevg I could change the VG testvg and add the disk hdisk7:

# redefinevg -d hdisk7 testvg

Just a quick check with lspv again:

# lspv
hdisk2  00f84119358323ae  testvg  active
hdisk7  00f8411affb1f1a6  testvg  active


And hdisk7 was a part of testvg again. Unfortuanatly I wasn't able to mount any file system from the VG:

# mount -v jfs2 /dev/u01_lv /u01
mount: 0506-324 Cannot mount /dev/u01_lv on /u01: There is an input or output error.


The first last step was to export the VG one more:

# varyoffvg testvg
# exportvg testvg


And import it:

# importvg -y testvg hdisk2
# varyonvg testvg


Finally I was able to mount the file system:

# mount -v jfs2 /dev/u01_lv /u01