[Dirvish] Dirvish mount /boot.. is it possible?

Keith Lofstrom keithl at kl-ic.com
Wed Oct 25 22:45:31 PDT 2006


On Wed, Oct 25, 2006 at 09:24:56PM -0600, hanj wrote:
> 
> Won't that just mount /boot on the dirvish server? I need to
> mount /boot on all the clients out there, so I can back up
> boot from all of my servers. Maybe I'm just confused, but
> can you explain further.

Ah - the missing information, that /boot is on the *client*.

There is a problem - by default, dirvish attempts to run the
pre-client and post-client scripts in /boot as a working directory,
where it will be doing the rsync from, and that isn't mounted yet
when pre-client is run.  /boot will be mounted and in use when
post-client is run, so the unmount will fail.  What to do?

My guess (not checked out, use at your own risk!):

You will indeed have to use "pre-server" and "post-server" scripts,
specific to each vault, meaning you will have lines like:

pre-server:  /usr/local/sbin/dirvish-pre-server-mount-boot
post-server: /usr/local/sbin/dirvish-post-server-unmount-boot

in each   [vault]/dirvish/default.conf  file that needs /boot
mounted.   In  dirvish-pre-server-mount-boot  on the dirvish
server, you will have lines like:

#!/bin/bash
/usr/bin/ssh  root@$DIRVISH_CLIENT /bin/mount /boot

... and in dirvish-post-server-unmount-boot you will have:

#!/bin/bash
/usr/bin/ssh  root@$DIRVISH_CLIENT /bin/umount /boot

... again, the above is not tested, the main thing is that you
need to use ssh to run the mount command in the pre-server and
post-server, because there is no working directory (yet) for
a dirvish operation running in /boot .  

You also have the option of mounting the /boot partition on,
say, /mnt/dirvishmount/boot, then backing up /mnt/dirvishmount
with dirvish, and "xdev: 0" (the default) in that particular
vaults dirvish/default.conf file.  Then you can do the mount
and unmount in pre-client and post-client scripts on the client,
without all the messy ssh stuff.  That will be a little cleaner
for backups, but restores will be more counterintuitive. 
So, the server script approach is a bit less nasty overall.

Test the two approaches and tell us how they work.

Keith

-- 
Keith Lofstrom          keithl at keithl.com         Voice (503)-520-1993
KLIC --- Keith Lofstrom Integrated Circuits --- "Your Ideas in Silicon"
Design Contracting in Bipolar and CMOS - Analog, Digital, and Scan ICs


More information about the Dirvish mailing list