AIX

AIX

Connect with fellow AIX users and experts to gain knowledge, share insights, and solve problems.


#Power
#Power
 View Only
Expand all | Collapse all

mkvg - strange behavior with major number

  • 1.  mkvg - strange behavior with major number

    Posted Wed February 11, 2009 04:31 PM

    Originally posted by: shargus


    Trying to create a new volume group using

    mkvg -S -f -s 1024 -y vgoracle hdisk2

    we're getting 0516-021 message about the major number is in use.

    The mkvg command did not actually create a vgoracle (and thus, no device file), so we can't tell what major number it has a problem with.
    So, I tried adding a "-C" to the mkvg command. This time, it created a vgoracle volume group with associated device file. The major number is 37.
    As expected, trying to varyonvg vgoracle gives the "major number already in use" error.

    The problem is, we cannot find any other device file with major number 37.

    We even poked around in the ODM looking for it.

    If we do the same mkvg, but this time specified a major number (we picked 41 at random), it works fine.

    So, 1) What is mkvg colliding with? 2) If I need to specify a major number, how can I tell (in a script) which ones are available for use? 37 appears to be available here, yet mkvg (and varyonvg) choke on it.
    #AIX-Forum


  • 2.  Re: mkvg - strange behavior with major number

    Posted Thu February 12, 2009 07:46 AM

    Originally posted by: MarkTaylor


    use kdb .. then either "devsw" or "pdt *" and look for your major number in HEX .. it will be there .. I hit this last year when trying to import some VGs with specific major numbers ..

    HTH
    Mark Taylor
    #AIX-Forum


  • 3.  Re: mkvg - strange behavior with major number

    Posted Thu February 12, 2009 07:48 AM

    Originally posted by: MarkTaylor


    actually, pdt is the paging device tab .. so it may not be listed there, but it will be in the device switch table "devsw"
    #AIX-Forum


  • 4.  Re: mkvg - strange behavior with major number

    Posted Thu February 12, 2009 07:50 AM

    Originally posted by: MarkTaylor


    lvgenmajor command will show you the next major number available to use btw ..
    #AIX-Forum


  • 5.  Re: mkvg - strange behavior with major number

    Posted Thu February 12, 2009 10:44 PM

    Originally posted by: cggibbo


    lvlstmajor - shows a list of device major numbers not currently in use e.g.

    1. lvlstmajor
    34...
    #AIX-Forum


  • 6.  Re: mkvg - strange behavior with major number

    Posted Wed February 18, 2009 06:01 PM

    Originally posted by: shargus


    lvgenmajor says major number 37 is available:

    .h2 # lvgenmajor vgtest
    .h2 37

    Yet, mkvg says it's not:

    .h2 # mkvg -S -f -s 1024 -V 37 -y vgtest hdisk1
    .h2 vgtest
    .h2 0516-021 /usr/sbin/varyonvg: The varyonvg failed because the volume group's
    .h2 major number was already used by another device.
    .h2 0516-862 mkvg: Unable to create volume group.
    #AIX-Forum


  • 7.  Re: mkvg - strange behavior with major number

    Posted Wed February 18, 2009 06:17 PM

    Originally posted by: orphy


    I know you mentioned that you tried to locate the device that has the major number 37 but can you show us the output of this command?

    ls -l /dev|grep 37,

    Something else interesting to try would be

    mkvg -S -f -s 1024 -V 40 -y vgtest hdisk1
    varyoffvg vgtest
    exportvg vgtest
    importvg -V 37 -y vgtest hdisk1

    Since it was the varyonvg that failed, I expect importvg -V 37 to fail as well but it would be a good exercise to give it a quick try.

    To fix this, you might just need to open a PMR and send Support a snap so that they can look at the whole picture in order to fix this for you. Please do report back the outcome though.
    Orphy
    #AIX-Forum


  • 8.  Re: mkvg - strange behavior with major number

    Posted Wed February 18, 2009 06:45 PM

    Originally posted by: shargus


    ls -l /dev/| grep 37


    no files listed.

    # mkvg -S -f -s 1024 -V 40 -y vgtest hdisk1

    0516-372 mkvg: The chkmajor function failed.

    0516-862 mkvg: Unable to create volume group.


    # lvlstmajor

    38..40,44...


    Interesting...
    #AIX-Forum


  • 9.  Re: mkvg - strange behavior with major number

    Posted Wed February 18, 2009 06:37 PM

    Originally posted by: shargus


    kdb does say the device file is in use... (37 dec is 25 hex)
    Slot address F1000100101B4280
    MAJOR: 025
    open: 047D26F8
    close: 047D2670
    read: 047D20E0
    write: .nodev (0019A394)
    ioctl: 047D1D98
    strategy: .nodev (0019A394)
    ttys: 00000000
    select: .nodev (0019A394)
    config: .nodev (0019A394)
    print: .nodev (0019A394)
    dump: .nodev (0019A394)
    mpx: .nodev (0019A394)
    revoke: .nodev (0019A394)
    dsdptr: 00000000
    selptr: 00000000
    opts: 0000002A DEV_DEFINED DEV_MPSAFE
    I'm not sure if I'm reading this right, but it appears device 37 has open, close, read, and ioctl handles, but no write handle?
    #AIX-Forum


  • 10.  Re: mkvg - strange behavior with major number

    Posted Fri February 20, 2009 04:17 AM

    Originally posted by: MarkTaylor


    I done quite a bit of investigation on this last year as I was migrating LUNs between VIO Servers and importing using the original major numbers and I hit issues as you have ..

    You may ket a clue if you see what the kex is loaded at the open address i.e.

    $ kdb
    (0)> lke -s 047D26F8
    #AIX-Forum


  • 11.  Re: mkvg - strange behavior with major number

    Posted Wed February 18, 2009 05:53 PM

    Originally posted by: shargus


    lvlstmajor reports that major number 37 is available:

    $ lvlstmajor

    37..40,44...


    yet mkvg says it's already in use:

    # mkvg -S -f -s 1024 -V 37 -y vgtest hdisk1

    vgtest

    0516-021 /usr/sbin/varyonvg: The varyonvg failed because the volume group's

    major number was already used by another device.

    0516-862 mkvg: Unable to create volume group.


    #AIX-Forum


  • 12.  Re: mkvg - strange behavior with major number - FIXED

    Posted Thu February 26, 2009 11:01 AM

    Originally posted by: shargus


    The problem was with Hitachi's HDLM.

    HDLM creates it's own special devices. The device files were already in /dev and in the ODM, but not in the kernel. At some point, HDLM recreated the kernel device entries with new major numbers, but did not correct the ODM and the device files. At that point, the major numbers got out of sync and things went downhill from there.

    The fix is to remove and re-install HDLM.
    #AIX-Forum


  • 13.  Re: mkvg - strange behavior with major number

    Posted Thu November 07, 2013 03:42 AM

    Originally posted by: PrabhanjanG


    A simple reboot the node resolved a similar issue I was facing. 


    #AIX-Forum