We have an issue with one of our customer getting the problem unable to create the volume group and it triggers the major number was already used.
It trigger the below error
$ alt_root_vg -target hdisk2 << hdisk2 is the Hitachi san disk.
Calling mkszfile to create new /image.data file.
Checking disk sizes.
Creating cloned rootvg volume group and associated logical volumes.
0505-102 alt_disk_install: mkvg has returned an error.
0516-021 /usr/sbin/varyonvg: The varyonvg failed because the volume group's
major number was already used by another device.
0516-862 /usr/sbin/mkvg: Unable to create volume group.
Solution from IBM as
I believe what is going on here is the following:
The main detailed issue we are having here is that, sometimes, device
drivers or kernel extensions will use a Major Number but fail to update
the ODM, so AIX thinks the value is available when it is actually in use
in the kernel.
Hence, what we will do here is that we will try to get rid of the
problematic Major Number, as follows:
- We will run "lvlstmajor" to list the next available major number
# lvlstmajor
> it should display a number, Example: XX
- Then, we will use this displayed major number with a dummy VG
# lvgenmajor dummyXX
> this should create an entry in ODM class CuDvDr for "dummyXX"
- Now, we will make sure that the new major number is ready:
# lvlstmajor
> it should display an incremented number, i.e. XX+1
- And now, we can try creating a Test Volume Group to make sure that the
"mkvg" command will work fine:
# mkvg -y testvg hdisk2
> where hdisk2 is the disk you wanted to create the Alt-Disk-Copy on
- If that works, then Remove the newly created "testvg":
# varyoffvg testvg
# exportvg testvg
** So far, we made sure that the "mkvg" command is working perfectly
- Now, we can retry the original command...the alt_root_vg -target hdisk#
** After the original command, "alt_root_vg", finishes successfully,
you can remove the "dummyXX" entry from ODM class CuDvDr, as follows:
# odmdelete -o CuDvDr -q "value1=dummyXX"
0518-307 odmdelete: 1 objects deleted.
Hope this helps!
That didn't work for--but I used lvgenmajor to get me up to a major # I could use ( hitachi san, and I could not reinstall) --so I had issues with major 36, and 37, but 38 worked. So, I created two vgs so the odm would not choose the problem majors for the alt-rootvg.
ReplyDeleteit worked for me when generated dummylv major number.
ReplyDeleteThat worked. Thank you for sharing !!!!
ReplyDelete