Re: ioscsitape

79 views
Skip to first unread message

Jesse Peterson

unread,
Nov 3, 2012, 10:28:51 PM11/3/12
to tesme33, ioscsitap...@googlegroups.com
How interesting!

Hope you don't me copying the list.

On Nov 1, 2012, at 2:24 AM, tesme33 wrote:


sh-3.2# mt -f /dev/rst0 stat
SCSI tape drive, residual=0
ds=1<>
er=0
blocksize: 0 (0, 0, 0, 0)
density: 0 (0, 0, 0, 0)
current file number: -1
current block number: -1

Sounds about right for a freshly attached IOSCSITape.

sh-3.2# mt -f /dev/rst0 blocksize 131072
mt: /dev/rst0: blocksize: Operation not supported by device

This is very odd. I haven't seen this before. This is a straigt-forward SCSI command to set the blocking mode. I'd love to test on this device!

sh-3.2# mt -f /dev/rst0 stat
SCSI tape drive, residual=0
ds=1<>
er=0
blocksize: 0 (0, 0, 0, 0)
density: 0 (0, 0, 0, 0)
current file number: -1
current block number: -1

Yes, because it has failed in setting the mode nothing has changed. The "blockszie: 0" should have changed to "blocksize: 131072".


Log messages:
filtered for st0
31.10.12 09:12:42,000 kernel[0]: rst0: <HP, DAT160, WU8A> tape
31.10.12 09:12:42,000 kernel[0]: rst0: SENSE: Unit Attention (Key: 0x6, ASC: 0x29, ASCQ: 0x01)
31.10.12 09:12:42,000 kernel[0]: rst0: min/max block size: 1/16777215
31.10.12 09:15:25,000 kernel[0]: rst0: SENSE: Unit Attention (Key: 0x6, ASC: 0x28, ASCQ: 0x00)
31.10.12 10:27:57,000 kernel[0]: rst0: <HP, DAT160, WU8A> tape
31.10.12 10:27:57,000 kernel[0]: rst0: SENSE: Unit Attention (Key: 0x6, ASC: 0x29, ASCQ: 0x01)
31.10.12 10:27:57,000 kernel[0]: rst0: min/max block size: 1/16777215
31.10.12 10:29:46,000 kernel[0]: rst0: SENSE: Not Ready (Key: 0x2, ASC: 0x3A, ASCQ: 0x00)
31.10.12 10:30:30,000 kernel[0]: rst0: SENSE: Unit Attention (Key: 0x6, ASC: 0x28, ASCQ: 0x00)
01.11.12 09:54:33,000 kernel[0]: rst0: SENSE: Unit Attention (Key: 0x6, ASC: 0x28, ASCQ: 0x00)

Add, SENSE errors - I'd love to be able to debug why these are happening with this unit.



filtered for IOSCSI
30.10.12 20:51:16,000 kernel[0]: IOSCSIPeripheralDeviceType05::setPowerState(0xffffff801b327c00, 0 -> 4) timed out after 100849 ms
30.10.12 20:53:38,000 kernel[0]: IOSCSIPeripheralDeviceType05::setPowerState(0xffffff801b327c00, 4 -> 3) timed out after 100840 ms
30.10.12 21:00:26,447 configd[17]:   Macmini5,3/AppleACPIPlatformExpert/PCI0@0/AppleACPIPCI/EHC1@1D,7/AppleUSBEHCI/DAT160 USB Tape@fd120000/SCSI Over USB䁣왞ᰑ及໣鋗看赨@0/IOUSBMassStorageClass/IOSCSIPeripheralDeviceNub [!matched, 1, 71097 ms]
31.10.12 09:09:38,790 com.apple.kextcache[1248]: IOSCSITape.kext is not authentic; omitting.
31.10.12 09:10:43,210 com.apple.kextd[12]: Can't load /System/Library/Extensions/IOSCSITape.kext - authentication problems.
---> In order to load I had to disable assessments:
sh-3.2# spctl  --status
assessments disabled
I tried to read the tape on a linux box with an SAS DAT tape and this works :-)

