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

Mailing List Archive: DRBD: Users

drbd and fsck

 

 

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


chepkov at yahoo

Nov 8, 2009, 10:10 PM

Post #1 of 10 (1458 views)
Permalink
drbd and fsck

Hi,

I have tried to run fsck on drbd device, and I wasn't able to. Here is what I did.

# drbdadm primary all

# mount -t ext3 /dev/drbd0 /u00
# mount -t ext3 /dev/drbd1 /u01

# df -k|grep drbd
/dev/drbd0 70558960 185036 66789732 1% /u00
/dev/drbd1 70558960 184220 66790548 1% /u01

Mounts fine, no issues.

# umount /dev/drbd0
# umount /dev/drbd1


# fsck -t ext3 /dev/drbd0
fsck 1.39 (29-May-2006)
e2fsck 1.39 (29-May-2006)
fsck.ext3: Attempt to read block from filesystem resulted in short read while trying to open /dev/drbd0
Could this be a zero-length partition?

# e2label /dev/drbd0
e2label: Attempt to read block from filesystem resulted in short read while trying to open /dev/drbd0
Couldn't find valid filesystem superblock.

The system is running RedHat 5.4 ppc64

kernel-2.6.18-164.el5
e2fsprogs-1.39-23.el5
drbd83-8.3.2-6.el5
kmod-drbd83-8.3.2-6.el5

What do I do wrong? Thanks

Sincerely yours,
Vadym Chepkov
_______________________________________________
drbd-user mailing list
drbd-user [at] lists
http://lists.linbit.com/mailman/listinfo/drbd-user


m.watts at eris

Sep 15, 2010, 6:18 AM

Post #2 of 10 (1101 views)
Permalink
Re: drbd and fsck [In reply to]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 09/15/2010 02:06 PM, lxnf98mm [at] comcast wrote:
> I have a ext3 filesystem on drbd
> When I run fsck should I run it on all nodes

No, DRBD replicates the block layer underneath the filesystem so if you
change it on one node, those changes get replicated automatically.

Assuming you have a sane Primary/Secondary setup, run the fsck on the
/dev/drbdX device on the system in state Primary.

Mark.

- --
Mark Watts BSc RHCE MBCS
Senior Systems Engineer, IPR Secure Managed Hosting
www.QinetiQ.com
QinetiQ - Delivering customer-focused solutions
GPG Key: http://www.linux-corner.info/mwatts.gpg
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/

iEYEARECAAYFAkyQx68ACgkQBn4EFUVUIO2fyACfc1xnt9J6FYGyfvjT1zG2anE+
aKAAnRPwib3X8Z+W0T9f18qZod3c2Ycs
=abIo
-----END PGP SIGNATURE-----
_______________________________________________
drbd-user mailing list
drbd-user [at] lists
http://lists.linbit.com/mailman/listinfo/drbd-user


c.mammoli at apra

Sep 15, 2010, 8:28 AM

Post #3 of 10 (1087 views)
Permalink
Re: drbd and fsck [In reply to]

On the primary node only.






----- Reply message -----
Da: lxnf98mm [at] comcast
Data: mer, set 15, 2010 15:06
Oggetto: [DRBD-user] drbd and fsck
A: <drbd-user [at] lists>


I have a ext3 filesystem on drbd
When I run fsck should I run it on all nodes

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


lxnf98mm at comcast

Sep 16, 2010, 6:19 AM

Post #4 of 10 (1091 views)
Permalink
Re: drbd and fsck [In reply to]

On Thu, 16 Sep 2010, Jakov Sosic wrote:

> On 09/15/2010 03:06 PM, lxnf98mm [at] comcast wrote:
>> I have a ext3 filesystem on drbd
>> When I run fsck should I run it on all nodes
>
> Are you using Primary/Secondary setup? If you do, then you fsck on the
> primary. Device is locked on the secondary.

Yes I have Primary/Secondary setup
It probably seems ridiculous but I thought I might have to switch each
node to the primary role and fsck each one
When in doubt I ask

Thanks


