Skip to contentSkip to conversation

Some raid1 questions

DISCUSSION Yves Glodt 2 participants 5 messages Feb 1, 2004 – Feb 2, 2004 MD RAID

lore
Share & tools
lore

Yves Glodt

author
#0 lore raw

Hello,

I have my home partition on a raid1 device, and there is an ext3 filesystem on it. Some more information:

fstab:
----------------
/dev/hdc1 / ext3 defaults,noatime,nodiratime /dev/md0 /home ext3 defaults,noatime,nodiratime,data=writeback

raidtab:
---------------

raiddev                 /dev/md0
raid-level              1
persistent-superblock   1
nr-raid-disks           2
nr-spare-disks          0
device                  /dev/hda2
raid-disk               0
device                  /dev/hdc2
raid-disk               1

Recently I had some freezes (due to nvidia...?), and everytime I had to make a hard reset.

Everytime then the raid resynced completely which took about 1.5 hours. One time I lost some kde settings when this happened.
The filesystem did not complain about an unclean shutdown, it seems it did not see on bootup that the last shutdown was unclean.

Now to my questions:
Is this the normal behaviour?
Shouldn't the filesystem take care of that?
What is the point of having a journaling filesystem on a mirror? Is there anything I can change to have the filesystem handle unclean shutdowns?

TIA,
Yves

Signature · 2 lines
Linux 2.4.24 #5 Mon Jan 5 19:38:06 CET 2004 i686
 14:25:55 up  4:14,  1 user,  load average: 0.43, 0.40, 0.32
#1 lore raw
Quoted 4 lines · On Sunday February 1, [email protected] wrote:

Hello,

I have my home partition on a raid1 device, and there is an ext3 filesystem on it. Some more information:

...

Quoted 11 lines

Recently I had some freezes (due to nvidia...?), and everytime I had to make a hard reset.

Everytime then the raid resynced completely which took about 1.5 hours. One time I lost some kde settings when this happened.
The filesystem did not complain about an unclean shutdown, it seems it did not see on bootup that the last shutdown was unclean.

Now to my questions:
Is this the normal behaviour?

Which behaviour?

1.5 hour resync -- maybe. It depends on the speed and size of the
drives.
lost kde settings -- maybe. It depends on how well kde copes with
sudden system failure.
The filesystem didn't complain -- Yes. ext3 doesn't complain about
an unclean shutdown. It just replays the journal and keeps working.

Quoted 1 line

Shouldn't the filesystem take care of that?

Take care of what? I suspect it did take care of everything it could.

Quoted 1 line

What is the point of having a journaling filesystem on a mirror?

Lots. A journaling filesystem guards against unclean shutdown. A mirror guards against drive failure. These are compliementary.

Quoted 2 lines

Is there anything I can change to have the filesystem handle unclean shutdowns?

I think it did handle the unclean shutdown just fine. The loss of kde settings is probably dud to KDE note being careful enough when updating it's settings file.

NeilBrown

Quoted 13 lines

TIA,
Yves

Signature · 7 lines
Linux 2.4.24 #5 Mon Jan 5 19:38:06 CET 2004 i686
 14:25:55 up  4:14,  1 user,  load average: 0.43, 0.40, 0.32

-
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
author
#2 lore raw
Quoted 7 lines · On Sunday February 1, [email protected] wrote:
Quoted 4 lines

Hello,

I have my home partition on a raid1 device, and there is an ext3 filesystem on it. Some more information:

...

Quoted 1 line
Quoted 8 lines
Quoted 8 lines

Recently I had some freezes (due to nvidia...?), and everytime I had to make a hard reset.

Everytime then the raid resynced completely which took about 1.5 hours. One time I lost some kde settings when this happened.

The filesystem did not complain about an unclean shutdown, it seems it
did not see on bootup that the last shutdown was unclean.

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Quoted 3 lines
Quoted 2 lines

Now to my questions:
Is this the normal behaviour?

Which behaviour?

Sorry for being unclear...
After an unclean shutdown, my raid always rebuilds, and the filesystem never replays the journal. I just does not see that it was not properly unmounted.

Now again :)... is that the normal behaviour?

Quoted 2 lines

1.5 hour resync -- maybe. It depends on the speed and size of the
drives.

ok

Quoted 2 lines

lost kde settings -- maybe. It depends on how well kde copes with
sudden system failure.

ok

Quoted 3 lines

The filesystem didn't complain -- Yes. ext3 doesn't complain about
an unclean shutdown. It just replays the journal and keeps working.

It did not replay anything in these cases.

Quoted 35 lines
Quoted 1 line

Shouldn't the filesystem take care of that?

