Unable to read tape label.

Here you can write any Problems with Restores.

Moderator: sepma

Post Reply
mhogendoorn
Posts: 2
Joined: January 24th, 2014, 11:10 am
Spam Stop: No
SEP sesam: Software

Unable to read tape label.

Post by mhogendoorn » January 24th, 2014, 11:30 am

Hello,

We are using : with LTO 4 drives
Operating system : Ubuntu Linux 8.04.4
Kernel: server,4.2.1.34,20121221132850
GUI Server: V4.2 Build 2 R 1.16958

But when i try to read the tape label he says no tape label found.

20140124 09:24:03 [20579] Version Info: $Id: sms_interface_main.c,v 1.95 2011/07/12 08:44:51 miraculix Exp $
20140124 09:24:03 [20579] sm_sms_interface "getlabel" "-d" "/dev/nst0"
20140124 09:24:03 [20579] Open pipe [/var/opt/sesam/var/work/ctl/.WRT_PIPE_DATA0002]
20140124 09:24:09 [20579] STATUS=SUCCESS MSG="Tapelabel = PE,TapeID = 0.000000,Tapeinfo = F, BlockSize = 0, Creation Date = -"

Is there a option to catalog media ?

Greetz,

Hogendoorn

jgb
Posts: 55
Joined: June 27th, 2011, 11:11 am
Spam Stop: No
SEP sesam: Software

Re: Unable to read tape label.

Post by jgb » January 29th, 2014, 11:27 am

Hello,

It's possible that there is no label on tape ?

please try on sesam server shell as root:

source /var/opt/sesam/var/ini/sesam2000.profile

sm_sms_interface getlabel -d /dev/nst0 -v 5

With the "-v 5" you will get verbose output for the command. May be, you can see what's going wrong.

You can also try ( mt package required):

mt -f /dev/nst0 rewind
mt -f /dev/nst0 status

The output should contain:

block number = 0

Next:

dd if=/dev/nst0 of=/tmp/header.txt bs=2k count=1

The file /tmp/header.txt should include the sesam label:

2BDaypool100008 INIT_TAPE 2014-01-27 21:47:36 SESAM-volume

This is the header of an sesam labeled tape from mediapool Daypool1 .

JGB

mhogendoorn
Posts: 2
Joined: January 24th, 2014, 11:10 am
Spam Stop: No
SEP sesam: Software

Re: Unable to read tape label.

Post by mhogendoorn » January 31st, 2014, 10:25 am

Hello jgb,

thanks for trying to help me out!i tried te thinkgs you told, this is the output.

sm_sms_interface getlabel -d /dev/nst0 -v 5
20140131 10:15:05 [25806] Version Info: $Id: sms_interface_main.c,v 1.95 2011/07 /12 08:44:51 miraculix Exp $
20140131 10:15:05 [25806] sm_sms_interface "getlabel" "-d" "/dev/nst0" "-v" "5"
20140131 10:15:05 [25806] DEBUG: i_main_parameter = 2
20140131 10:15:05 [25806] INFO: sm_sms_interface: Login Type = ltINQUIRE
20140131 10:15:05 [25806] DEBUG: login_to_SMS_i: gc_device_name = /dev/nst0
20140131 10:15:05 [25806] INFO:
login_to_SMS: input parameters:
BlockSize (ignored) = 0
DeviceName = '/dev/nst0'
LoginType = 1
20140131 10:15:05 [25806] NOTICE: login_to_SMS:: Start with pipe 2 (MAX_NO_PAR_S TREAMS+2 16)
20140131 10:15:05 [25806] Open pipe [/var/opt/sesam/var/work/ctl/.WRT_PIPE_DATA0 002]
20140131 10:15:07 [25806] INFO: login_to_SMS_i: got bIsTape = TRUE
20140131 10:15:07 [25806] DEBUG: login_to_SMS_i: bSmsLoggedIn = TRUE
20140131 10:15:16 [25806] INFO: logout_from_SMS:: Close handles
20140131 10:15:16 [25806] DEBUG: logout_from_SMS_i: i_return_flag = 0
20140131 10:15:16 [25806] STATUS=SUCCESS MSG="Tapelabel = PE,TapeID = 0.000000,Tapeinfo = F, BlockSize = 0, Creation Date = -"

root@server:~# mt -f /dev/nst0 rewind
root@server:~# mt -f /dev/nst0 status

drive type = 114
drive status = 1174405120
sense key error = 0
residue count = 0

dd if=/dev/nst0 of=/tmp/header.txt bs=2k count=1
0+0 records in
0+0 records out
0 bytes (0 B) copied, 0.0215471 s, 0.0 kB/s

file number = 0
block number = 0

The text file stay's empty, does that mean the tape is realy empty?

Greetz,

Hogendoorn

jgb
Posts: 55
Joined: June 27th, 2011, 11:11 am
Spam Stop: No
SEP sesam: Software

Re: Unable to read tape label.

Post by jgb » January 31st, 2014, 11:26 am

Hello,

I'm not sure, why the output of the mt command is so short. May be it depends of the linux distribution or mt version. On my SuSE system the output is

mt -f /dev/tape/by-id/scsi-350223344ab000413-nst status
drive type = Generic SCSI-2 tape
drive status = 1174405120
sense key error = 0
residue count = 0
file number = 0
block number = 0
Tape block size 0 bytes. Density code 0x46 (unknown).
Soft error count since last status=0
General status bits on (41010000):
BOT ONLINE IM_REP_EN


Important is block and file number = 0 -> the tape is correct rewinded.

You can try to "download" more data from the tape. After rewind, use dd with a blocksize of 64k and count of 1000 (the first 6 MB on tape). If the output file is empty -> I think your tape is empty.

It's possible, that the tape have a wrong version (drive LTO-4 tape LTO-3) and the drive can read the tape but not write to ?

If you're sure, that no data on tape, you can write a ASCII file to the tape and then read it back.

mt -f /dev/nst0 rewind

dd if=/tmp/my_ASCII_file of=/dev/nst0

mt -f /dev/nst0 rewind

dd if=/dev/nst0 of=/tmp/read_from_tape.txt bs=64k count=1


The read_from_tape.txt should contain the content of your my_ASCI_file .

JGB

Post Reply