[DRBD-user] Help: lower Device Already Claimed

Digimer linux at alteeve.com
Thu May 26 17:49:34 CEST 2011

Note: "permalinks" may not be as permanent as we would like,
direct links of old sources may well be a few messages off.


On 05/25/2011 08:03 PM, day knight wrote:
> Hello all,
> 
> I have searched on google and found out that lower device should not be
> mounted which has lead to a lot of confusion. My problem is, I am trying
> to configure /dev/sda to work with DRBD hence the error "Lower Device
> Already Claimed". It works well when I use /dev/sdb or unmounted
> partition. As we all know that in runlevel 3, the / (slash root) cannot
> be unmounted as it is being used so the question becomes how would I
> make DRBD work with /dev/sda on which I have / (slash root) mounted.
> 
> _*What I am trying to do.*_
> I want to mirror one drive over the network with another drive to serve
> for failover purposes (I believe as DRBD states it is like a RAID1 over
> the network). the two systems master and slave would run exact
> configuration both hardware and software.
> 
> therefore for test purposes, I have created /dev/sda1 on which / (slash 
> root) resides. This / contains the base structure created by Centos such as
> 
> /
> /boot
> /dev
> /bin
> /home
> /etc
> 
> I also have free space that can be partitioned to create /dev/sda2.
> 
> Now all programs such as httpd, mysql, vsftpd, webmin, bind, sendmail,
> dovecot and many others are installed with in the /dev/sda1 as well as
> the data associated with these programs also resides on the /dev/sda1
> 
> _*What I don't understand*_
> 
> If I use /dev/sda2 which is unmounted partion then what would I need to
> do in terms of setup to ensure that the entire /dev/sda is replicated or
> how would I mount the /dev/drbd0 to /
> 
> Confusing :D
> 
> Thank you all and I am looking forward to your expert responses, leads,
> assistance :)

What you are trying to do isn't really possible. The setup you're trying
to do would "mirror" the entire OS, but that would cause problems for a
couple of reasons. First and foremost being that each node is it's own
install and requires it's own files.

You can mount the same files on both machines at the same time by using
GFS2 or OCFS2, but they are not available until after DLM starts
(distributed locking, which requires a formed cluster). The OS is
already quite far along the boot process by the time DLM becomes available.

What you can do is mount, for example, /dev/drbd0 on /home using GFS2 to
keep the files in sync. Even then though, I don't know how wise it would
be to have two machines and two users sharing the same /home as programs
might not be aware of changes made by the other node. The filesystem
would be fine, of course.

DRBD simply provides a replicated block device. You still need to
consider what filesystem you will use on it, and what (and how)
applications will actually use it.

-- 
Digimer
E-Mail: digimer at alteeve.com
AN!Whitepapers: http://alteeve.com
Node Assassin:  http://nodeassassin.org
"I feel confined, only free to expand myself within boundaries."



More information about the drbd-user mailing list