Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: DRBD: Users

FSCK on DRBD resource.

 

 

DRBD users RSS feed   Index | Next | Previous | View Threaded


radecki.rafal at gmail

Apr 12, 2012, 7:27 AM

Post #1 of 5 (1115 views)
Permalink
FSCK on DRBD resource.

Hi all.

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 beetwen two nodes, then run fsck on primary. Then when
I will have problems on primary I will be able to use the secondary node
with its /dev/drbd0 (no changes from fsck).

I plan to:
primary&secondary: drbdadm disconnect r0
primary: umount /xxx
primary: e2fsck -y /dev/drbd0
after fsck:
primary: drbdadm connect r0
secondary: drbdadm -- --discard-my-data connect r0
primary: mount /xxx

http://www.gossamer-threads.com/lists/drbd/users/14980

Is it a good way?

Best regards,
Rafal.


rasto.levrinc at gmail

Apr 12, 2012, 10:42 AM

Post #2 of 5 (1077 views)
Permalink
Re: FSCK on DRBD resource. [In reply to]

2012/4/12 Rafał Radecki <radecki.rafal [at] gmail>:
> Hi all.
>
> 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 beetwen two nodes, then run fsck on primary. Then when I
> will have problems on primary I will be able to use the secondary node with
> its /dev/drbd0 (no changes from fsck).
>
> I plan to:
> primary&secondary: drbdadm disconnect r0
> primary: umount /xxx
> primary: e2fsck -y /dev/drbd0
> after fsck:
> primary: drbdadm connect r0
> secondary: drbdadm -- --discard-my-data connect r0

You can omit --discard-my-data, the fsck repairs will be replicated to
the secondary. Also make sure that a resource manager doesn't come in
the way.


> primary: mount /xxx
>
> http://www.gossamer-threads.com/lists/drbd/users/14980

your case is a little bit simpler.

Rasto

--
Dipl.-Ing. Rastislav Levrinc
rasto.levrinc [at] gmail
Linux Cluster Management Console
http://lcmc.sf.net/
_______________________________________________
drbd-user mailing list
drbd-user [at] lists
http://lists.linbit.com/mailman/listinfo/drbd-user


danceswithcrows at usa

Apr 12, 2012, 11:09 AM

Post #3 of 5 (1076 views)
Permalink
Re: FSCK on DRBD resource. [In reply to]

From: Rasto Levrinc <rasto.levrinc [at] gmail>
> 2012/4/12 Rafał Radecki <radecki.rafal [at] gmail>:
>> 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. (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.

--
Matt G / Dances With Crows
The Crow202 Blog: http://crow202.org/wordpress/
There is no Darkness in Eternity/But only Light too dim for us to see

_______________________________________________
drbd-user mailing list
drbd-user [at] lists
http://lists.linbit.com/mailman/listinfo/drbd-user


ff at mpexnet

Apr 13, 2012, 12:24 AM

Post #4 of 5 (1075 views)
Permalink
Re: FSCK on DRBD resource. [In reply to]

On 04/12/2012 08:09 PM, Matt Graham wrote:
> From: Rasto Levrinc <rasto.levrinc [at] gmail>
>> > 2012/4/12 Rafał Radecki <radecki.rafal [at] gmail>:
> [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.

Yes, but still - after it's all done, you will connect the secondary,
and you will not need to discard any data.

The data *must* be discarded from the damaged (fsck'd) node in case the
OP wants to revert to the state of the former secondary.
_______________________________________________
drbd-user mailing list
drbd-user [at] lists
http://lists.linbit.com/mailman/listinfo/drbd-user


rasto.levrinc at gmail

Apr 13, 2012, 1:26 AM

Post #5 of 5 (1086 views)
Permalink
Re: FSCK on DRBD resource. [In reply to]

On Thu, Apr 12, 2012 at 8:09 PM, Matt Graham <danceswithcrows [at] usa> wrote:
> From: Rasto Levrinc <rasto.levrinc [at] gmail>
>> 2012/4/12 Rafał Radecki <radecki.rafal [at] gmail>:
>>> 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

Rasto

--
Dipl.-Ing. Rastislav Levrinc
rasto.levrinc [at] gmail
Linux Cluster Management Console
http://lcmc.sf.net/
_______________________________________________
drbd-user mailing list
drbd-user [at] lists
http://lists.linbit.com/mailman/listinfo/drbd-user

DRBD users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.