>
> Also remember that you should fsck /dev/drbdX and not the underlying
> /dev/sdaY...
>
> If you use Primary/Primary with ext3, then you can do operations with FS
> only on ONE node at a time... eg you can mount it on node1, and when
> it's mounted you shouldn't mount it on other node because it will
> corrupt the filesystem metadata. If you fsck it on one node, don't fsck
> it on another while first fsck is running.
>
>
>
>

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


dbarker at visioncomm

Sep 16, 2010, 9:37 AM

Post #5 of 10 (1086 views)
Permalink
Re: drbd and fsck [In reply to]

On 09/15/2010 03:06 PM, lxnf98mm [at] comcast wrote:

> I have a ext3 filesystem on drbd
> When I run fsck should I run it on all nodes[?]

You probably want to run verify to check that the images are in sync. fsck
the primary, verify the resource.

It "sounds" like you want to know both copies are good.

Dan in Atlanta

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


putcha_laks at hotmail

Sep 17, 2010, 9:13 PM

Post #6 of 10 (1075 views)
Permalink
Re: drbd and fsck [In reply to]

FYI: If you run fsck on one node and it prints "FILE SYSTEM HAS BEEN MODIFIED", use external script to run full sync on the other board. without this sync we are seeing file corruption during failovers.

THANKS AND REGARDSLAK



> From: dbarker [at] visioncomm
> To: drbd-user [at] lists
> Date: Thu, 16 Sep 2010 12:37:52 -0400
> Subject: Re: [DRBD-user] drbd and fsck
>
> On 09/15/2010 03:06 PM, lxnf98mm [at] comcast wrote:
>
> > I have a ext3 filesystem on drbd
> > When I run fsck should I run it on all nodes[?]
>
> You probably want to run verify to check that the images are in sync. fsck
> the primary, verify the resource.
>
> It "sounds" like you want to know both copies are good.
>
> Dan in Atlanta
>
> _______________________________________________
> drbd-user mailing list
> drbd-user [at] lists
> http://lists.linbit.com/mailman/listinfo/drbd-user


pavlos.parissis at gmail

Sep 18, 2010, 12:16 AM

Post #7 of 10 (1075 views)
Permalink
Re: drbd and fsck [In reply to]

On 18 September 2010 06:13, putcha narayana <putcha_laks [at] hotmail> wrote:

>
> FYI: If you run fsck on one node and it prints "FILE SYSTEM HAS BEEN
> MODIFIED", use external script to run full sync on the other board.
> without this sync we are seeing file corruption during failovers.
>
> DRBD should sync automatically any changes which takes place during fsck. I
don't quite understand why someone need to run an external script for full
sync.BTW what do you mean external script?

Pavlos


lxnf98mm at comcast

Sep 18, 2010, 2:54 AM

Post #8 of 10 (1069 views)
Permalink
Re: drbd and fsck [In reply to]

On Sat, 18 Sep 2010, putcha narayana wrote:

>
>
> FYI: If you run fsck on one node and it prints "FILE SYSTEM HAS BEEN MODIFIED", use external script to run full sync on the other board. without this sync we are seeing file corruption during failovers.

Would you give an example of the external script

>
> THANKS AND REGARDSLAK
>
>
>
>> From: dbarker [at] visioncomm
>> To: drbd-user [at] lists
>> Date: Thu, 16 Sep 2010 12:37:52 -0400
>> Subject: Re: [DRBD-user] drbd and fsck
>>
>> On 09/15/2010 03:06 PM, lxnf98mm [at] comcast wrote:
>>
>>> I have a ext3 filesystem on drbd
>>> When I run fsck should I run it on all nodes[?]
>>
>> You probably want to run verify to check that the images are in sync. fsck
>> the primary, verify the resource.
>>
>> It "sounds" like you want to know both copies are good.
>>
>> Dan in Atlanta
>>
>> _______________________________________________
>> drbd-user mailing list
>> drbd-user [at] lists
>> http://lists.linbit.com/mailman/listinfo/drbd-user
>

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


putcha_laks at hotmail

Sep 22, 2010, 5:48 AM

Post #9 of 10 (999 views)
Permalink
Re: drbd and fsck [In reply to]

