So I've setup RAID1 with an LVM on that and then used the LVM as a physical disk for DRBD. I'm planning on mounting the DRBD to /mnt/data and then moving all config and data files for apache2, mysql, and ftp to /mnt/data respectively. Is this setup ok? Recommended for or against? Thought? First time setting this up. Thanks in advance.
edit: Can I use DRBD as a base for the entire OS except /boot and just be done with it?
If your goal is to keep consistent copies of your configuration files across multiple machines, a tool such as Puppet may be more suited to the task.
This probably makes things more intuitive for the next person to look at the system and keeps the package management software from freaking out. Also, configuration files are often hard-coded into place in software, so you'll either be recompiling or making symlinks until the cows home.
Use a configuration management system and implement offline backups. See also Configuration Deployment to Linux Systems
No! For starters, your systems will have the same hostname (
/etc/hostname
) and the same IP unless you use DHCP. Then how will you point them at each other for DRDB use?What you are proposing is certainly a common configuration.
It makes most sense if you combine it with some sort of cluster resource manager so that all your services and the active DRBD volume automatically move to your secondary host in the event of a failure.