Re: Library and clean cartdrige...
Bill Arlofski via Bacula-users <[email protected]>
| Newsgroups | gmane.comp.bacula.user |
|---|---|
| Message-ID | <[email protected]> |
On 8/26/24 8:20 AM, Marco Gaiarin wrote: > > I've setup in my pool(s) the 'Cleaning Prefix' and addedd to the library the > cleaning tape; situation now is: > > *update slots storage=CNPVE3Autochanger > Connecting to Storage daemon CNPVE3Autochanger at cnpve3.cn.lnf.it:9103 ... > 3306 Issuing autochanger "slots" command. > Device "Autochanger" has 8 slots. > Connecting to Storage daemon CNPVE3Autochanger at cnpve3.cn.lnf.it:9103 ... > 3306 Issuing autochanger "list" command. > Catalog record for Volume "AAJ666L9" is up to date. > Catalog record for Volume "AAJ667L9" is up to date. > Volume "CLN001L9" not found in catalog. Slot=8 InChanger set to zero. > > I've tried to mount cleaning cartdrige but: > > *mount storage=CNPVE3Autochanger slot=8 > 3304 Issuing autochanger "load Volume , Slot 8, Drive 0" command. > 3305 Autochanger "load Volume , Slot 8, Drive 0", status is OK. > 3901 Unable to open device ""LTO9Storage0" (/dev/nst0)": ERR=t ape_dev.c:170 Unable to open device "LTO9Storage0" (/dev/nst0): ERR=Input/output error > > This seems also pretty logic: bacula mount the cartdrige and (try to) read > it, but this is a clieaning one... > Anyway, i've waited the command to end, then i've tried also: > > *unmount storage=CNPVE3Autochanger > 3307 Issuing autochanger "unload Volume *Unknown*, Slot 8, Drive 0" command. > 3901 Device ""LTO9Storage0" (/dev/nst0)" is already unmounted. > > after that, anyway, cleaning cartdrige was back on slot 8 (probably the > previous mount failed early and anyway cleaning tape was just on the route to > slot 8). > > > I've the doubt i'm doing something wrong, eg i don't have to use '(u)mount > storage' command from bacula console to mount cleaning cartdrige, but use > insted direct library command via mtx-changer script, for example. > > > Someone have some clue? Thanks. Hello Marco, You cannot tell Bacula to load a cleaning tape without experiencing these kinds of errors, because when the SD is told to load a tape from a slot into a drive, the 'mtx-changer' script calls the 'mtx' utility to load, then, once that returns OK, the script calls `mt -f /tape/nodeid status` over and over (with time/iteration limits and some sleep time between each call) until it sees a "ONLINE" in the `mt status` output (in the case of a Linux distribution). In the case of a cleaning tape, this "ONLINE" will never appear, and the mtx-changer script will always time out and fail, then return with errorlevel 1, and the SD will complain exactly as you have demonstrated above. You have two choices for cleaning tape drives with Bacula: - Manual: Issue a disable command to the drive in bconsole, then manually load/unload a cleaning tape, then re-enable the drive. - Try my mtx-changer drop-in replacement script: `https://github.com/waa/mtx-changer-python` This script does much nicer logging of all activities (if logging is enabled), a nd it can detect when a drive needs to be cleaned (if enabled), and it can automatically load a cleaning tape, wait, then unload it, then return control to the SD (also if enabled). I know that a few people are using this script in production environments (some quite large), and I also use in our lab and production environments, but I have not gotten too much (or any) feedback about this script yet, so one more person's eyes on it in production would be helpful and welcomed. In conjunction with this mtx-changer-python.py script, you may also want to check out my `tapealert` script drop-in replacement here: https://github.com/waa/bacula-tapealert This script reports drive and/or tape issues using the tapealert utility and reports them back to the SD which will log the TapeALerts(s) reported by the drive, and can disable a drive, or a tape or both depending on the errors reported. Hope this helps! Bill -- Bill Arlofski [email protected] _______________________________________________ Bacula-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/bacula-users
signature.asc
(application/pgp-signature, 509 B)
-----BEGIN PGP SIGNATURE----- Version: ProtonMail wsBzBAEBCAAnBQJmzP1aCRBIDTDab9XDQBYhBMuLnlBaSQiuSUbb6UgNMNpv 1cNAAAA/uQf5ATmHKB5EAangB35ux8dq4oeQaztDd0kYAUJXhfdwi3Rioj33 lkMXQoCbjS4Hr6jYLIY1pg3tzda6V7k0B8QFTxrF9g3VjYtoHBFt5+SFuUxe txqQovmmwQZJZOT/RRz5p+qhV2nkBPLtB+LVQ8Lk2vUh6NYHjvkDxXJaNYCF AcdWyjvatzlgfUjojarm5QVDrXWrHuwlNoME6BKNGSuRWaSvZI3UbX3hgg99 R5r8XLZHHoLRr0KWv/x8syKD9l3KmNlQ/2dPJyOMCD5oRz3LUSQenqPPRts2 ddbd1Xd6YJcKEcO0h+7+bcRBgchF5KkKlxACfw6A3xtMKiuC2snx+Q== =3WIa -----END PGP SIGNATURE-----