On Mon, Jul 14, 2003 at 10:37:18PM +0300, Antonios Christofides wrote: > I wrote: > > "tapelist" has size zero. I label a tape with amlabel, and it still has > > size zero, although you can tell from the date that it has been touched. > > Thanks to the one who suggested to run amlabel with strace: a nice "no > space left on device" had been returned when amanda had tried to write > to the file - my root filesystem was full. > > Of course it is an amlabel bug that it did not display an error message. > I looked at the code, and it's not a trivial fix.
I'm not so sure it is difficult. Looking at "tapefile.c", the way the tapelist is updated is by creating a new tapelist file called "tapelist.new". The old file is copied over along with the new entry. This is what seems to be failing, not creating that file, but writing to it. This leaves an empty file, tapelist.new, which is then renamed tapelist. deleting the original. The writing to the tapelist.new file is contained in a single, short "for" loop. But none of the 3 printf statements are checked for failures. BTW, the same result should occur if the amanda user sets their "ulimit" parameter to 0. This is the size of the largest file they are allowed to create. It would be good for testing any changes you try on a file- system that is not full. BTW 2, for over 10 years there was a nearly identical bug in the passwd changing program on unix. An empty temporary password file would be created and then renamed "/etc/passwd" eliminating the original passwd file. After that, even root could not login (no account) to correct the problem. Any ordinary user was able to cause the problem by changing their password with their ulimit set to 0. :)) -- Jon H. LaBadie [EMAIL PROTECTED] JG Computing 4455 Province Line Road (609) 252-0159 Princeton, NJ 08540-4322 (609) 683-7220 (fax)