On 23.05.2007 10:28, Christoph Buchli wrote: > Now the empirical things: > - I have to _stop_ bacula to do certain test, otherwise "mtx", "tar" etc > always > tell me - as an error - that the device is busy.
Sure. While the sd is running it normally keeps the tape devices open. > > - The device could be working. I attached some command-outputs that are my > reasons to believe so: > > # tapeinfo -f /dev/sg3 > Product Type: Medium Changer > Vendor ID: 'QUANTUM ' > Product ID: 'UHDL ' > Revision: '0031' > Attached Changer: No > SerialNumber: 'CG6JC35647UH' > SCSI ID: 5 > SCSI LUN: 1 > Ready: no > > # loaderinfo -f /dev/sg3 > Product Type: Medium Changer > Vendor ID: 'QUANTUM ' > Product ID: 'UHDL ' > Revision: '0031' > Attached Changer: No > Bar Code Reader: No > EAAP: Yes > Number of Medium Transport Elements: 1 > Number of Storage Elements: 16 > Number of Import/Export Element Elements: 0 > Number of Data Transfer Elements: 1 > Transport Geometry Descriptor Page: Yes > Invertable: No > Device Configuration Page: Yes > Can Transfer: Yes > > # mt -f /dev/nst0 status > SCSI 2 tape drive: > File number=0, block number=0, partition=0. > Tape block size 512 bytes. Density code 0x44 (no translation). Tape block size should not be fixed. It should be set to 0 (variable block size). > Soft error count since last status=0 > General status bits on (41010000): > BOT ONLINE IM_REP_EN > > # tar -cf /dev/nst0 /tmp/ > tar: Removing leading `/' from member names > (This works, I guess.) > > Well now, the less funny part: > > # mtx -f /dev/sg3 status > mtx: Request Sense: 70 00 02 00 00 00 00 1E 00 00 00 00 04 03 00 00 00 00 00 > 00 > READ ELEMENT STATUS Command Failed > That *is* strange. As Arno already wrote this message is very unusual for mtx. At least, i have never seen something alike. Please check which version of mtx you have (mtx --version). Maybe using a new version could help. Take a look at: http://sourceforge.net/projects/mtx (I am using version 1.3.10) > # /usr/pack/bacula_mysql-2.0.3-rp/amd64-debian-linux3.1/scripts/mtx-changer > /dev/sg3 load 1 /dev/nst0 0 > mtx: Request Sense: 70 00 02 00 00 00 00 1E 00 00 00 00 04 03 00 00 00 00 00 > 00 > READ ELEMENT STATUS Command Failed As long as the mtx status command does not work there is no need to bother with mtx-changer because mtx-changer just depends on mtx working correctly. > > # mt -f /dev/sg3 eject > /dev/sg3: Operation not permitted > That's normal. A changer does not know how to "eject" a tape. Eject is used for tape drives. And even there, I think that it is not used with LTO drives. For your drive it should be sufficient to use mt -f /dev/nst0 offline BTW _after_ you have got mtx status working you should check whether your changer needs the drive to be offline before it could do an unload. If it does, you have to change the mtx-changer script or you'll get obscure errors when doing an unmount. > > # dmesg | tail > [168322.441562] NFSD: starting 90-second grace period > [1188266.284746] st0: Write not multiple of tape block size. > [1188301.160942] st0: Write not multiple of tape block size. > [1189175.640945] st0: Write not multiple of tape block size. > [1189249.930203] st0: Write not multiple of tape block size. > [1206329.081616] st0: Write not multiple of tape block size. > [1206335.525053] st0: Write not multiple of tape block size. > [1206359.269428] st0: Write not multiple of tape block size. > [1207514.104233] st0: Write not multiple of tape block size. > [1791080.401660] st0: Write not multiple of tape block size. > This might be related to the lines: >> Minimum block size = 1024 >> Maximum blocksize = 1024 in your bacula-sd config. And/or the fact that your tape and/or drive set to blocksize 512. But I am relative sure, this doesn't stop mtx status from working. Andreas ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users