>>>>> On Sun, 15 Apr 2007 15:27:31 +0200, Marc Schiffbauer said: > Mail-Followup-To: Bacula Users <bacula-users@lists.sourceforge.net>, > > Hi all, > > I am trying a second approach to understand how relabeling a tape > using the "relable" command from the console is supposed to work. > > * I have a single tape drive setup, no autochanger. > * I am using bacula 2.0.3 > * labeling tapes works fine > * backups work fine > * restores work fine > > But I do not manage it to relable a tape using the relabel command. > At this point I still believe it might be a bacula bug. > > Maybe I am using an untested combination of settings in the Device > configuration of the SD? > > It would be great if someone yould tell me what I am doing wrong > here: > > My SD's Device Resource: > -------------------------------------------------------------------- > Device { > Name = DLT8000 > Media Type = DLT-IV > Archive Device = /dev/nst0 > AutomaticMount = yes > AlwaysOpen = yes > RemovableMedia = yes > RandomAccess = no > Offline On Unmount = Yes > Spool Directory = /home/bacula-spool > Maximum Spool Size = 10 g > Maximum Job Spool Size = 2 g > } > -------------------------------------------------------------------- > > Now I am in the console. I just inserted a known Tape into the tape > drive called "Tape_20". I purged this tape using the purge command. > > -------------------------------------------------------------------- > *status sd > [...] > Device status: > Device "DLT8000" (/dev/nst0) is not open. > [...] > * > -------------------------------------------------------------------- > > The tape drive needs some time to load the tape... I wait for it to > finish this. > > * tape is inserted > * that volume is pruned > * tape is *not* mounted > > Now I should be able to use the relabel command, right? > > I would expect that I send the relabled command, bacula woul read > the current label, then rewind, that write the new label. > > Now what happens is that: > > -------------------------------------------------------------------- > *relabel oldvolume=Tape_20 volume=Tape_Test > Automatically selected Storage: lisa-sd > Automatically selected Pool: Default > Connecting to Storage daemon lisa-sd at lisa:9103 ... > Sending relabel command from "Tape_20" to "Tape_Test" ... > -------------------------------------------------------------------- > --> here the tape begins to do something. > The tape is being ejected!! > > Then, after the drive has finished ejecting the tape: > -------------------------------------------------------------------- > 3912 Failed to label Volume: ERR=dev.c:425 Unable to open device > "DLT8000" (/dev/nst0): ERR=Input/output error > > Label command failed for Volume Tape_Test. > Do not forget to mount the drive!!! > * > -------------------------------------------------------------------- > > So why does bacula eject the tape here? Can somebody explain to why > this should not be a bug? > > Could it be that bacula does an "unmount" here although the tape is > not mounted and this unmount command does the "mt offline" because > of the "Offline On Unmount = Yes" setting? > > Ok I will set "Offline On Unmount = No" and try again to test this: > > (restarting SD, inserting tape, waiting for tape to finish) > > -------------------------------------------------------------------- > *relabel oldvolume=Tape_20 volume=Tape_Test > Automatically selected Storage: lisa-sd > Automatically selected Pool: Default > Connecting to Storage daemon lisa-sd at lisa:9103 ... > Sending relabel command from "Tape_20" to "Tape_Test" ... > 3000 OK label. VolBytes=64701 DVD=0 Volume="Tape_Test" Device="DLT8000" > (/dev/nst0) > Catalog record for Volume "Tape_Test", Slot 0 successfully created. > Old volume "Tape_20" deleted from catalog. > Requesting to mount DLT8000 ... > 3001 Mounted Volume: Tape_Test > 3001 Device "DLT8000" (/dev/nst0) is already mounted with Volume "Tape_Test" > * > -------------------------------------------------------------------- > > Voila! > > But: I still would consider this a bug: It should be possible to > use the relabel command with a single tapedrive and the setting > "Offline On Unmount = Yes", not? > > Because I want bacula to eject the tape if it is requesting another > one... > > Any comments? Or hints?
Looks like a bug to me -- write_new_volume_label_to_dev calls close_part before relabelling and DEVICE::close calls offline when "Offline On Unmount = Yes". __Martin ------------------------------------------------------------------------- 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