Re: amrmtape question
Kin-Ho Kwan wrote: I think there should be a command that can completely remove the tape from the Amanda list (remove the label, remove it from the tapelist etc). This will be useful when we need the Amanda tape to do something else, and that's the probelm I am facing now. Did I miss something? amrmtape lets amanda forget about the tape, including the tapelist. Amanda will never ask for that tape again. You may use tape to for anything now, including as decoration in the christmas tree. But the label is still on the tape. You can overwrite it with any program. There is nothing special about the label: it's just the first bytes on tape. I doubt any program (except another amanda config) will check for the label and refuse to write to the tape because it supposedly owned by amanda. (It's good that another amanda config checks, because the chance that you mix up tapes between configurations is much higher than using a tape for non-amanda purposes.) But, because the label matches the regexp, amanda won't refuse the tape next time. Amanda sees it as a new tape (except if you overwrote the label). What is the advantage of insisting that the label should be in tapelist too, before amanda accepts the tape? Christoph Scheeder wrote: Hi, amrmtape only removes the entrys for the tape from all databases, but amanda will happily use it if she sees it again as the label on tape is not touched at all. The question is what should be achieved: 1.) make amanda forget about the backups on that tape? -> ok, amrmtape is your friend, it does what you want. 2.) you want amanda to reject the tape when she sees it again? -> "amadmin noreuse" marks the tape as "this tape is not allowed to be overwrite by amanda" 3.) you want to delete the amanda tapelabel and all other data from the tape, so amnda doesn't touch it anymore? -> use dd to overwrite the first block on the tape with 0 or random data. -- Paul Bijnens, XplanationTel +32 16 397.511 Technologielaan 21 bus 2, B-3001 Leuven, BELGIUMFax +32 16 397.512 http://www.xplanation.com/ email: [EMAIL PROTECTED] *** * I think I've got the hang of it now: exit, ^D, ^C, ^\, ^Z, ^Q, F6, * * quit, ZZ, :q, :q!, M-Z, ^X^C, logoff, logout, close, bye, /bye, * * stop, end, F3, ~., ^]c, +++ ATH, disconnect, halt, abort, hangup, * * PF4, F20, ^X^X, :D::D, KJOB, F14-f-e, F8-e, kill -1 $$, shutdown, * * kill -9 1, Alt-F4, Ctrl-Alt-Del, AltGr-NumLock, Stop-A, ...* * ... "Are you sure?" ... YES ... Phew ... I'm out * ***
Re: amrmtape question
I think there should be a command that can completely remove the tape from the Amanda list (remove the label, remove it from the tapelist etc). This will be useful when we need the Amanda tape to do something else, and that's the probelm I am facing now. Kin-Ho Kwan Christoph Scheeder wrote: Hi, amrmtape only removes the entrys for the tape from all databases, but amanda will happily use it if she sees it again as the label on tape is not touched at all. The question is what should be achieved: 1.) make amanda forget about the backups on that tape? -> ok, amrmtape is your friend, it does what you want. 2.) you want amanda to reject the tape when she sees it again? -> "amadmin noreuse" marks the tape as "this tape is not allowed to be overwrite by amanda" 3.) you want to delete the amanda tapelabel and all other data from the tape, so amnda doesn't touch it anymore? -> use dd to overwrite the first block on the tape with 0 or random data. Christoph Dave Ewart schrieb: On Thursday, 05.02.2004 at 10:05 -0500, Kin-Ho Kwan wrote: Hi, Is it sufficient enough to just run "amrmtape -n conf TAPE001" so that Amanda will not use this tape for backup? I try to run "amrmtape -n conf TAPE001", but Amanda still use that tape to backup stuff. Is there any other command I need to run to remove the Amanda label? Reading TFM, I see: -n Generate new tapelist and database files with label removed, but leave them in /tmp and do not update the original copies. I suggest dropping the '-n' ... :-) Dave.
Re: amrmtape question
Hi, before going any further on this path: Do you/we realy want to change that behavior of amanda ? It's been there since more or less ancient times! (At least since amanda-2.4.0 when i started using amanda) The current behavior has it's pros, but i can't see real contras at the moment. amrmtape has always been used to remove the contents of a tape from amanda's databases, not to make it unusable for amanda. i can't see a real-life situation where you want to have a tape with a correct label for a configuration but won't allow amanda to touch it, that can't be handled with "amadmin noreuse". I would say we should not touch this behavior without a verry good reason. Christoph Jean-Louis Martineau schrieb: Hi, Amanda should not use a tape if it's label is not in the tapelist file. Could you try this patch. Jean-Louis On Thu, Feb 05, 2004 at 05:27:36PM +0100, Christoph Scheeder wrote: Hi, amrmtape only removes the entrys for the tape from all databases, but amanda will happily use it if she sees it again as the label on tape is not touched at all. The question is what should be achieved: 1.) make amanda forget about the backups on that tape? -> ok, amrmtape is your friend, it does what you want. 2.) you want amanda to reject the tape when she sees it again? -> "amadmin noreuse" marks the tape as "this tape is not allowed to be overwrite by amanda" 3.) you want to delete the amanda tapelabel and all other data from the tape, so amnda doesn't touch it anymore? -> use dd to overwrite the first block on the tape with 0 or random data. Christoph Dave Ewart schrieb: On Thursday, 05.02.2004 at 10:05 -0500, Kin-Ho Kwan wrote: Hi, Is it sufficient enough to just run "amrmtape -n conf TAPE001" so that Amanda will not use this tape for backup? I try to run "amrmtape -n conf TAPE001", but Amanda still use that tape to backup stuff. Is there any other command I need to run to remove the Amanda label? Reading TFM, I see: -n Generate new tapelist and database files with label removed, but leave them in /tmp and do not update the original copies. I suggest dropping the '-n' ... :-) Dave. diff -u -r --show-c-function --exclude-from=amanda.diff amanda-2.4.5b1.orig/server-src/amcheck.c amanda-2.4.5b1.new/server-src/amcheck.c --- amanda-2.4.5b1.orig/server-src/amcheck.c 2003-11-25 07:21:07.0 -0500 +++ amanda-2.4.5b1.new/server-src/amcheck.c 2004-02-05 11:42:09.0 -0500 @@ -959,7 +959,11 @@ int start_server_check(fd, do_localchk, tapebad = 1; } else if(strcmp(label, FAKE_LABEL) != 0) { tp = lookup_tapelabel(label); - if(tp != NULL && !reusable_tape(tp)) { + if(tp == NULL) { + fprintf(outf, "ERROR: label %s match labelstr but it not listed in the tapelist file.\n", label); + tapebad = 1; + } + else if(tp != NULL && !reusable_tape(tp)) { fprintf(outf, "ERROR: cannot overwrite active tape %s\n", label); tapebad = 1; } diff -u -r --show-c-function --exclude-from=amanda.diff amanda-2.4.5b1.orig/server-src/taper.c amanda-2.4.5b1.new/server-src/taper.c --- amanda-2.4.5b1.orig/server-src/taper.c 2003-11-25 07:21:08.0 -0500 +++ amanda-2.4.5b1.new/server-src/taper.c 2004-02-05 11:42:21.0 -0500 @@ -1791,7 +1791,14 @@ int label_tape() /* check against tape list */ if (strcmp(label, FAKE_LABEL) != 0) { tp = lookup_tapelabel(label); - if(tp != NULL && !reusable_tape(tp)) { + if(tp == NULL) { + errstr = newvstralloc(errstr, + "label ", label, + " match labelstr but it not listed in the tapelist file", + NULL); + return 0; + } + else if(tp != NULL && !reusable_tape(tp)) { errstr = newvstralloc(errstr, "cannot overwrite active tape ", label, NULL);
Re: amrmtape question
Hi, Amanda should not use a tape if it's label is not in the tapelist file. Could you try this patch. Jean-Louis On Thu, Feb 05, 2004 at 05:27:36PM +0100, Christoph Scheeder wrote: > Hi, > > amrmtape only removes the entrys for the tape from all databases, > but amanda will happily use it if she sees it again as the label > on tape is not touched at all. > > The question is what should be achieved: > > 1.) make amanda forget about the backups on that tape? > -> ok, amrmtape is your friend, it does what you want. > > 2.) you want amanda to reject the tape when she sees it again? > -> "amadmin noreuse" marks the tape as >"this tape is not allowed to be overwrite by amanda" > > 3.) you want to delete the amanda tapelabel and all other data > from the tape, so amnda doesn't touch it anymore? > -> use dd to overwrite the first block on the tape with 0 or random data. > > Christoph > > Dave Ewart schrieb: > > >On Thursday, 05.02.2004 at 10:05 -0500, Kin-Ho Kwan wrote: > > > > > >>Hi, > >> > >>Is it sufficient enough to just run "amrmtape -n conf TAPE001" so that > >>Amanda will not use this tape for backup? > >> > >>I try to run "amrmtape -n conf TAPE001", but Amanda still use that > >>tape to backup stuff. Is there any other command I need to run to > >>remove the Amanda label? > > > > > >Reading TFM, I see: > > > >-n Generate new tapelist and database files with label > > removed, but leave them in /tmp and do not update the > > original copies. > > > >I suggest dropping the '-n' ... :-) > > > >Dave. diff -u -r --show-c-function --exclude-from=amanda.diff amanda-2.4.5b1.orig/server-src/amcheck.c amanda-2.4.5b1.new/server-src/amcheck.c --- amanda-2.4.5b1.orig/server-src/amcheck.c2003-11-25 07:21:07.0 -0500 +++ amanda-2.4.5b1.new/server-src/amcheck.c 2004-02-05 11:42:09.0 -0500 @@ -959,7 +959,11 @@ int start_server_check(fd, do_localchk, tapebad = 1; } else if(strcmp(label, FAKE_LABEL) != 0) { tp = lookup_tapelabel(label); - if(tp != NULL && !reusable_tape(tp)) { + if(tp == NULL) { + fprintf(outf, "ERROR: label %s match labelstr but it not listed in the tapelist file.\n", label); + tapebad = 1; + } + else if(tp != NULL && !reusable_tape(tp)) { fprintf(outf, "ERROR: cannot overwrite active tape %s\n", label); tapebad = 1; } diff -u -r --show-c-function --exclude-from=amanda.diff amanda-2.4.5b1.orig/server-src/taper.c amanda-2.4.5b1.new/server-src/taper.c --- amanda-2.4.5b1.orig/server-src/taper.c 2003-11-25 07:21:08.0 -0500 +++ amanda-2.4.5b1.new/server-src/taper.c 2004-02-05 11:42:21.0 -0500 @@ -1791,7 +1791,14 @@ int label_tape() /* check against tape list */ if (strcmp(label, FAKE_LABEL) != 0) { tp = lookup_tapelabel(label); - if(tp != NULL && !reusable_tape(tp)) { + if(tp == NULL) { + errstr = newvstralloc(errstr, + "label ", label, + " match labelstr but it not listed in the tapelist file", + NULL); + return 0; + } + else if(tp != NULL && !reusable_tape(tp)) { errstr = newvstralloc(errstr, "cannot overwrite active tape ", label, NULL);
Re: amrmtape question
Hi, amrmtape only removes the entrys for the tape from all databases, but amanda will happily use it if she sees it again as the label on tape is not touched at all. The question is what should be achieved: 1.) make amanda forget about the backups on that tape? -> ok, amrmtape is your friend, it does what you want. 2.) you want amanda to reject the tape when she sees it again? -> "amadmin noreuse" marks the tape as "this tape is not allowed to be overwrite by amanda" 3.) you want to delete the amanda tapelabel and all other data from the tape, so amnda doesn't touch it anymore? -> use dd to overwrite the first block on the tape with 0 or random data. Christoph Dave Ewart schrieb: On Thursday, 05.02.2004 at 10:05 -0500, Kin-Ho Kwan wrote: Hi, Is it sufficient enough to just run "amrmtape -n conf TAPE001" so that Amanda will not use this tape for backup? I try to run "amrmtape -n conf TAPE001", but Amanda still use that tape to backup stuff. Is there any other command I need to run to remove the Amanda label? Reading TFM, I see: -n Generate new tapelist and database files with label removed, but leave them in /tmp and do not update the original copies. I suggest dropping the '-n' ... :-) Dave.
Re: amrmtape question
On Thursday, 05.02.2004 at 10:05 -0500, Kin-Ho Kwan wrote: > Hi, > > Is it sufficient enough to just run "amrmtape -n conf TAPE001" so that > Amanda will not use this tape for backup? > > I try to run "amrmtape -n conf TAPE001", but Amanda still use that > tape to backup stuff. Is there any other command I need to run to > remove the Amanda label? Reading TFM, I see: -n Generate new tapelist and database files with label removed, but leave them in /tmp and do not update the original copies. I suggest dropping the '-n' ... :-) Dave. -- Dave Ewart [EMAIL PROTECTED] Computing Manager, Epidemiology Unit, Oxford Cancer Research UK PGP: CC70 1883 BD92 E665 B840 118B 6E94 2CFD 694D E370
amrmtape question
Hi, Is it sufficient enough to just run "amrmtape -n conf TAPE001" so that Amanda will not use this tape for backup? I try to run "amrmtape -n conf TAPE001", but Amanda still use that tape to backup stuff. Is there any other command I need to run to remove the Amanda label? Thanks Kin-Ho Kwan