[DRBD-user] fsck on DRBD partition questions

Lars Ellenberg lars.ellenberg at linbit.com
Wed Jul 2 00:59:19 CEST 2008

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


On Tue, Jul 01, 2008 at 06:44:24AM -0700, Mike Sweetser - Adhost wrote:
> Hello:
> 
> I kinda figured as much.  So there's no way to just run part of it as
> read-only, run the checks on the other half, and then make the checked
> half the primary, after invalidating the read-only part and making the
> checked half copy over?

if this is what you want to do,
it may work like so:

 A: Connected Primary/Secondary
 B: Connected Secondary/Primary
 A# mount -o remount,ro /dev/drbdX
 A# drbdadm disconnect $r
 A: StandAlone Primary/Unknown
 B# drbdadm disconnect $r
 B: StandAlone Secondary/Unknown

 ---- manually introduce split brain, fsck
 B# drbdadm primary $r
 B: StandAlone Primary/Unknown
 B# fsck -f /dev/drbdX

 ---- fsck done, make the checked copy the new master
 A# umount /dev/drbdX
 A# drbdadm secondary $r
 A: StandAlone Secondary/Unknown

 ---- anytime from now on you should be able to mount the checked copy
      on B without causing any harm

 A# drbdadm -- --discard-my-data connect $r
 A: WFConnection Secondary/Unknown
 B: StandAlone Primary/Unknown
 B# drbdadm connect $r
 B: SyncSource Primary/Secondary

 once the resync is done, you may want to do a test switchover.

please check for typos,
if in doubt, ask.
it is your data...

-- 
: Lars Ellenberg                           http://www.linbit.com :
: DRBD/HA support and consulting             sales at linbit.com :
: LINBIT Information Technologies GmbH      Tel +43-1-8178292-0  :
: Vivenotgasse 48, A-1120 Vienna/Europe     Fax +43-1-8178292-82 :
__
please don't Cc me, but send to list -- I'm subscribed



More information about the drbd-user mailing list