It sounds like the "append-only mode" described in:

https://www.dell.com/community/en/conversations/celerra/ndmp-backups-to-ibm-ultrium-td5-drive/647f195bf4ccf8a8dec3aa95
https://www.ibm.com/docs/en/ts4300-tape-library?topic=features-data-safe-append-only-mode
https://support.oracle.com/knowledge/Sun%20Microsystems/1368914_1.html

__Martin


>>>>> On Thu, 18 Apr 2024 18:41:12 -0300 (BRT), Heitor Faria said:
> 
> Dear Bacula Users,
> 
> 
> 
> I wonder if someone had faced a similar problem that have been haunting me 
> for weeks and I found no exact similar case on the internet.
> 
> This partitioned tape library with two drivers for the Bacula machine cannot 
> perform a weof diretcly:
> 
> 
> 
> [root@localhost Device]# mt -f /dev/tape/by-id/scsi-35005076044064c01-nst weof
> /dev/tape/by-id/scsi-35005076044064c01-nst: Input/output error
> mt: The tape is write-protected.
> 
> 
> 
> 
> And the dmesg displays the error:
> 
> 
> 
> [Thu Apr 18 17:32:01 2024] st 14:0:0:0: [st0] Sense Key : Data Protect 
> [current]
> [Thu Apr 18 17:32:01 2024] st 14:0:0:0: [st0] Add. Sense: Operator selected 
> write protect
> 
> 
> 
> 
> However, if we do an eod before weof, it displays no error.
> 
> 
> 
> [root@localhost Device]# mt -f /dev/tape/by-id/scsi-35005076044064c01-nst eod
> [root@localhost Device]# mt -f /dev/tape/by-id/scsi-35005076044064c01-nst weof
> 
> 
> 
> 
> But still, I cannot use the tape with Bacula, or test it with btape:
> 
> 
> 
> [root@localhost Device]# /opt/bacula/bin/btape  
> /dev/tape/by-id/scsi-35005076044064c01-nst
> Tape block granularity is 1024 bytes.
> btape: butil.c:296-0 Using device: 
> "/dev/tape/by-id/scsi-35005076044064c01-nst" for writing.
> btape: btape.c:475-0 open device "Drive-0" 
> (/dev/tape/by-id/scsi-35005076044064c01-nst): OK
> *label
> Enter Volume Name: test
> btape: block.c:301-0 [SE0201] Write error at 0:0 on device "Drive-0" 
> (/dev/tape/by-id/scsi-35005076044064c01-nst) Vol=test. ERR=Input/output error.
> 18-Apr 17:39 btape JobId 0: Error: block.c:301 [SE0201] Write error at 0:0 on 
> device "Drive-0" (/dev/tape/by-id/scsi-35005076044064c01-nst) Vol=test. 
> ERR=Input/output error.
> 
> 
> 
> 
> And the same dmesg Data Protect message appears. 
> 
> The curious thing is we are able to write and restore some files using tar 
> using the same drive, but only if we manually move the tape:
> 
> 
> 
> [root@localhost Device]# tar cvf /dev/tape/by-id/scsi-35005076044064c01-nst 
> /etc/resolv.conf
> tar: Removing leading `/' from member names
> /etc/resolv.conf
> [root@localhost Device]# tar tvf /dev/tape/by-id/scsi-35005076044064c01-nst
> tar: This does not look like a tar archive
> tar: Exiting with failure status due to previous errors
> [root@localhost Device]# mt -f /dev/tape/by-id/scsi-35005076044064c01-nst bsf 
> 2
> [root@localhost Device]# mt -f /dev/tape/by-id/scsi-35005076044064c01-nst fsf
> [root@localhost Device]# tar tvf /dev/tape/by-id/scsi-35005076044064c01-nst
> -rw-r--r-- root/root        74 2024-04-18 16:24 etc/resolv.conf
> 
> 
> 
> 
> mt status as follows:
> 
> 
> 
> [root@localhost Device]# mt -f /dev/tape/by-id/scsi-35005076044064c01-nst 
> status
> SCSI 2 tape drive:
> File number=20, block number=1, partition=0.
> Tape block size 0 bytes. Density code 0x5c (LTO-7).
> Soft error count since last status=0
> General status bits on (1010000):
>  ONLINE IM_REP_EN
> 
> 
> 
> 
> The tapes are new, LTO7 such as the drive, the red read-only physical tape 
> switches are open, no encryption is used by the drivers.
> 
> We already tried two different OSes with the same behavior. Ubuntu and Rocky 
> Linux.
> 
> There are no relevant tape library error logs.
> 
> Any hints?
> 
> 
> 
> Rgds.
> 
> 
> MSc,MBA Heitor Faria (Miami/USA)
> Bacula LATAM CIO
> 
> mobile1: + 1 909 655-8971
> mobile2: + 55 61 98268-4220
> 
>       
> 
> bacula.lat | bacula.com.br
> 
> 
> 


_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to