Re: LSM - Logical Storage Manager Drives
amrecover is trying to use restore instead of vrestore. That doesn't make any sense. The program used by amrecover is determined by what is recorded in the image header. It does not go through the getfsent code. Find out what file on the tape has the image you were going after, position it there then do a "dd if=$TAPE bs=32k count=1" to display the header. As I recall, you played with the value of DUMP at one point. None of that is still floating around, is it? Walter Zambotti John R. Jackson, Technical Software Specialist, [EMAIL PROTECTED]
Re: LSM - Logical Storage Manager Drives
On Apr 10, 2001, Jean-Louis Martineau [EMAIL PROTECTED] wrote: Try this patch, It look at MOUNTED before MNTTAB. Thanks, I can confirm it works on Tru64 4.0D and GNU/Linux/x86 (Red Hat Linux 7), with LABEL entries in /etc/fstab. -- Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/ Red Hat GCC Developer aoliva@{cygnus.com, redhat.com} CS PhD student at IC-Unicampoliva@{lsd.ic.unicamp.br, gnu.org} Free Software Evangelist*Please* write to mailing lists, not to me
Re: LSM - Logical Storage Manager Drives
On Apr 9, 2001, Jean-Louis Martineau [EMAIL PROTECTED] wrote: On Mon, Apr 09, 2001 at 02:03:00PM -0300, Alexandre Oliva wrote: Looks like we need an additional argument in search_fstab, say check_dev, and get amname_to_devname to call search_fstab first with check_dev == 1, so as to reject any entries whose device names don't exist, then, if none are found (as it would be the case in Tru64), retry iwth check_dev == 0. Could you try this patch on Tru64. Thanks, it does work, indeed. However, the getfsent test program still finds /dev/root for `/' on GNU/Linux. fstab says LABEL=/, /proc/mounts says /dev/root, and only mtab says /dev/hda2, but, apparently, this file is never looked at. -- Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/ Red Hat GCC Developer aoliva@{cygnus.com, redhat.com} CS PhD student at IC-Unicampoliva@{lsd.ic.unicamp.br, gnu.org} Free Software Evangelist*Please* write to mailing lists, not to me
Re: LSM - Logical Storage Manager Drives
The patch works for me, what's your /proc/mounts and /etc/mtab entry? /proc/mounts: /dev/root / ext2 rw 0 0 /etc/mtab: /dev/hda1 / ext2 rw 0 0 /etc/fstab: LABEL=/ / ext2 defaults 1 1 ./getfsent /: device of `/': /dev/root dirname of `/': / fstype of `/': ext2 ./selfcheck: ERROR [could not access /dev/root (/): No such file or directory] I'm not sure why you asked about /etc/mtab. While it has the right value, we don't look at it in Amanda (which might be the real problem). We look at /proc/mounts (which has the wrong /dev value) and MNTTAB, which is /etc/fstab (which **really** has the wrong /dev value :-). Maybe we need to look in a third place? Did you maybe go ahead and create /dev/root and /dev/rroot and that's why it works for you? ... we can't check permission on amname_to_dirname(), we should check permission of the device. I agree we should try to properly pre-diagnose a permissions problem dump will have. I just don't see it happening unless we (hard code) add /etc/mtab to the list of places to try and look (in addition to the other changes you and Alexandre have made to p2). Jean-Louis John R. Jackson, Technical Software Specialist, [EMAIL PROTECTED]
Re: LSM - Logical Storage Manager Drives
Hang on guys, I'm getting directions from a number of people here. Woe Nelly! Yeah, this got a little confusing. Sorry 'bout that. My advice is to wait for Alexandre, Jean-Louis and I to stop publicly arguing with each other :-) and come to an agreement on the fix. Then I'll put together a single composite patch you can apply to the stock 2.4.2p2 sources and try. Walter John R. Jackson, Technical Software Specialist, [EMAIL PROTECTED]
Re: LSM - Logical Storage Manager Drives
On Tue, Apr 10, 2001 at 01:48:13PM -0500, John R. Jackson wrote: I'm not sure why you asked about /etc/mtab. While it has the right value, we don't look at it in Amanda (which might be the real problem). We look at /proc/mounts (which has the wrong /dev value) and MNTTAB, which is /etc/fstab (which **really** has the wrong /dev value :-). I misread the code. Maybe we need to look in a third place? Did you maybe go ahead and create /dev/root and /dev/rroot and that's why it works for you? I have /dev/hda1 in /etc/fstab. ... we can't check permission on amname_to_dirname(), we should check permission of the device. I agree we should try to properly pre-diagnose a permissions problem dump will have. I just don't see it happening unless we (hard code) add /etc/mtab to the list of places to try and look (in addition to the other changes you and Alexandre have made to p2). Try this patch, It look at MOUNTED before MNTTAB. Jean-Louis -- Jean-Louis Martineau email: [EMAIL PROTECTED] Departement IRO, Universite de Montreal C.P. 6128, Succ. CENTRE-VILLETel: (514) 343-6111 ext. 3529 Montreal, Canada, H3C 3J7Fax: (514) 343-5834 --- client-src/getfsent.h.orig Mon Apr 9 19:26:48 2001 +++ client-src/getfsent.h Mon Apr 9 19:20:46 2001 @@ -54,7 +54,7 @@ void close_fstab P((void)); int get_fstab_nextentry P((generic_fsent_t *fsent)); -int search_fstab P((char *name, generic_fsent_t *fsent)); +int search_fstab P((char *name, generic_fsent_t *fsent, int check_dev)); int is_local_fstype P((generic_fsent_t *fsent)); char *amname_to_devname P((char *str)); --- client-src/getfsent.c.orig Mon Apr 9 19:26:42 2001 +++ client-src/getfsent.c Tue Apr 10 16:01:28 2001 @@ -144,24 +144,29 @@ #include mntent.h static FILE *fstabf1 = NULL; /* /proc/mounts */ -static FILE *fstabf2 = NULL; /* MNTTAB */ +static FILE *fstabf2 = NULL; /* MOUNTED */ +static FILE *fstabf3 = NULL; /* MNTTAB */ int open_fstab() { close_fstab(); #if defined(HAVE_SETMNTENT) fstabf1 = setmntent("/proc/mounts", "r"); -fstabf2 = setmntent(MNTTAB, "r"); +# if defined(MOUNTED) +fstabf2 = setmntent(MOUNTED, "r"); +# endif +fstabf3 = setmntent(MNTTAB, "r"); #else -fstabf2 = fopen(MNTTAB, "r"); +fstabf3 = fopen(MNTTAB, "r"); #endif -return (fstabf1 != NULL || fstabf2 != NULL); +return (fstabf1 != NULL || fstabf2 != NULL || fstabf3 != NULL); } void close_fstab() { afclose(fstabf1); afclose(fstabf2); +afclose(fstabf3); } int get_fstab_nextentry(fsent) @@ -181,6 +186,12 @@ afclose(fstabf2); } } +if(!sys_fsent fstabf3) { + sys_fsent = getmntent(fstabf3); + if(!sys_fsent) { + afclose(fstabf3); + } +} if(!sys_fsent) { return 0; } @@ -427,9 +438,10 @@ return 0; } -int search_fstab(name, fsent) +int search_fstab(name, fsent, check_dev) char *name; generic_fsent_t *fsent; + int check_dev; { struct stat stats[3]; char *fullname = NULL; @@ -476,8 +488,8 @@ if(fsent-fsname != NULL) { sfs = stat(fsent-fsname, fsstat); sfsr = stat((rdev = dev2rdev(fsent-fsname)), fsrstat); - /* We don't want to `continue;' even if both sfs and sfsr are --1, because, if we get here, at least smnt is not -1. */ + if(check_dev == 1 sfs == -1 sfsr == -1) + continue; } if((fsent-mntdir != NULL @@ -520,8 +532,9 @@ { generic_fsent_t fsent; -if(search_fstab(str, fsent)) - if (fsent.fsname != NULL) +if(search_fstab(str, fsent, 1) fsent.fsname != NULL) + str = fsent.fsname; +else if(search_fstab(str, fsent, 0) fsent.fsname != NULL) str = fsent.fsname; return dev2rdev(str); @@ -532,8 +545,9 @@ { generic_fsent_t fsent; -if(search_fstab(str, fsent)) - if (fsent.mntdir != NULL) +if(search_fstab(str, fsent, 1) fsent.mntdir != NULL) + str = fsent.mntdir; +else if(search_fstab(str, fsent, 0) fsent.mntdir != NULL) str = fsent.mntdir; return stralloc(str); @@ -544,7 +558,7 @@ { generic_fsent_t fsent; -if (!search_fstab(str, fsent)) +if (!search_fstab(str, fsent, 1) !search_fstab(str, fsent, 0)) return stralloc(""); return stralloc(fsent.fstype); @@ -603,7 +617,7 @@ close_fstab(); name = newstralloc(name, "/usr"); -if(search_fstab(name, fsent)) { +if(search_fstab(name, fsent, 1) || search_fstab(name, fsent, 0)) { printf("Found %s mount for %s:\n", is_local_fstype(fsent)? "local" : "remote", name); print_entry(fsent); @@ -612,7 +626,7 @@ printf("Mount for %s not found\n", name); name = newstralloc(name, "/"); -if(search_fstab(name, fsent)) { +if(search_fstab(name, fsent, 1) || search_fstab(name, fsent, 0)) { printf("Found %s mount for %s:\n",
Re: LSM - Logical Storage Manager Drives
I have /dev/hda1 in /etc/fstab. Ahh, I see. So you cheated. :-) :-) Try this patch, It look at MOUNTED before MNTTAB. Looks good to me. Alexandre, can you give this a try on Tru64? If it works for you, then I'll put together a single patch for Walter to try, and if that works, Jean-Louis can apply the change and we can put this mess behind us. Jean-Louis John R. Jackson, Technical Software Specialist, [EMAIL PROTECTED]
Re: LSM - Logical Storage Manager Drives
Hang on guys, I'm getting directions from a number of people here. Woe Nelly! Yeah, this got a little confusing. Sorry 'bout that. My advice is to wait for Alexandre, Jean-Louis and I to stop publicly arguing with each other :-) and come to an agreement on the fix. Then I'll put together a single composite patch you can apply to the stock 2.4.2p2 sources and try. Walter John R. Jackson, Technical Software Specialist, [EMAIL PROTECTED] Hi guys, I have now applied the long patch and it is working on all systems. Alexandre. You missed one line in the patch file (unless it was my misunderstanding) but it was picked up easy enough ! I include the patched getfsent.c with this e-mail. Regards, Walter getfsent.c
Re: LSM - Logical Storage Manager Drives
Hang on guys, I'm getting directions from a number of people here. Woe Nelly! Yeah, this got a little confusing. Sorry 'bout that. My advice is to wait for Alexandre, Jean-Louis and I to stop publicly arguing with each other :-) and come to an agreement on the fix. Then I'll put together a single composite patch you can apply to the stock 2.4.2p2 sources and try. Walter John R. Jackson, Technical Software Specialist, [EMAIL PROTECTED] Hi guys, I have now applied the long patch and it is working on all systems. Alexandre. You missed one line in the patch file (unless it was my misunderstanding) but it was picked up easy enough ! I include the patched getfsent.c with this e-mail. Regards, Walter Almost but no cigar! amcheck is happy! amdump is happy! amrecover is trying to use restore instead of vrestore. after applying the patch I issued a: make clean make make install on all systems. Is there anything I missed? regards, Walter Zambotti
Re: LSM - Logical Storage Manager Drives
On Apr 9, 2001, Jean-Louis Martineau [EMAIL PROTECTED] wrote: On Mon, Apr 09, 2001 at 12:22:36PM -0300, Alexandre Oliva wrote: On Apr 9, 2001, Jean-Louis Martineau [EMAIL PROTECTED] wrote: Here's a patch that fixes the bug. Obviously, the last hunk is enough to fix the bug, but I'm posting exactly what I'm about to check in: 2.4.2 branch and mainline. But your patch break / for linux :-( You sure? It appears to work for me, both `/dev/something' and `LABEL=/' in /etc/fstab. We search /proc/mounts before /etc/mtab. /dev/root doesn't exist and this entry of /proc/mounts should not be accepted. I see. Looks like we need an additional argument in search_fstab, say check_dev, and get amname_to_devname to call search_fstab first with check_dev == 1, so as to reject any entries whose device names don't exist, then, if none are found (as it would be the case in Tru64), retry iwth check_dev == 0. -- Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/ Red Hat GCC Developer aoliva@{cygnus.com, redhat.com} CS PhD student at IC-Unicampoliva@{lsd.ic.unicamp.br, gnu.org} Free Software Evangelist*Please* write to mailing lists, not to me
Re: LSM - Logical Storage Manager Drives
Could you try this patch on Tru64. This is probably a silly question, but did you try the patch on Linux? I was playing with this too and my version (functionally the same as yours, I think) put Linux back to trying to use /dev/root. Here's what I think is happening. Amanda is trying to convert the disklist entry (e.g. "/") to both a device name and a file system type. It wants the device name to pass to dump, even though that's silly because every version of dump I've been around already knows how to do that (and probably better than Amanda). It wants the file system type to know what dump program to run (e.g. advfs - vdump instead of dump). The 2.4.2p2 changes effectively caused search_fstab to fail if it could not find a match. That, in turn, caused amname_to_devname to return the input arg (e.g. "/") as the device name, which dump was perfectly happy with. One thing I cannot remember is why we had a problem in the first place (the "LABEL=/xxx" /etc/fstab entries). I'm guessing what happened was search_fstab returned a match based on the mount point, but the "device" was returned as "LABEL=/xxx", which dump would definitely not have liked. Amname_to_fstype is not so forgiving of search_fstab failing and returns an empty string. So when we changed search_fstab to fail if the device did not exist, we lost the ability to detect device type. Note that in the advfs branch of sendbackup-dump, it passes the mount point, not the device name, to dump. That's why this used to work. So how about: * We go back to the original search_fstab code. On Linux and advfs systems, it will find a match on the mount point but return a bogus device name. * We change amname_to_devname to stat the device name and if it does not exist, return whatever amname_to_dirname() returns. This should solve the original Linux problem and put advfs back the way it was. We might also re-consider the use of amname_to_devname in general and maybe change to using amname_to_dirname like advfs is already doing. Jean-Louis John R. Jackson, Technical Software Specialist, [EMAIL PROTECTED]
Re: LSM - Logical Storage Manager Drives
Hang on guys, I'm getting directions from a number of people here. Woe Nelly! The patch described below and the previous simple patch have not yet been applied to any of my systems. I have only done a basic make of getfsent and sent the un modified (or P2 distribution) results of getfsent to you. This is what you asked for first. If I'm not mistaken your next instruction was to install the simple patch but then retracted that idea as it may not work on Linux. Right? So the only patch I should apply is the one listed here in this specific e- mail. Right? And I should do this on all systems. Right? I will try just this patch and give you some results shortly! The unmodified getfsent results you have already. By the way those results were from the server. You should have the next results within the next few hours. (I'm currently not at that customer site now). Will keep you posted! Walter On Mon, Apr 09, 2001 at 02:03:00PM -0300, Alexandre Oliva wrote: Looks like we need an additional argument in search_fstab, say check_dev, and get amname_to_devname to call search_fstab first with check_dev == 1, so as to reject any entries whose device names don't exist, then, if none are found (as it would be the case in Tru64), retry iwth check_dev == 0. Could you try this patch on Tru64. Jean-Louis -- Jean-Louis Martineau email: [EMAIL PROTECTED] Departement IRO, Universite de Montreal C.P. 6128, Succ. CENTRE-VILLETel: (514) 343-6111 ext. 3529 Montreal, Canada, H3C 3J7Fax: (514) 343-5834 --- client-src/getfsent.h.origMon Apr 9 19:26:48 2001 +++ client-src/getfsent.h Mon Apr 9 19:20:46 2001 @@ -54,7 +54,7 @@ void close_fstab P((void)); int get_fstab_nextentry P((generic_fsent_t *fsent)); -int search_fstab P((char *name, generic_fsent_t *fsent)); +int search_fstab P((char *name, generic_fsent_t *fsent, int check_dev)); int is_local_fstype P((generic_fsent_t *fsent)); char *amname_to_devname P((char *str)); --- client-src/getfsent.c.origMon Apr 9 19:26:42 2001 +++ client-src/getfsent.c Mon Apr 9 19:26:07 2001 @@ -427,9 +427,10 @@ return 0; } -int search_fstab(name, fsent) +int search_fstab(name, fsent, check_dev) char *name; generic_fsent_t *fsent; + int check_dev; { struct stat stats[3]; char *fullname = NULL; @@ -476,8 +477,8 @@ if(fsent-fsname != NULL) { sfs = stat(fsent-fsname, fsstat); sfsr = stat((rdev = dev2rdev(fsent-fsname)), fsrstat); - /* We don't want to `continue;' even if both sfs and sfsr are - -1, because, if we get here, at least smnt is not -1. */ + if(check_dev == 1 sfs == -1 sfsr == -1) + continue; } if((fsent-mntdir != NULL @@ -520,8 +521,9 @@ { generic_fsent_t fsent; -if(search_fstab(str, fsent)) - if (fsent.fsname != NULL) +if(search_fstab(str, fsent, 1) fsent.fsname != NULL) + str = fsent.fsname; +else if(search_fstab(str, fsent, 0) fsent.fsname != NULL) str = fsent.fsname; return dev2rdev(str); @@ -532,8 +534,9 @@ { generic_fsent_t fsent; -if(search_fstab(str, fsent)) - if (fsent.mntdir != NULL) +if(search_fstab(str, fsent, 1) fsent.mntdir != NULL) + str = fsent.mntdir; +else if(search_fstab(str, fsent, 0) fsent.mntdir != NULL) str = fsent.mntdir; return stralloc(str); @@ -544,7 +547,7 @@ { generic_fsent_t fsent; -if (!search_fstab(str, fsent)) +if (!search_fstab(str, fsent, 1) !search_fstab(str, fsent, 0)) return stralloc(""); return stralloc(fsent.fstype); @@ -603,7 +606,7 @@ close_fstab(); name = newstralloc(name, "/usr"); -if(search_fstab(name, fsent)) { +if(search_fstab(name, fsent, 1) || search_fstab(name, fsent, 0)) { printf("Found %s mount for %s:\n", is_local_fstype(fsent)? "local" : "remote", name); print_entry(fsent); @@ -612,7 +615,7 @@ printf("Mount for %s not found\n", name); name = newstralloc(name, "/"); -if(search_fstab(name, fsent)) { +if(search_fstab(name, fsent, 1) || search_fstab(name, fsent, 0)) { printf("Found %s mount for %s:\n", is_local_fstype(fsent)? "local" : "remote", name); print_entry(fsent);
Re: LSM - Logical Storage Manager Drives
On Mon, Apr 09, 2001 at 07:32:43PM -0500, John R. Jackson wrote: Could you try this patch on Tru64. This is probably a silly question, but did you try the patch on Linux? I was playing with this too and my version (functionally the same as yours, I think) put Linux back to trying to use /dev/root. The patch works for me, what's your /proc/mounts and /etc/mtab entry? Here's what I think is happening. Amanda is trying to convert the disklist entry (e.g. "/") to both a device name and a file system type. It wants the device name to pass to dump, even though that's silly because every version of dump I've been around already knows how to do that (and probably better than Amanda). It wants the file system type to know what dump program to run (e.g. advfs - vdump instead of dump). The 2.4.2p2 changes effectively caused search_fstab to fail if it could not find a match. That, in turn, caused amname_to_devname to return the input arg (e.g. "/") as the device name, which dump was perfectly happy with. One thing I cannot remember is why we had a problem in the first place (the "LABEL=/xxx" /etc/fstab entries). I'm guessing what happened was search_fstab returned a match based on the mount point, but the "device" was returned as "LABEL=/xxx", which dump would definitely not have liked. The original problem I fixed was not related to the LABEL, it was a selfcheck problem: Amanda Backup Client Hosts Check ERROR: dev: [can not access /dev/root (/): No such file or directory] Amname_to_fstype is not so forgiving of search_fstab failing and returns an empty string. So when we changed search_fstab to fail if the device did not exist, we lost the ability to detect device type. Note that in the advfs branch of sendbackup-dump, it passes the mount point, not the device name, to dump. That's why this used to work. So how about: * We go back to the original search_fstab code. On Linux and advfs systems, it will find a match on the mount point but return a bogus device name. * We change amname_to_devname to stat the device name and if it does not exist, return whatever amname_to_dirname() returns. This should solve the original Linux problem and put advfs back the way it was. selfcheck will fail, we can't check permission on amname_to_dirname(), we should check permission of the device. We might also re-consider the use of amname_to_devname in general and maybe change to using amname_to_dirname like advfs is already doing. Jean-Louis -- Jean-Louis Martineau email: [EMAIL PROTECTED] Departement IRO, Universite de Montreal C.P. 6128, Succ. CENTRE-VILLETel: (514) 343-6111 ext. 3529 Montreal, Canada, H3C 3J7Fax: (514) 343-5834
Re: LSM - Logical Storage Manager Drives
On Sun, Apr 08, 2001 at 11:00:06PM -0300, Alexandre Oliva wrote: On Apr 6, 2001, John R. Jackson [EMAIL PROTECTED] wrote: The entry in the fstab looks good and looks like this on both machines: root_domain#root / advfs rw 1 0 That would seem to be reasonable. This was working fine in 2.4.2p1 but now that I have upgraded to 2.4.2p2 its not working on any client or even the server anymore. OK, I can guess which pair of changes are involved. But since I don't have access to a system like this I do. Yay! :-) Here's a patch that fixes the bug. Obviously, the last hunk is enough to fix the bug, but I'm posting exactly what I'm about to check in: 2.4.2 branch and mainline. But your patch break / for linux :-( Jean-Louis -- Jean-Louis Martineau email: [EMAIL PROTECTED] Departement IRO, Universite de Montreal C.P. 6128, Succ. CENTRE-VILLETel: (514) 343-6111 ext. 3529 Montreal, Canada, H3C 3J7Fax: (514) 343-5834
Re: LSM - Logical Storage Manager Drives
On Apr 9, 2001, Jean-Louis Martineau [EMAIL PROTECTED] wrote: Here's a patch that fixes the bug. Obviously, the last hunk is enough to fix the bug, but I'm posting exactly what I'm about to check in: 2.4.2 branch and mainline. But your patch break / for linux :-( You sure? It appears to work for me, both `/dev/something' and `LABEL=/' in /etc/fstab. -- Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/ Red Hat GCC Developer aoliva@{cygnus.com, redhat.com} CS PhD student at IC-Unicampoliva@{lsd.ic.unicamp.br, gnu.org} Free Software Evangelist*Please* write to mailing lists, not to me
Re: LSM - Logical Storage Manager Drives
On Mon, Apr 09, 2001 at 02:03:00PM -0300, Alexandre Oliva wrote: Looks like we need an additional argument in search_fstab, say check_dev, and get amname_to_devname to call search_fstab first with check_dev == 1, so as to reject any entries whose device names don't exist, then, if none are found (as it would be the case in Tru64), retry iwth check_dev == 0. Could you try this patch on Tru64. Jean-Louis -- Jean-Louis Martineau email: [EMAIL PROTECTED] Departement IRO, Universite de Montreal C.P. 6128, Succ. CENTRE-VILLETel: (514) 343-6111 ext. 3529 Montreal, Canada, H3C 3J7Fax: (514) 343-5834 --- client-src/getfsent.h.orig Mon Apr 9 19:26:48 2001 +++ client-src/getfsent.h Mon Apr 9 19:20:46 2001 @@ -54,7 +54,7 @@ void close_fstab P((void)); int get_fstab_nextentry P((generic_fsent_t *fsent)); -int search_fstab P((char *name, generic_fsent_t *fsent)); +int search_fstab P((char *name, generic_fsent_t *fsent, int check_dev)); int is_local_fstype P((generic_fsent_t *fsent)); char *amname_to_devname P((char *str)); --- client-src/getfsent.c.orig Mon Apr 9 19:26:42 2001 +++ client-src/getfsent.c Mon Apr 9 19:26:07 2001 @@ -427,9 +427,10 @@ return 0; } -int search_fstab(name, fsent) +int search_fstab(name, fsent, check_dev) char *name; generic_fsent_t *fsent; + int check_dev; { struct stat stats[3]; char *fullname = NULL; @@ -476,8 +477,8 @@ if(fsent-fsname != NULL) { sfs = stat(fsent-fsname, fsstat); sfsr = stat((rdev = dev2rdev(fsent-fsname)), fsrstat); - /* We don't want to `continue;' even if both sfs and sfsr are --1, because, if we get here, at least smnt is not -1. */ + if(check_dev == 1 sfs == -1 sfsr == -1) + continue; } if((fsent-mntdir != NULL @@ -520,8 +521,9 @@ { generic_fsent_t fsent; -if(search_fstab(str, fsent)) - if (fsent.fsname != NULL) +if(search_fstab(str, fsent, 1) fsent.fsname != NULL) + str = fsent.fsname; +else if(search_fstab(str, fsent, 0) fsent.fsname != NULL) str = fsent.fsname; return dev2rdev(str); @@ -532,8 +534,9 @@ { generic_fsent_t fsent; -if(search_fstab(str, fsent)) - if (fsent.mntdir != NULL) +if(search_fstab(str, fsent, 1) fsent.mntdir != NULL) + str = fsent.mntdir; +else if(search_fstab(str, fsent, 0) fsent.mntdir != NULL) str = fsent.mntdir; return stralloc(str); @@ -544,7 +547,7 @@ { generic_fsent_t fsent; -if (!search_fstab(str, fsent)) +if (!search_fstab(str, fsent, 1) !search_fstab(str, fsent, 0)) return stralloc(); return stralloc(fsent.fstype); @@ -603,7 +606,7 @@ close_fstab(); name = newstralloc(name, /usr); -if(search_fstab(name, fsent)) { +if(search_fstab(name, fsent, 1) || search_fstab(name, fsent, 0)) { printf(Found %s mount for %s:\n, is_local_fstype(fsent)? local : remote, name); print_entry(fsent); @@ -612,7 +615,7 @@ printf(Mount for %s not found\n, name); name = newstralloc(name, /); -if(search_fstab(name, fsent)) { +if(search_fstab(name, fsent, 1) || search_fstab(name, fsent, 0)) { printf(Found %s mount for %s:\n, is_local_fstype(fsent)? local : remote, name); print_entry(fsent);
Re: LSM - Logical Storage Manager Drives
On Apr 6, 2001, "John R. Jackson" [EMAIL PROTECTED] wrote: The entry in the fstab looks good and looks like this on both machines: root_domain#root / advfs rw 1 0 That would seem to be reasonable. This was working fine in 2.4.2p1 but now that I have upgraded to 2.4.2p2 its not working on any client or even the server anymore. OK, I can guess which pair of changes are involved. But since I don't have access to a system like this I do. Yay! :-) Here's a patch that fixes the bug. Obviously, the last hunk is enough to fix the bug, but I'm posting exactly what I'm about to check in: 2.4.2 branch and mainline. Index: ChangeLog from Alexandre Oliva [EMAIL PROTECTED] * client-src/getfsent.c (search_fstab): Don't skip entry just because device stats failed. Index: client-src/getfsent.c === RCS file: /cvsroot/amanda/amanda/client-src/getfsent.c,v retrieving revision 1.20.4.2 diff -u -p -r1.20.4.2 getfsent.c --- client-src/getfsent.c 2001/03/30 02:40:21 1.20.4.2 +++ client-src/getfsent.c 2001/04/09 01:56:54 @@ -1,6 +1,6 @@ /* * Amanda, The Advanced Maryland Automatic Network Disk Archiver - * Copyright (c) 1991-1998 University of Maryland at College Park + * Copyright (c) 1991-1998, 2001 University of Maryland at College Park * All Rights Reserved. * * Permission to use, copy, modify, distribute, and sell this software and its @@ -428,8 +428,8 @@ struct stat stats[3], *estat; } int search_fstab(name, fsent) -char *name; -generic_fsent_t *fsent; + char *name; + generic_fsent_t *fsent; { struct stat stats[3]; char *fullname = NULL; @@ -476,8 +476,8 @@ generic_fsent_t *fsent; if(fsent-fsname != NULL) { sfs = stat(fsent-fsname, fsstat); sfsr = stat((rdev = dev2rdev(fsent-fsname)), fsrstat); - if(sfs == -1 sfsr == -1) -continue; + /* We don't want to `continue;' even if both sfs and sfsr are + -1, because, if we get here, at least smnt is not -1. */ } if((fsent-mntdir != NULL -- Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/ Red Hat GCC Developer aoliva@{cygnus.com, redhat.com} CS PhD student at IC-Unicampoliva@{lsd.ic.unicamp.br, gnu.org} Free Software Evangelist*Please* write to mailing lists, not to me
Re: LSM - Logical Storage Manager Drives
I have configured the system so that amcheck is happy, but amdump reports disk is offline. I have set the device permissions like so: brw-r root system /dev/vol/rootvol (logical volume) Is your Amanda user (the one inetd/xinetd runs amandad as) in group "system"? What's in /tmp/amanda/sendsize*debug? Walter John R. Jackson, Technical Software Specialist, [EMAIL PROTECTED] The sendsize*debug file reveals that the client is trying to use dump instead of vdump upon an advfs file system! How do I configure the client to use vdump instead? Walter
Re: LSM - Logical Storage Manager Drives
On Apr 5, 2001, [EMAIL PROTECTED] wrote: The sendsize*debug file reveals that the client is trying to use dump instead of vdump upon an advfs file system! How do I configure the client to use vdump instead? You get /etc/fstab or equivalent to indicate that directory is mounted from an advfs. -- Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/ Red Hat GCC Developer aoliva@{cygnus.com, redhat.com} CS PhD student at IC-Unicampoliva@{lsd.ic.unicamp.br, gnu.org} Free Software Evangelist*Please* write to mailing lists, not to me
Re: LSM - Logical Storage Manager Drives
From: Alexandre Oliva [EMAIL PROTECTED] Date: Fri Apr 6, 2001 3:24am Subject: Re: LSM - Logical Storage Manager Drives On Apr 5, 2001, [EMAIL PROTECTED] wrote: The sendsize*debug file reveals that the client is trying to use dump instead of vdump upon an advfs file system! How do I configure the client to use vdump instead? You get /etc/fstab or equivalent to indicate that directory is mounted from an advfs. The entry in the fstab looks good and looks like this on both machines: root_domain#root / advfs rw 1 0 More info: This was working fine in 2.4.2p1 but now that I have upgraded to 2.4.2p2 its not working on any client or even the server anymore. I have had to place a #undef DUMP in the config.h to get around this but I thought someone should be informed. Walter Zambotti
Re: LSM - Logical Storage Manager Drives
The entry in the fstab looks good and looks like this on both machines: root_domain#root / advfs rw 1 0 That would seem to be reasonable. This was working fine in 2.4.2p1 but now that I have upgraded to 2.4.2p2 its not working on any client or even the server anymore. OK, I can guess which pair of changes are involved. But since I don't have access to a system like this, either you'll have to work on the problem (with guidance) or someone else with such a system will have to dig into it. So, are you up to taking debugging patches from me, or looking into it yourself, or providing a temporary, non-privileged, account? To test the problem, go to client-src and "gmake getfsent", then run it. It will dump out several standard lookups Amanda makes, including "/". Walter Zambotti John R. Jackson, Technical Software Specialist, [EMAIL PROTECTED]
Re: LSM - Logical Storage Manager Drives
I have configured the system so that amcheck is happy, but amdump reports disk is offline. I have set the device permissions like so: brw-r root system /dev/vol/rootvol (logical volume) Is your Amanda user (the one inetd/xinetd runs amandad as) in group "system"? What's in /tmp/amanda/sendsize*debug? Walter John R. Jackson, Technical Software Specialist, [EMAIL PROTECTED]