Take care of what? I suspect it did take care of everything it could.

Quoted 1 line

What is the point of having a journaling filesystem on a mirror?

Lots. A journaling filesystem guards against unclean shutdown. A
mirror guards against drive failure. These are compliementary.

Quoted 2 lines

Is there anything I can change to have the filesystem handle unclean shutdowns?

I think it did handle the unclean shutdown just fine. The loss of kde settings is probably dud to KDE note being careful
enough when updating it's settings file.

NeilBrown

Quoted 5 lines

TIA,
Yves

Quoted 8 lines

--
Linux 2.4.24 #5 Mon Jan 5 19:38:06 CET 2004 i686
14:25:55 up 4:14, 1 user, load average: 0.43, 0.40, 0.32

-
To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

-
To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#3 lore raw
Quoted 5 lines · On Monday February 2, [email protected] wrote:

Sorry for being unclear...
After an unclean shutdown, my raid always rebuilds, and the filesystem never replays the journal. I just does not see that it was not properly unmounted.

That is certainly odd. Are you sure that is what is happening? There are two ways that the journal can be replayed:
1/ fsck can replay it or
2/ ext3 in the kernel can replay it.

The former will not appear in any logs and will only be seen if you watch the boot-time messages go past. The latter will cause a kernel message to be logged.

Were you watching for fsck messages, or only looking in logs?

NeilBrown

author
#4 lore raw

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

Quoted 11 lines · Neil Brown
Quoted 4 lines · On Monday February 2, [email protected] wrote:

Sorry for being unclear...
After an unclean shutdown, my raid always rebuilds, and the filesystem never replays the journal. I just does not see that it was not properly unmounted.

That is certainly odd. Are you sure that is what is happening? There are two ways that the journal can be replayed:
1/ fsck can replay it or
2/ ext3 in the kernel can replay it.

Quoted 5 lines

The former will not appear in any logs and will only be seen if you watch the boot-time messages go past. The latter will cause a kernel message to be logged.

Were you watching for fsck messages, or only looking in logs?

I was watching the boot messages. I use the "quiet" kernel parameter, so the first thing I really saw was that the raid complained about not being clean.
But, now I checked my /var/log/messages, and I saw that in about 4 of 5 times when I had a freeze, on the next boot, the ext3 driver seemed to recover something, look at this:

Jan 27 17:45:40 Valhalla kernel: md: autorun ...
Jan 27 17:45:40 Valhalla kernel: md: considering hdc2 ...
Jan 27 17:45:40 Valhalla kernel: md:  adding hdc2 ...
Jan 27 17:45:40 Valhalla kernel: md:  adding hda2 ...
Jan 27 17:45:40 Valhalla kernel: md: created md0
Jan 27 17:45:40 Valhalla kernel: md: bind<hda2,1>
Jan 27 17:45:40 Valhalla kernel: md: bind<hdc2,2>
Jan 27 17:45:40 Valhalla kernel: md: running: <hdc2><hda2>
Jan 27 17:45:40 Valhalla kernel: md: hdc2's event counter: 00001115
Jan 27 17:45:40 Valhalla kernel: md: hda2's event counter: 00001115
Jan 27 17:45:40 Valhalla kernel: md: RAID level 1 does not need 
chunksize! Continuing anyway.
Jan 27 17:45:40 Valhalla kernel: md: raid1 personality registered as nr 
3
Jan 27 17:45:40 Valhalla kernel: md0: max total readahead window set to 
124k
Jan 27 17:45:40 Valhalla kernel: md0: 1 data-disks, max readahead per 
data-disk: 124k
Jan 27 17:45:40 Valhalla kernel: raid1: device hdc2 operational as 
mirror 1
Jan 27 17:45:40 Valhalla kernel: raid1: device hda2 operational as 
mirror 0
Jan 27 17:45:40 Valhalla kernel: raid1: raid set md0 not clean; 
reconstructing mirrors
Jan 27 17:45:40 Valhalla kernel: raid1: raid set md0 active with 2 out 
of 2 mirrors
Jan 27 17:45:40 Valhalla kernel: md: updating md0 RAID superblock on 
device
Jan 27 17:45:40 Valhalla kernel: md: hdc2 [events: 00001116]<6>(write) 
hdc2's sb offset: 29302464
Jan 27 17:45:40 Valhalla kernel: md: syncing RAID array md0
Jan 27 17:45:40 Valhalla kernel: md: minimum _guaranteed_ reconstruction 
speed: 100 KB/sec/disc.
Jan 27 17:45:40 Valhalla kernel: md: using maximum available idle IO 
bandwith (but not more than 100000 KB/sec) for reconstruction.
Jan 27 17:45:40 Valhalla kernel: md: using 124k window, over a total of 
29302464 blocks.
Jan 27 17:45:40 Valhalla kernel: md: hda2 [events: 00001116]<6>(write) 
hda2's sb offset: 29302464
Jan 27 17:45:40 Valhalla kernel: md: ... autorun DONE.
Jan 27 17:45:40 Valhalla kernel: kjournald starting.  Commit interval 5 
seconds
Jan 27 17:45:40 Valhalla kernel: EXT3 FS 2.4-0.9.19, 19 August 2002 on 
md(9,0), internal journal
Jan 27 17:45:40 Valhalla kernel: EXT3-fs: recovery complete.
Jan 27 17:45:40 Valhalla kernel: EXT3-fs: mounted filesystem with 

