Amanda-Users

Re: automount and raw devices

2007-12-20 16:04:18
Subject: Re: automount and raw devices
From: Jean-Louis Martineau <martineau AT zmanda DOT com>
To: Tim Bunnell <bunnell AT asel.udel DOT edu>
Date: Thu, 20 Dec 2007 15:56:13 -0500
Tim,

Amanda add the 'r'.

It's historical, it try to be smart and do the following conversion.
/dev/sd0a -> /dev/rsd0a
/dev/dsk/c0t0d0s0 -> /dev/rdsk/c0t0d0s0 -> /dev/dsk/rc0t0d0s0
Because DUMP works with the raw device, not the block device.

Try the attached patch.

Jean-Louis

Tim Bunnell wrote:
Folks,

I hope this is not a FAQ (I could not find it there in any case). We have set up amanda (2.5.1p1) running on Debian 3.1 Linux to backup automounted directories from a SnapServer 410. The configuration appears to work OK with DLEs of the form:

our.net.udel.edu    /vol/dir    our-gnutar

Where /vol is our automount point and dir is the share exported by the SnapServer.

However, when amcheck or the dumper runs, we see one or more automount errors indicating that things like /vol/rdir cannot be mounted for each automounted DLE. We guess the 'r' in front of the 'dir' might come from something like attempting to mount /vol/dir first as a raw device???

Does anyone know (a) if that is really the cause of the problem and/or (b) how to make is stop? We fear it is just a matter of time before someone decides to create a real share with a name like "rdir" that conflicts with an existing "dir" share.

Thanks for any suggestions,

t


Index: client-src/getfsent.c
===================================================================
--- client-src/getfsent.c       (revision 9539)
+++ client-src/getfsent.c       (working copy)
@@ -433,7 +433,7 @@
   char *s;
   int ch;
 
-  if(stat(name, &st) == 0 && S_ISCHR(st.st_mode)) {
+  if(stat(name, &st) == 0 && !S_ISBLK(st.st_mode)) {
     /*
      * If the input is already a character device, just return it.
      */
<Prev in Thread] Current Thread [Next in Thread>