[DRBD-user] Temporary accessing files on a secondary node

guillaume guillaume at photostockplus.com
Fri Apr 17 23:06:03 CEST 2009

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


Hi everyone,

I am currently playing with DRBD on a testing env. I tried to figure out 
how to temporary access files on the secondary node.

The goal is mainly to read them, maybe make some changes, but NOT keep 
track of any action on those files. The primary datas should erase back 
on the second node after actions.

I would like to know your opinion on the following procedure:

 1/ drbdadm disconnect ressourceName
 2/ drbdadm primary ressourceName
 3/ mount /dev/drbd0 /mnt/
 4/ do whatever you need to do
 5/ umount /dev/drbd0
 6/ drbdadm secondary ressourceName
 7/ drbdadm connect ressourceName

With the following lines in the net section of my config file :
    after-sb-0pri discard-node-NODENAME;
    after-sb-1pri discard-secondary;

With very simple tests here, it looks to work. When creating a file on 
both node during the secondary downtime, only the one on primary remains 
on both nodes when going back online (checked on secondary by shutting 
DRBD down after synch and mounting the device directly).

Thanks for your lights and comments !

-- 
Guillaume



More information about the drbd-user mailing list