[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Backup mirror machine




On Thu, 5 May 2005, Bill Moseley wrote:

> > one script ... change-me-from-slave-to-master.sh   and symlinked to "N"
> 
> But that system turns out to be harder to keep in sync.

nope ... actually trivial
 
> No, I'm not asking that.  I was thinking I could use lilo to boot a
> different configuration.

you can boot any configutation and any kernel options
as long as its on the same phycial machine

you need network boot if you are booting anything from the other machine
far far away on the network next to the pc you're using

>  I suppose I could use the init scripts to
> setup symlinks for /etc/network/interfaces and for all the services I
> run.  That's basically what I have now -- but I've found it hard to
> manage.

do it a different way :-)
 
> 
>    if ( running_as("slave") )
>         ln -s /slave.etc /etc
>         ln -s /slave.var /var
>         [...]
>     else
>         ln -s /master.etc /etc
>         ln -s /master.var /var
>         [...]

that will break everything .. nothing will work
 
> Or maybe mount the dirs instead.

that assumes the other remote dirs or other disk on the machine
is working
 
> Considering /etc/fstab is needed at boot,

NOT required .. you can get around it ...  and still boot
and than fix what you want to continue booting more services

> it's not that easy to place
> /etc on a separate partiton (initrd would be one solution, I
> suppose), or to symlink late in the boot process.

if all the above is hard .. initrd is even harder...
and if you wanna get fancier... make your own rootfs ( /bin /etc /dev
/lib .. )
	- problem solved when you can make any random rootfs
	for any situation

> Perhaps dual-boot would be a good way to go. 

nope ... you're assuming "dual boot" config files works
and does what you want
	- if all is working right ... boot sarge, boot sid, boot window,s
 	all works aas long the MBRs are intact

> Boot normally in "slave"
> mode and mount partition(s) under /backup and rsync from the master
> machine to the slave's /backup/etc, /backup/var, etc. dirs.

that's why youre' having problems with master vs slave ... too much work

> Then when there's a failure in master, power down master, and reboot
> the slave machine into "master" mode which then mounts that partition
> or partitions at /etc, /var, etc.

all that should already work hands off ... without lifting a finger to
touch the keyboard
	aka "high availability"
 
> Thanks, but I was only looking for one or two.

see HA

if ha doesnt do what you want ... you're barking up the wrong tree
and making things 100x more complicated than it needs to be, as
the master/slave issues has long since been solved a gazillion
different ways  ( and your methodology unfortunately has too many "holes"
that it will not work even if it was built as you say )

c ya
alvin



Reply to: