Results 1 to 2 of 2

Thread: mtx -f /dev/sg3 hangs

  1. #1
    Join Date
    Jul 2011
    Posts
    3

    Default mtx -f /dev/sg3 hangs

    Hello,

    Linux mt/mtx query - I'm not familiar enough with them to know what I'm looking at. I've just acquired a Quantum Scalar i80 with two LTO5 drives which is connected to the Ubuntu 10 server via SAS (a LSI Fusion-MPT HBA). At this precise moment I'm struggling to get mtx to give a response on the i80, yet the OS appears to be seeing it (there is also single LTO4 drive built in to the HP box):

    # lsscsi -g
    [0:0:0:0] disk ATA GB0160EAPRR HPG2 /dev/sda /dev/sg0
    [3:0:0:0] tape HP Ultrium 5-SCSI Z3CZ /dev/st0 /dev/sg2
    [3:0:0:1] mediumx QUANTUM Scalar i40-i80 130G /dev/sch0 /dev/sg3
    [3:0:1:0] tape HP Ultrium 5-SCSI Z3CZ /dev/st1 /dev/sg4
    [5:0:0:0] disk ATA Hitachi HDS5C302 ML6O /dev/sdb /dev/sg1
    [7:0:0:0] tape HP Ultrium 4-SCSI U52D /dev/st2 /dev/sg5

    All well and good. But... running "mtx -f /dev/sg3 inquiry" just hangs.

    Running mtx inquiry on the two LTO5 drives produces what looks like sensible output (should the Attached Changer API line say "No" though?):
    # mtx -f /dev/sg4 inquiry
    Product Type: Tape Drive
    Vendor ID: 'HP '
    Product ID: 'Ultrium 5-SCSI '
    Revision: 'Z3CZ'
    Attached Changer API: No

    # mtx -f /dev/sg2 inquiry
    Product Type: Tape Drive
    Vendor ID: 'HP '
    Product ID: 'Ultrium 5-SCSI '
    Revision: 'Z3CZ'
    Attached Changer API: No

    And running mt on sg3 produces:
    # mt -f /dev/sg3 status
    /dev/sg3: Device or resource busy

    Nothing appears in /var/log/messages.

    Any advice where to look?

    Alcina

  2. #2
    Join Date
    Jul 2011
    Posts
    3

    Talking

    Have found my own answer.....

    This mysteriously "fixed itself" a couple of weeks later and I never got to the bottom of the problem. But it's happened again and as google kept finding this original post in my quest for a solution, I thought I'd update the thread so that the next time it happens I can google my own post again and lo the answer will be documented

    The trick was to install sg_map (part of sg3-utils) which told me that /dev/sg6 (I now have more scsi devices and /dev/sg6 is now my changer) was busy.

    # sudo sg_map
    /dev/sg0 /dev/sda
    /dev/sg1 /dev/sdb
    /dev/sg2 /dev/sdc
    /dev/sg3 /dev/sdd
    /dev/sg4 /dev/sde
    /dev/sg5 /dev/nst0
    /dev/sg6 busy
    /dev/sg7 /dev/nst1
    /dev/sg8 /dev/nst2

    So...what's keeping the changer busy?

    # lsof /dev/sg6
    COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
    dplinsdr 2119 root 29u CHR 21,6 0t0 2929 /dev/sg6

    Aha! dplinsdr is part of the HP Data Protector software which was installed on this machine before I arrived and which I don't wish to use any more. Killing the dplinsdr process freed up /dev/sg6 and now "mtx -f /dev/sg6 status" gives a suitable response!

    Huzzah! See you next google Alcina!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •