I'm using mhvtl 1.5 with gentoo kernel 4.4.6, I have compiled the kernel modules and the software and I can start it succesfully
when I try to inventory the changer I get nothing, tapeinfo shows: g50-80 mhvtl # tapeinfo -f /dev/sg2 Product Type: Tape Drive Vendor ID: 'IBM ' Product ID: 'ULT3580-TD5 ' Revision: '0105' Attached Changer API: No SerialNumber: 'XYZZY_A1 ' MinBlock: 4 MaxBlock: 2097152 SCSI ID: 1 SCSI LUN: 0 Ready: yes WriteProtect: yes BufferedMode: yes Medium Type: 0x38 Density Code: 0x44 BlockSize: 0 DataCompEnabled: yes DataCompCapable: yes DataDeCompEnabled: yes CompType: 0xffffffff DeCompType: 0xffffffff BOP: yes Block Position: 0 Partition 0 Remaining Kbytes: 1048576 Partition 0 Size in Kbytes: 1048576 ActivePartition: 0 EarlyWarningSize: 0 loading works: Drive 0 Full (Storage Element 1 loaded) rewinding and using tar to write to the tape does not work: g50-80 mhvtl # tar cvf /dev/sg2 library_contents.10 library_contents.10 tar: /dev/sg2: Cannot write: Cannot allocate memory tar: Error is not recoverable: exiting now g50-80 mhvtl # mt -f /dev/sg2 rewind /dev/sg2: Operation not permitted thanks |
Administrator
|
The tar & mt commands need to use the /dev/st or /dev/nst (no rewind) devices. Not the scsi pass through /dev/sg paths. You can use "lsscsi -g" to list both paths. Sent from my autocorrecting iPhone
Regards from Australia
Mark Harvey |
good to know, I have been able to rewind using those device files, I still cannot write though :(
g50-80 kernel # tar cvzf /dev/st0 /home/adel/.tat tar: Removing leading `/' from member names /home/adel/.tat tar (child): /dev/st0: Cannot open: Read-only file system tar (child): Error is not recoverable: exiting now tar: Child returned status 2 tar: Error is not recoverable: exiting now this is what I get in journalctl: Oct 14 07:40:15 g50-80 vtltape[18866]: CDB (202) (delay 89205): 00 00 00 00 00 00 Oct 14 07:40:15 g50-80 vtltape[18866]: ssc_tur(): Test Unit Ready (202) ** : Yes Oct 14 07:40:15 g50-80 vtltape[18866]: CDB (203) (delay 405): 05 00 00 00 00 00 Oct 14 07:40:15 g50-80 vtltape[18866]: ssc_read_block_limits(): READ BLOCK LIMITS (203) ** Oct 14 07:40:15 g50-80 vtltape[18866]: CDB (204) (delay 405): 1a 00 00 00 0c 00 Oct 14 07:40:15 g50-80 vtltape[18866]: spc_mode_sense(): MODE SENSE 6 (204) ** and when I rewind: Oct 14 07:40:05 g50-80 vtltape[18866]: CDB (198) (delay 250005): 00 00 00 00 00 00 Oct 14 07:40:05 g50-80 vtltape[18866]: ssc_tur(): Test Unit Ready (198) ** : Yes Oct 14 07:40:05 g50-80 vtltape[18866]: CDB (199) (delay 405): 05 00 00 00 00 00 Oct 14 07:40:05 g50-80 vtltape[18866]: ssc_read_block_limits(): READ BLOCK LIMITS (199) ** Oct 14 07:40:05 g50-80 vtltape[18866]: CDB (200) (delay 405): 1a 00 00 00 0c 00 Oct 14 07:40:05 g50-80 vtltape[18866]: spc_mode_sense(): MODE SENSE 6 (200) ** Oct 14 07:40:05 g50-80 vtltape[18866]: CDB (201) (delay 405): 01 00 00 00 00 00 Oct 14 07:40:05 g50-80 vtltape[18866]: ssc_rewind(): REWINDING (201) ** Oct 14 07:40:05 g50-80 vtltape[18866]: rewind_tape(): Media is writable thanks |
Hello,
That's because the tape is write protected accordingly by your output:
g50-80 mhvtl # tapeinfo -f /dev/sg2
Product Type: Tape Drive
Vendor ID: 'IBM '
Product ID: 'ULT3580-TD5 '
Revision: '0105'
Attached Changer API: No
SerialNumber: 'XYZZY_A1 '
MinBlock: 4
MaxBlock: 2097152
SCSI ID: 1
SCSI LUN: 0
Ready: yes
WriteProtect: yes
BufferedMode: yes
Medium Type: 0x38
Density Code: 0x44
BlockSize: 0
DataCompEnabled: yes
DataCompCapable: yes
DataDeCompEnabled: yes
CompType: 0xffffffff
DeCompType: 0xffffffff
BOP: yes
Block Position: 0
Partition 0 Remaining Kbytes: 1048576
Partition 0 Size in Kbytes: 1048576
ActivePartition: 0
EarlyWarningSize: 0
Can you please post the library_contents.10 file?
Best regards,
Nuno Fernandes
|
Hello,
Now in correct form.... That's because the tape is write protected accordingly by your output: g50-80 mhvtl # tapeinfo -f /dev/sg2 Product Type: Tape Drive Vendor ID: 'IBM ' Product ID: 'ULT3580-TD5 ' Revision: '0105' Attached Changer API: No SerialNumber: 'XYZZY_A1 ' MinBlock: 4 MaxBlock: 2097152 SCSI ID: 1 SCSI LUN: 0 Ready: yes WriteProtect: yes BufferedMode: yes Medium Type: 0x38 Density Code: 0x44 BlockSize: 0 DataCompEnabled: yes DataCompCapable: yes DataDeCompEnabled: yes CompType: 0xffffffff DeCompType: 0xffffffff BOP: yes Block Position: 0 Partition 0 Remaining Kbytes: 1048576 Partition 0 Size in Kbytes: 1048576 ActivePartition: 0 EarlyWarningSize: 0 Can you please post the library_contents file? Best regards, Nuno Fernandes |
I really appreciate your assistance, thanks
here's my library contents: Drive 1: Picker 1: MAP 1: MAP 2: MAP 3: MAP 4: Slot 1: E01001L4 Slot 2: E01002L4 Slot 3: E01003L4 Slot 4: E01004L4 Slot 5: E01005L4 Slot 6: E01006L4 Slot 7: E01007L4 Slot 8: E01008L4 Slot 9: E01009L4 Slot 10: E01010L4 Slot 11: E01011L4 Slot 12: E01012L4 Slot 13: E01013L4 Slot 14: E01014L4 Slot 15: E01015L4 Slot 16: E01016L4 Slot 17: E01017L4 Slot 18: E01018L4 Slot 19: E01019L4 Slot 20: E01020L4 Slot 21: Slot 22: CLN101L4 Slot 23: CLN102L5 Slot 24: Slot 25: Slot 26: Slot 27: Slot 28: Slot 29: Slot 30: F01030L5 Slot 31: F01031L5 Slot 32: F01032L5 Slot 33: F01033L5 Slot 34: F01034L5 Slot 35: F01035L5 Slot 36: F01036L5 Slot 37: F01037L5 Slot 38: F01038L5 Slot 39: F01039L5 |
bump
|
Administrator
|
bump ??
Anyway, as outlined by Nuno, the tape drive is reporting the media is read-only. Hence the reason for not being able to write to the virtual media. Can you please provide the: - /etc/mhvtl/device.conf - ls -lR /opt/mhvtl/ - getent passwd | grep vtl - getent group | grep vtl - /var/log/messages - for at least the time frame from when the tape is initially loaded thru to running the above 'tapeinfo' command. Note: It would be nice if you could set 'VERBOSE = 3' in /etc/mhvtl/mhvtl.conf, restart mhvtl and then run the above test again and provide the /var/log/messages (or equivalent syslog)
Regards from Australia
Mark Harvey |
device.conf:
Library: 10 CHANNEL: 00 TARGET: 00 LUN: 00 Vendor identification: STK Product identification: L700 Unit serial number: XYZZY_A NAA: 10:22:33:44:ab:00:00:00 Home directory: /media/hdd/storage PERSIST: False Backoff: 400 # fifo: /var/tmp/mhvtl Drive: 11 CHANNEL: 00 TARGET: 01 LUN: 00 Library ID: 10 Slot: 01 Vendor identification: IBM Product identification: ULT3580-TD5 Unit serial number: XYZZY_A1 NAA: 10:22:33:44:ab:00:01:00 Compression: factor 1 enabled 1 Compression type: lzo Backoff: 400 # fifo: /var/tmp/mhvtl /opt/mhvtl: /opt/mhvtl/: total 0 drwxrwx--- 2 vtl vtl 6 Oct 13 18:56 51 /opt/mhvtl/51: total 0 /media/hdd/storage: /media/hdd/storage: total 0 drwxrwx--- 2 vtl vtl 42 Oct 13 19:10 00 drwxrwx--- 2 vtl vtl 42 Oct 13 19:20 CLN101L4 drwxrwx--- 2 vtl vtl 42 Oct 13 19:20 CLN102L5 drwxrwx--- 2 vtl vtl 42 Oct 13 19:20 E01001L4 drwxrwx--- 2 vtl vtl 42 Oct 13 19:20 E01002L4 drwxrwx--- 2 vtl vtl 42 Oct 13 19:20 E01003L4 drwxrwx--- 2 vtl vtl 42 Oct 13 19:20 E01004L4 drwxrwx--- 2 vtl vtl 42 Oct 13 19:20 E01005L4 drwxrwx--- 2 vtl vtl 42 Oct 13 19:20 E01006L4 drwxrwx--- 2 vtl vtl 42 Oct 13 19:20 E01007L4 drwxrwx--- 2 vtl vtl 42 Oct 13 19:20 E01008L4 drwxrwx--- 2 vtl vtl 42 Oct 13 19:20 E01009L4 drwxrwx--- 2 vtl vtl 42 Oct 13 19:20 E01010L4 drwxrwx--- 2 vtl vtl 42 Oct 13 19:20 E01011L4 drwxrwx--- 2 vtl vtl 42 Oct 13 19:20 E01012L4 drwxrwx--- 2 vtl vtl 42 Oct 13 19:20 E01013L4 drwxrwx--- 2 vtl vtl 42 Oct 13 19:20 E01014L4 drwxrwx--- 2 vtl vtl 42 Oct 13 19:20 E01015L4 drwxrwx--- 2 vtl vtl 42 Oct 13 19:20 E01016L4 drwxrwx--- 2 vtl vtl 42 Oct 13 19:20 E01017L4 drwxrwx--- 2 vtl vtl 42 Oct 13 19:20 E01018L4 drwxrwx--- 2 vtl vtl 42 Oct 13 19:20 E01019L4 drwxrwx--- 2 vtl vtl 42 Oct 13 19:20 E01020L4 drwxrwx--- 2 vtl vtl 42 Oct 13 19:20 F01030L5 drwxrwx--- 2 vtl vtl 42 Oct 13 19:20 F01031L5 drwxrwx--- 2 vtl vtl 42 Oct 13 19:20 F01032L5 drwxrwx--- 2 vtl vtl 42 Oct 13 19:20 F01033L5 drwxrwx--- 2 vtl vtl 42 Oct 13 19:20 F01034L5 drwxrwx--- 2 vtl vtl 42 Oct 13 19:20 F01035L5 drwxrwx--- 2 vtl vtl 42 Oct 13 19:20 F01036L5 drwxrwx--- 2 vtl vtl 42 Oct 13 19:20 F01037L5 drwxrwx--- 2 vtl vtl 42 Oct 13 19:20 F01038L5 drwxrwx--- 2 vtl vtl 42 Oct 13 19:20 F01039L5 /media/hdd/storage/00: total 4 -rw-rw---- 1 vtl vtl 0 Oct 13 19:10 data -rw-rw---- 1 vtl vtl 0 Oct 13 19:10 indx -rw-rw---- 1 vtl vtl 1536 Oct 13 19:16 meta /media/hdd/storage/CLN101L4: total 4 -rw-rw---- 1 vtl vtl 0 Oct 13 19:20 data -rw-rw---- 1 vtl vtl 0 Oct 13 19:20 indx -rw-rw---- 1 vtl vtl 1536 Oct 13 19:20 meta /media/hdd/storage/CLN102L5: total 4 -rw-rw---- 1 vtl vtl 0 Oct 13 19:20 data -rw-rw---- 1 vtl vtl 0 Oct 13 19:20 indx -rw-rw---- 1 vtl vtl 1536 Oct 13 19:20 meta /media/hdd/storage/E01001L4: total 4 -rw-rw---- 1 vtl vtl 0 Oct 13 19:20 data -rw-rw---- 1 vtl vtl 0 Oct 13 19:20 indx -rw-rw---- 1 vtl vtl 1536 Oct 14 08:36 meta /media/hdd/storage/E01002L4: total 4 -rw-rw---- 1 vtl vtl 0 Oct 13 19:20 data -rw-rw---- 1 vtl vtl 0 Oct 13 19:20 indx -rw-rw---- 1 vtl vtl 1536 Oct 13 19:20 meta /media/hdd/storage/E01003L4: total 4 -rw-rw---- 1 vtl vtl 0 Oct 13 19:20 data -rw-rw---- 1 vtl vtl 0 Oct 13 19:20 indx -rw-rw---- 1 vtl vtl 1536 Oct 13 19:20 meta /media/hdd/storage/E01004L4: total 4 -rw-rw---- 1 vtl vtl 0 Oct 13 19:20 data -rw-rw---- 1 vtl vtl 0 Oct 13 19:20 indx -rw-rw---- 1 vtl vtl 1536 Oct 13 19:20 meta /media/hdd/storage/E01005L4: total 4 -rw-rw---- 1 vtl vtl 0 Oct 13 19:20 data -rw-rw---- 1 vtl vtl 0 Oct 13 19:20 indx -rw-rw---- 1 vtl vtl 1536 Oct 13 19:20 meta /media/hdd/storage/E01006L4: total 4 -rw-rw---- 1 vtl vtl 0 Oct 13 19:20 data -rw-rw---- 1 vtl vtl 0 Oct 13 19:20 indx -rw-rw---- 1 vtl vtl 1536 Oct 13 19:20 meta /media/hdd/storage/E01007L4: total 4 -rw-rw---- 1 vtl vtl 0 Oct 13 19:20 data -rw-rw---- 1 vtl vtl 0 Oct 13 19:20 indx -rw-rw---- 1 vtl vtl 1536 Oct 13 19:20 meta /media/hdd/storage/E01008L4: total 4 -rw-rw---- 1 vtl vtl 0 Oct 13 19:20 data -rw-rw---- 1 vtl vtl 0 Oct 13 19:20 indx -rw-rw---- 1 vtl vtl 1536 Oct 13 19:20 meta /media/hdd/storage/E01009L4: total 4 -rw-rw---- 1 vtl vtl 0 Oct 13 19:20 data -rw-rw---- 1 vtl vtl 0 Oct 13 19:20 indx -rw-rw---- 1 vtl vtl 1536 Oct 13 19:20 meta /media/hdd/storage/E01010L4: total 4 -rw-rw---- 1 vtl vtl 0 Oct 13 19:20 data -rw-rw---- 1 vtl vtl 0 Oct 13 19:20 indx -rw-rw---- 1 vtl vtl 1536 Oct 13 19:20 meta /media/hdd/storage/E01011L4: total 4 -rw-rw---- 1 vtl vtl 0 Oct 13 19:20 data -rw-rw---- 1 vtl vtl 0 Oct 13 19:20 indx -rw-rw---- 1 vtl vtl 1536 Oct 13 19:20 meta /media/hdd/storage/E01012L4: total 4 -rw-rw---- 1 vtl vtl 0 Oct 13 19:20 data -rw-rw---- 1 vtl vtl 0 Oct 13 19:20 indx -rw-rw---- 1 vtl vtl 1536 Oct 13 19:20 meta /media/hdd/storage/E01013L4: total 4 -rw-rw---- 1 vtl vtl 0 Oct 13 19:20 data -rw-rw---- 1 vtl vtl 0 Oct 13 19:20 indx -rw-rw---- 1 vtl vtl 1536 Oct 13 19:20 meta /media/hdd/storage/E01014L4: total 4 -rw-rw---- 1 vtl vtl 0 Oct 13 19:20 data -rw-rw---- 1 vtl vtl 0 Oct 13 19:20 indx -rw-rw---- 1 vtl vtl 1536 Oct 13 19:20 meta /media/hdd/storage/E01015L4: total 4 -rw-rw---- 1 vtl vtl 0 Oct 13 19:20 data -rw-rw---- 1 vtl vtl 0 Oct 13 19:20 indx -rw-rw---- 1 vtl vtl 1536 Oct 13 19:20 meta /media/hdd/storage/E01016L4: total 4 -rw-rw---- 1 vtl vtl 0 Oct 13 19:20 data -rw-rw---- 1 vtl vtl 0 Oct 13 19:20 indx -rw-rw---- 1 vtl vtl 1536 Oct 13 19:20 meta /media/hdd/storage/E01017L4: total 4 -rw-rw---- 1 vtl vtl 0 Oct 13 19:20 data -rw-rw---- 1 vtl vtl 0 Oct 13 19:20 indx -rw-rw---- 1 vtl vtl 1536 Oct 13 19:20 meta /media/hdd/storage/E01018L4: total 4 -rw-rw---- 1 vtl vtl 0 Oct 13 19:20 data -rw-rw---- 1 vtl vtl 0 Oct 13 19:20 indx -rw-rw---- 1 vtl vtl 1536 Oct 13 19:20 meta /media/hdd/storage/E01019L4: total 4 -rw-rw---- 1 vtl vtl 0 Oct 13 19:20 data -rw-rw---- 1 vtl vtl 0 Oct 13 19:20 indx -rw-rw---- 1 vtl vtl 1536 Oct 13 19:20 meta /media/hdd/storage/E01020L4: total 4 -rw-rw---- 1 vtl vtl 0 Oct 13 19:20 data -rw-rw---- 1 vtl vtl 0 Oct 13 19:20 indx -rw-rw---- 1 vtl vtl 1536 Oct 13 19:20 meta /media/hdd/storage/F01030L5: total 4 -rw-rw---- 1 vtl vtl 0 Oct 13 19:20 data -rw-rw---- 1 vtl vtl 0 Oct 13 19:20 indx -rw-rw---- 1 vtl vtl 1536 Oct 13 19:20 meta /media/hdd/storage/F01031L5: total 4 -rw-rw---- 1 vtl vtl 0 Oct 13 19:20 data -rw-rw---- 1 vtl vtl 0 Oct 13 19:20 indx -rw-rw---- 1 vtl vtl 1536 Oct 13 19:20 meta /media/hdd/storage/F01032L5: total 4 -rw-rw---- 1 vtl vtl 0 Oct 13 19:20 data -rw-rw---- 1 vtl vtl 0 Oct 13 19:20 indx -rw-rw---- 1 vtl vtl 1536 Oct 13 19:20 meta /media/hdd/storage/F01033L5: total 4 -rw-rw---- 1 vtl vtl 0 Oct 13 19:20 data -rw-rw---- 1 vtl vtl 0 Oct 13 19:20 indx -rw-rw---- 1 vtl vtl 1536 Oct 13 19:20 meta /media/hdd/storage/F01034L5: total 4 -rw-rw---- 1 vtl vtl 0 Oct 13 19:20 data -rw-rw---- 1 vtl vtl 0 Oct 13 19:20 indx -rw-rw---- 1 vtl vtl 1536 Oct 13 19:20 meta /media/hdd/storage/F01035L5: total 4 -rw-rw---- 1 vtl vtl 0 Oct 13 19:20 data -rw-rw---- 1 vtl vtl 0 Oct 13 19:20 indx -rw-rw---- 1 vtl vtl 1536 Oct 13 19:20 meta /media/hdd/storage/F01036L5: total 4 -rw-rw---- 1 vtl vtl 0 Oct 13 19:20 data -rw-rw---- 1 vtl vtl 0 Oct 13 19:20 indx -rw-rw---- 1 vtl vtl 1536 Oct 13 19:20 meta /media/hdd/storage/F01037L5: total 4 -rw-rw---- 1 vtl vtl 0 Oct 13 19:20 data -rw-rw---- 1 vtl vtl 0 Oct 13 19:20 indx -rw-rw---- 1 vtl vtl 1536 Oct 13 19:20 meta /media/hdd/storage/F01038L5: total 4 -rw-rw---- 1 vtl vtl 0 Oct 13 19:20 data -rw-rw---- 1 vtl vtl 0 Oct 13 19:20 indx -rw-rw---- 1 vtl vtl 1536 Oct 13 19:20 meta /media/hdd/storage/F01039L5: total 4 -rw-rw---- 1 vtl vtl 0 Oct 13 19:20 data -rw-rw---- 1 vtl vtl 0 Oct 13 19:20 indx -rw-rw---- 1 vtl vtl 1536 Oct 13 19:20 meta passwd: vtl:x:1002:1002::/home/vtl:/bin/bash group: vtl:x:1002: I've set verbose to 3, here's my journalctl for the start of theservice, loading the tape, trying to write: http://pastebin.com/s3dF3ncZ thanks |
help anyone?
|
Administrator
|
Apologies for not responding earlier..
Many thanks for the verbose 3 logs. It shows the following sequence You have configured the drive as 'LTO-5' i.e. Drive: 11 CHANNEL: 00 TARGET: 01 LUN: 00 Library ID: 10 Slot: 01 Vendor identification: IBM Product identification: ULT3580-TD5 Unit serial number: XYZZY_A1 NAA: 10:22:33:44:ab:00:01:00 Compression: factor 1 enabled 1 Compression type: lzo Backoff: 400 # fifo: /var/tmp/mhvtl Oct 26 11:33:27 g50-80 vtltape[10703]: loadTape(): Media type 'LTO3' loaded with S/No. : E01001L4_1476375640 and Oct 26 11:33:27 g50-80 vtltape[10703]: loadTape(): Mounting READ ONLY Some how, this media with a barcode containing an L4 suffix has been configured as LTO-3 media. IBM LTO tape drives will read/write to its native format plus one version back. They will read up to two versions back. Hence, mounting an LTO-3 media into LTO5 tape drive will be read-only. You can use the 'edit_tape' command to update the tape format if this is not expected. You can use the 'dump_tape' command to view the tape details. FWIW: The tape was created on 'Thu, 13 Oct 2016 16:20:40 GMT' (Obviously, you will need to add/subtract your local TZ from this GMT time)
Regards from Australia
Mark Harvey |
Thanks for your reply, I have been able to write using tar at last:
g50-80 mhvtl # tar cvzf /dev/nst0 /etc/fstab tar: Removing leading `/' from member names /etc/fstab I have created an LTO5 tape as you had mentioned and problem solved thank you very much :) |
Free forum by Nabble | Edit this page |