Now some tests with an 320GB USB DAT:

01.11.12 10:18:10,000 kernel[0]: rst0: <HP, DAT320, VUA2> tape
01.11.12 10:18:10,000 kernel[0]: rst0: SENSE: Not Ready (Key: 0x2, ASC: 0x3E, ASCQ: 0x00)
01.11.12 10:18:10,000 kernel[0]: rst0: SENSE: Not Ready (Key: 0x2, ASC: 0x3E, ASCQ: 0x00)

sh-3.2# mt -f /dev/rst0 stat
SCSI tape drive, residual=0
ds=1<>
er=0
blocksize: 0 (0, 0, 0, 0)
density: 0 (0, 0, 0, 0)
current file number: -1
current block number: -1

tar works but i have to start it twice.

sh-3.2# tar cvf /dev/rst0 ./backup
a ./backup
a ./backup/doku
a ./backup/conny
a ./backup/stuebi
a ./backup/DR-QUARK-stuebi
a ./backup/.Trashes
a ./backup/.TemporaryItems
a ./backup/.VolumeIcon.icnstar: Write error
sh-3.2# tar cvf /dev/rst0 ./backup
a ./backup
a ./backup/doku
a ./backup/conny
a ./backup/stuebi
a ./backup/DR-QUARK-stuebi
a ./backup/.Trashes
a ./backup/.TemporaryItems
a ./backup/.VolumeIcon.icns
a ./backup/imap
... now it works ...

01.11.12 10:20:27,000 kernel[0]: rst0: SENSE: Unit Attention (Key: 0x6, ASC: 0x28, ASCQ: 0x00)


After the first failure it seems to work always.

Very interesting. I'm pretty sure there are some blatantly plain logic or off-by-one errors that I never got the chance to run through (lack of hardware). I don't understand why you're getting SENSE errors for these simple operations. Again I'd love to test using your hardware to figure out what's going on!

THanks,
- Jesse


Br
Wieland

Am 31.10.12 18:28, schrieb Jesse Peterson:
Huh, interesting. My comments inline:

On Oct 31, 2012, at 1:28 AM, tesme33 <tes...@googlemail.com> wrote:

Hi
i just saw that you requested some more details.

Comment 1 by project member jesse.c....@gmail.com, Apr 21, 2012Can you provide a listing of "mt -f /dev/rst0 status". This will list the blocksize settings and we can debug from there. 
Unluckily im now on 10.8 with my server and the MacPro i used last time is now sold, now im on a macmini server 2011, MacOSX 10.8.2 
with an HP DAT160 USB.
Last time i was able to recompile it and then it was working with default values.

Now im a little bit stuck with 10.8. It compiles with some warnings.


I tried to use the pkg you provided but it works with tar but mt seems not.

sh-3.2# mt -f /dev/rst0 stat
SCSI tape drive, residual=0
ds=1<>
er=0
blocksize: 0 (0, 0, 0, 0)
density: 0 (0, 0, 0, 0)
current file number: -1
current block number: -1
Well, this is "sort of" working. It reports all the right things - though the density code is 0.

However the block size is 0. This means the tape is in "variable blocking mode". Since I do not have a tape that is variable blocking mode capable then it is the least tested. Try setting the blocking to 128k:

mt -f /dev/rst0 blocksize 131072

Then try tar as usual to read and write.

sh-3.2# tar cvf /dev/rst0 ./Library
a ./Library
a ./Library/.DS_Store
a ./Library/.localized
a ./Library/Accounts
a ./Library/Address Book Plug-Ins
a ./Library/Application Scripts
a ./Library/Application Support
…
This is confusing - this appears to say it's working. Is something not working? Does it not read back any data?

Try setting the block size. Also what does /var/log/kernel.log report when IOSCSITape detect the tape drive?

Yours
Wieland

P.S.: I didnt program for year now im triying to get back. Do you have some material you used to start with your Ext ?
By ext do you mean kernel extension? I only had SCSI references, Apple documentation, and Google at my side.

Thanks!
- Jesse




Reply all
Reply to author
Forward
0 new messages