Our current DRBD version is 8.0.16. We are constrained by the linux kernel version we are using to upgrade to latest drbd version.



In this version after 70 - 80 failovers, we see that on board that becomes cluster-primary FSCK -fy fixes some inodes.

This change in inodes is not being replicated to standby board.

If we perform failover at this stage, standby board that becomes primary shows file corruption.

File Corruption => Content of one file is seen in another file.



Some one can help us with DRBD version which fixed this sync issue.



Solution:

In Run Level 3 we start a script to check the status of DRBD. If it is not in expected state then we run recovery. This change helped us clock 500+ failovers without any issue.



Code Excerpts:

create_md="NO"
cur_sta=`$DRBDADM state all`
pri_sec=`echo $cur_sta | awk -F/ '{print $1}'`
peer_st=`echo $cur_sta | awk -F/ '{print $2}'`
cstate=`$DRBDADM cstate all`
if [. "$pri_sec" = "Secondary" -a "$peer_st" = "Primary" -a "$cstate" = "WFBitMapT" ]; then
create_md="YES"
fi

if [. "$pri_sec" = "Secondary" -a "$peer_st" = "Unknown" -a "$cstate" = "WFConnection" ]; then
cat /proc/drbd | grep "ns:0 nr:0 dw:0 dr:0 al:0 bm:0 lo:0 pe:0 ua:0 ap:0" > /dev/null 2>&1
if [ $? -eq 0 ]; then
create_md="YES"
fi
fi


Thanks and Regards,

Lak


> Date: Sat, 18 Sep 2010 04:54:05 -0500
> From: lxnf98mm [at] comcast
> To: putcha_laks [at] hotmail
> CC: dbarker [at] visioncomm; drbd-user [at] lists
> Subject: Re: [DRBD-user] drbd and fsck
>
> On Sat, 18 Sep 2010, putcha narayana wrote:
>
> >
> >
> > FYI: If you run fsck on one node and it prints "FILE SYSTEM HAS BEEN MODIFIED", use external script to run full sync on the other board. without this sync we are seeing file corruption during failovers.
>
> Would you give an example of the external script
>
> >
> > THANKS AND REGARDSLAK
> >
> >
> >
> >> From: dbarker [at] visioncomm
> >> To: drbd-user [at] lists
> >> Date: Thu, 16 Sep 2010 12:37:52 -0400
> >> Subject: Re: [DRBD-user] drbd and fsck
> >>
> >> On 09/15/2010 03:06 PM, lxnf98mm [at] comcast wrote:
> >>
> >>> I have a ext3 filesystem on drbd
> >>> When I run fsck should I run it on all nodes[?]
> >>
> >> You probably want to run verify to check that the images are in sync. fsck
> >> the primary, verify the resource.
> >>
> >> It "sounds" like you want to know both copies are good.
> >>
> >> Dan in Atlanta
> >>
> >> _______________________________________________
> >> drbd-user mailing list
> >> drbd-user [at] lists
> >> http://lists.linbit.com/mailman/listinfo/drbd-user
> >
>
> --


theo.band at greenpeak

Sep 22, 2010, 7:42 AM

Post #10 of 10 (1003 views)
Permalink
Re: drbd and fsck [In reply to]

On 09/22/2010 02:48 PM, putcha narayana wrote:
 
Our current DRBD version is 8.0.16. We are constrained by the linux kernel version we are using to upgrade to latest drbd version.
 
In this version after 70 - 80 failovers, we see that on board that becomes cluster-primary FSCK -fy fixes some inodes.
This change in inodes is not being replicated to standby board.
If we perform failover at this stage, standby board that becomes primary shows file corruption.
File Corruption => Content of one file is seen in another file.
 
Some one can help us with DRBD version which fixed this sync issue.
 
Solution:
In Run Level 3 we start a script to check the status of DRBD. If it is not in expected state then we run recovery. This change helped us clock 500+ failovers without any issue.
Version 8.2.5 and up seems to have verify to address this issue. I run the verify regularly and before any planned switchover (that safes a lot of bandwidth compared to a full sync). But that's not available in the version you need to use.

Theo

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.