writeback data mode.

So it seems that the filesystem is recovering (in 4 of 5 times):
Here the example where it did not:

Jan 19 18:57:49 Valhalla kernel: md: autorun ...
Jan 19 18:57:49 Valhalla kernel: md: considering hdc2 ...
Jan 19 18:57:49 Valhalla kernel: md:  adding hdc2 ...
Jan 19 18:57:49 Valhalla kernel: md:  adding hda2 ...
Jan 19 18:57:49 Valhalla kernel: md: created md0
Jan 19 18:57:49 Valhalla kernel: md: bind<hda2,1>
Jan 19 18:57:49 Valhalla kernel: md: bind<hdc2,2>
Jan 19 18:57:49 Valhalla kernel: md: running: <hdc2><hda2>
Jan 19 18:57:49 Valhalla kernel: md: hdc2's event counter: 000010f8
Jan 19 18:57:49 Valhalla kernel: md: hda2's event counter: 000010f8
Jan 19 18:57:49 Valhalla kernel: md: RAID level 1 does not need 
chunksize! Continuing anyway.
Jan 19 18:57:49 Valhalla kernel: md: raid1 personality registered as nr 
3
Jan 19 18:57:49 Valhalla kernel: md0: max total readahead window set to 
124k
Jan 19 18:57:49 Valhalla kernel: md0: 1 data-disks, max readahead per 
data-disk: 124k
Jan 19 18:57:49 Valhalla kernel: raid1: device hdc2 operational as 
mirror 1
Jan 19 18:57:49 Valhalla kernel: raid1: device hda2 operational as 
mirror 0
Jan 19 18:57:49 Valhalla kernel: raid1: raid set md0 not clean; 
reconstructing mirrors
Jan 19 18:57:49 Valhalla kernel: raid1: raid set md0 active with 2 out 
of 2 mirrors
Jan 19 18:57:49 Valhalla kernel: md: updating md0 RAID superblock on 
device
Jan 19 18:57:49 Valhalla kernel: md: hdc2 [events: 000010f9]<6>(write) 
hdc2's sb offset: 29302464
Jan 19 18:57:49 Valhalla kernel: md: syncing RAID array md0
Jan 19 18:57:49 Valhalla kernel: md: minimum _guaranteed_ reconstruction 
speed: 100 KB/sec/disc.
Jan 19 18:57:49 Valhalla kernel: md: using maximum available idle IO 
bandwith (but not more than 100000 KB/sec) for reconstruction.
Jan 19 18:57:49 Valhalla kernel: md: using 124k window, over a total of 
29302464 blocks.
Jan 19 18:57:49 Valhalla kernel: md: hda2 [events: 000010f9]<6>(write) 
hda2's sb offset: 29302464
Jan 19 18:57:49 Valhalla kernel: md: ... autorun DONE.
Jan 19 18:57:49 Valhalla kernel: kjournald starting.  Commit interval 5 
seconds
Jan 19 18:57:49 Valhalla kernel: EXT3 FS 2.4-0.9.19, 19 August 2002 on 
md(9,0), internal journal
Jan 19 18:57:49 Valhalla kernel: EXT3-fs: mounted filesystem with 

writeback data mode.

Ok, I guess the filesystem just behaves fine, well but still I wonder if it's "normal" that the raid reconstructs also after *every* unclean shutdown.
thank you for your support,
Yves

Quoted 5 lines

NeilBrown
-
To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

- --
Linux 2.4.24 #5 Mon Jan 5 19:38:06 CET 2004 i686
23:03:40 up 4:54, 1 user, load average: 0.02, 0.08, 0.15
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFAHs78fmxiTOp0sQYRAgc4AJ4orJbkdYopVysZo7nq1f9hGhz9bgCeKjQX or6pSSaGIeJFsTAqqw1Gg3o=
=6287
-----END PGP SIGNATURE-----