General
cancel
Showing results for 
Search instead for 
Did you mean: 

2 x linux DUAL BOOT and only one /var directory

SOLVED
Go to solution
'chris'
Super Advisor

2 x linux DUAL BOOT and only one /var directory

hi

can 2 Debian Sarge systems, installed on the same machine (DUAL BOOT) with BIND & SQUID use the same /var directory ?
in /var/lib/named I have created some Master & Slave Zones.
both linux system have the same configuration.
this is for a security reason.
crashed one system, so I can start the second one and users can work.

kind regards
chris
5 REPLIES
Steven E. Protter
Exalted Contributor
Solution

Re: 2 x linux DUAL BOOT and only one /var directory

I see no reason why that will not work.

The only possible problem would occur if you have two systems running at the same time trying to use shared disk.

Challenges:

1) The log files will have to be changed. You don't want entries from two servers going into /var/log/messages or /var/log/maillog

You will need to set up a structure whereby a servers log files are seperate. If you do not, you will have major problems diagnosing any kind of problem or security violation.

I'd suggest reconfiguring syslog to this structure.

/var/log

becomes /var/server1/log
and
/var/server2/log

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Gopi Sekar
Honored Contributor

Re: 2 x linux DUAL BOOT and only one /var directory


/var directory generally contains lock files for running process (I am not sure debian), it is in /var/lock. so when the system gets crashed and some lock files still present in this folder then even if u bring up other server these services will not start up complaining they are already running.

the above scenario entirely depends on the service and its dependency on /var/lock files.
RedHat uses them to some extend to find out status of the service.

Hope this helps,
Gopi
Never Never Never Giveup
Steven E. Protter
Exalted Contributor

Re: 2 x linux DUAL BOOT and only one /var directory

You will need to separate the /var/lock files by system. Though not strictly required this would be a good idea to preven a mish mosh of lock files.

You will probably have to reconfigure and reporgram the scripts in /etc/init.d that refer to /var/lock

That task may be kind of large, but again, it should be done to insure the logs and lock files are meaningful when you NEED to look at them.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Gopi Sekar
Honored Contributor

Re: 2 x linux DUAL BOOT and only one /var directory


Exactly, the issues could be many more which we missed..

one way to work around this problem is to have separate var partitions as such and synchronize the backup partition with the master on a periodic basis (through crontab).

write a small script which mounts the backup partition, deletes existing /var/ directories of bind and squid (/var/squid and /var/named) copy them from current /var partition, unmount the partition.

this way you don't have to worry about other files.


Hope this helps,
Gopi
Never Never Never Giveup
Gopi Sekar
Honored Contributor

Re: 2 x linux DUAL BOOT and only one /var directory


There is one more idea which just flashed on my mind, why don't u create two separate partitions for these two directories alone (/var/named and /var/squid) so that the same partition can be mounted on the backup system also.

This way you don't have to worry about synchronization and other files. also you can have separate partition which can be backed up separately or better can be on a separate drive itself to handle drive crash.

Hope this helps,
Gopi
Never Never Never Giveup