[DRBD-user] FSCK on DRBD resource.

Rasto Levrinc rasto.levrinc at gmail.com
Fri Apr 13 10:26:57 CEST 2012

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

On Thu, Apr 12, 2012 at 8:09 PM, Matt Graham <danceswithcrows at usa.net> wrote:
> From: Rasto Levrinc <rasto.levrinc at gmail.com>
>> 2012/4/12 Rafał Radecki <radecki.rafal at gmail.com>:
>>> I have a device /dev/drbd0 on which I have an ext3 filesystem. It
>>> needs fsck because there are problems on it. I want to stop drbd
>>> between the two nodes, then run fsck on primary. Then [if] I have
>>> problems [after fscking the] primary, I will be able to use the
>>> secondary node [even though fsck failed miserably].
> [snip]
>> You can omit --discard-my-data, the fsck repairs will be replicated to
>> the secondary.
> Except Rafal doesn't want to do that.  He wants to stop the secondary before
> fscking, in case e2fsck destroys the data on the primary.

Stopping, disconnecting secondary and then reconnecting doesn't leave you
with garbage on the secondary, that you would have to discard. Whatever
changes fsck makes, will be resynced to the secondary, it will not even make
a full-sync, syncing only blocks that have changed. So far they have thought
it through. There's nothing magical about fsck, it is the same as writing
files or creating directories as far as DRBD is concerned, as long as you
work on /dev/drbd\d+

If something goes wrong with primary and he decides to go with secondary,
there's some discarding to do, but that wasn't the question, yet.

> (I've never had
> e2fsck do that, but it could happen.)  Also:  Where are the backups?  DRBD is
> nice, but like softRAID, it's not a substitute for actual backups.
>> Also make sure that a resource manager doesn't [get] in the way.
> Yes.  Before doing this, stop pacemaker/whatever on both nodes so it doesn't
> do something stupid.

or use the maintenance-mode


Dipl.-Ing. Rastislav Levrinc
rasto.levrinc at gmail.com
Linux Cluster Management Console

More information about the drbd-user mailing list