* RE: Bad Sectors during log replay, help?
@ 2002-05-03 4:34 Will Stowe
2002-05-03 4:39 ` Dax Kelson
0 siblings, 1 reply; 7+ messages in thread
From: Will Stowe @ 2002-05-03 4:34 UTC (permalink / raw)
To: 'Dax Kelson', reiserfs-list
Try turning off dma using hdparm -d 0 /dev/had, then try remounting
Will Stowe
Systems Administrator
Intec Telecom Systems
5775 Peachtree-Dunwoody Road
Atlanta, GA 30342
Work:(404) 705-2867
Email: Will.Stowe@intec-telecom-systems.com
-----Original Message-----
From: Dax Kelson [mailto:dax@gurulabs.com]
Sent: Friday, May 03, 2002 12:33 AM
To: reiserfs-list@namesys.com
Subject: [reiserfs-list] Bad Sectors during log replay, help?
I have a kernel 2.4.18 trying to mount a reiserfs filesytem with
important data on it.
I NEED to get some data off this filesystem, what can I do?
# mount -o ro -t reiserfs /dev/hda3 /mnt/tmp
reiserfs: checking transaction log (device 03:03) ...
Warning, log replay starting on readonly filesystem
hda: dma_intr: status=0x51 { DriveReady SeekComplete Error }
hda: dma_intr: error=0x40 { UncorrectableError }, LBAsect=613153,
sector=26408
end_request: I/O error, dev 03:03 (hda), sector 26408
hda: dma_intr: status=0x51 { DriveReady SeekComplete Error }
hda: dma_intr: error=0x40 { UncorrectableError }, LBAsect=613153,
sector=26416
end_request: I/O error, dev 03:03 (hda), sector 26416
hda: dma_intr: status=0x51 { DriveReady SeekComplete Error }
hda: dma_intr: error=0x40 { UncorrectableError }, LBAsect=613153,
sector=26424
end_request: I/O error, dev 03:03 (hda), sector 26424
hda: dma_intr: status=0x51 { DriveReady SeekComplete Error }
hda: dma_intr: error=0x40 { UncorrectableError }, LBAsect=613153,
sector=26432
end_request: I/O error, dev 03:03 (hda), sector 26432
hda: dma_intr: status=0x51 { DriveReady SeekComplete Error }
hda: dma_intr: error=0x40 { UncorrectableError }, LBAsect=613153,
sector=26440
end_request: I/O error, dev 03:03 (hda), sector 26440
hda: dma_intr: status=0x51 { DriveReady SeekComplete Error }
hda: dma_intr: error=0x40 { UncorrectableError }, LBAsect=613153,
sector=26448
end_request: I/O error, dev 03:03 (hda), sector 26448
hda: dma_intr: status=0x51 { DriveReady SeekComplete Error }
hda: dma_intr: error=0x40 { UncorrectableError }, LBAsect=613153,
sector=26456
end_request: I/O error, dev 03:03 (hda), sector 26456
hda: dma_intr: status=0x51 { DriveReady SeekComplete Error }
hda: dma_intr: error=0x40 { UncorrectableError }, LBAsect=613153,
sector=26464
end_request: I/O error, dev 03:03 (hda), sector 26464
hda: dma_intr: status=0x51 { DriveReady SeekComplete Error }
hda: dma_intr: error=0x40 { UncorrectableError }, LBAsect=613153,
sector=26472
end_request: I/O error, dev 03:03 (hda), sector 26472
hda: dma_intr: status=0x51 { DriveReady SeekComplete Error }
hda: dma_intr: error=0x40 { UncorrectableError }, LBAsect=613153,
sector=26480
end_request: I/O error, dev 03:03 (hda), sector 26480
hda: dma_intr: status=0x51 { DriveReady SeekComplete Error }
hda: dma_intr: error=0x40 { UncorrectableError }, LBAsect=613153,
sector=26488
end_request: I/O error, dev 03:03 (hda), sector 26488
hda: dma_intr: status=0x51 { DriveReady SeekComplete Error }
hda: dma_intr: error=0x40 { UncorrectableError }, LBAsect=613153,
sector=26496
end_request: I/O error, dev 03:03 (hda), sector 26496
is_tree_node: node level 1 does not match to the expected one 4
vs-5150: search_by_key: invalid format found in block 14806. Fsck?
vs-13070: reiserfs_read_inode2: i/o failure occurred trying to find stat
data of [1 2 0x0 SD]
Using r5 hash to sort names
ReiserFS version 3.6.25
(and the mount fails)
^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: Bad Sectors during log replay, help?
2002-05-03 4:34 Bad Sectors during log replay, help? Will Stowe
@ 2002-05-03 4:39 ` Dax Kelson
2002-05-03 4:53 ` Howto mount without replay? Dax Kelson
0 siblings, 1 reply; 7+ messages in thread
From: Dax Kelson @ 2002-05-03 4:39 UTC (permalink / raw)
To: Will Stowe; +Cc: reiserfs-list@namesys.com
On Fri, 3 May 2002, Will Stowe wrote:
> Try turning off dma using hdparm -d 0 /dev/had, then try remounting
Thanks for replying (I really *love* ezmlm mailing lists, the latency is
great!).
I wouldn't think that this would do anything as the drive has been in
production for the last 12 months.
hda: DMA disabled
reiserfs: checking transaction log (device 03:03) ...
Warning, log replay starting on readonly filesystem
hda: read_intr: status=0x59 { DriveReady SeekComplete DataRequest Error }
hda: read_intr: error=0x40 { UncorrectableError }, LBAsect=613128,
sector=26472
end_request: I/O error, dev 03:03 (hda), sector 26472
hda: read_intr: status=0x59 { DriveReady SeekComplete DataRequest Error }
hda: read_intr: error=0x40 { UncorrectableError }, LBAsect=613136,
sector=26480
end_request: I/O error, dev 03:03 (hda), sector 26480
hda: read_intr: status=0x59 { DriveReady SeekComplete DataRequest Error }
hda: read_intr: error=0x40 { UncorrectableError }, LBAsect=613144,
sector=26488
end_request: I/O error, dev 03:03 (hda), sector 26488
hda: read_intr: status=0x59 { DriveReady SeekComplete DataRequest Error }
hda: read_intr: error=0x40 { UncorrectableError }, LBAsect=613152,
sector=26496
end_request: I/O error, dev 03:03 (hda), sector 26496
is_tree_node: node level 1 does not match to the expected one 4
vs-5150: search_by_key: invalid format found in block 14806. Fsck?
vs-13070: reiserfs_read_inode2: i/o failure occurred trying to find stat
data of [1 2 0x0 SD]
Using r5 hash to sort names
ReiserFS version 3.6.25
^ permalink raw reply [flat|nested] 7+ messages in thread
* Howto mount without replay?
2002-05-03 4:39 ` Dax Kelson
@ 2002-05-03 4:53 ` Dax Kelson
2002-05-03 6:32 ` Oleg Drokin
2002-05-14 22:21 ` Matthew Toseland
0 siblings, 2 replies; 7+ messages in thread
From: Dax Kelson @ 2002-05-03 4:53 UTC (permalink / raw)
To: reiserfs-list@namesys.com
I don't care about this filesystem or drive other than I need to get a few
files off of it.
Is there anyway to mount it without it attempting the log replay?
Dax
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Howto mount without replay?
2002-05-03 4:53 ` Howto mount without replay? Dax Kelson
@ 2002-05-03 6:32 ` Oleg Drokin
2002-05-03 11:37 ` Chris Mason
2002-05-14 22:21 ` Matthew Toseland
1 sibling, 1 reply; 7+ messages in thread
From: Oleg Drokin @ 2002-05-03 6:32 UTC (permalink / raw)
To: Dax Kelson; +Cc: reiserfs-list@namesys.com
Hello!
On Thu, May 02, 2002 at 10:53:52PM -0600, Dax Kelson wrote:
> I don't care about this filesystem or drive other than I need to get a few
> files off of it.
> Is there anyway to mount it without it attempting the log replay?
Well, this is more of a question we deal with based on
http://namesys.com/support.html terms.
Also the great thing about opensource stuff is that source is available
and you are free to modify any code in any way you need. (hint! hint!)
Bye,
Oleg
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Howto mount without replay?
2002-05-03 6:32 ` Oleg Drokin
@ 2002-05-03 11:37 ` Chris Mason
2002-05-04 2:44 ` Dax Kelson
0 siblings, 1 reply; 7+ messages in thread
From: Chris Mason @ 2002-05-03 11:37 UTC (permalink / raw)
To: Oleg Drokin; +Cc: Dax Kelson, reiserfs-list@namesys.com
This might work on 2.4.18, I think it was 2.4.16 based. I'll port
forward a little later today.
-chris
Index: linux/fs/reiserfs/super.c
--- linux/fs/reiserfs/super.c Thu, 13 Dec 2001 10:46:27 -0500
+++ linux(w)/fs/reiserfs/super.c Thu, 13 Dec 2001 15:05:06 -0500
@@ -440,6 +440,8 @@
set_bit (REISERFS_HASHED_RELOCATION, mount_options);
} else if (!strcmp (this_char, "test4")) {
set_bit (REISERFS_TEST4, mount_options);
+ } else if (!strcmp (this_char, "noreplay")) {
+ set_bit (REISERFS_NO_REPLAY, mount_options);
} else if (!strcmp (this_char, "nolog")) {
reiserfs_warning("reiserfs: nolog mount option not supported yet\n");
} else if (!strcmp (this_char, "replayonly")) {
@@ -532,6 +534,14 @@
journal_mark_dirty(&th, s, SB_BUFFER_WITH_SB (s));
s->s_dirt = 0;
} else {
+ /* if we are currently readonly, and were mounted with noreplay,
+ ** we need to check if replay failed and the journal params are not
+ ** correctly set. If so, we cannot allow a rw mount, horrible, horrible
+ ** things would happen
+ */
+ if (reiserfs_replay_error(s)) {
+ return -EIO ;
+ }
s->u.reiserfs_sb.s_mount_state = sb_state(rs) ;
s->s_flags &= ~MS_RDONLY ; /* now it is safe to call journal_begin */
journal_begin(&th, s, 10) ;
Index: linux/fs/reiserfs/journal.c
--- linux/fs/reiserfs/journal.c Wed, 12 Dec 2001 11:10:14 -0500
+++ linux(w)/fs/reiserfs/journal.c Thu, 13 Dec 2001 15:05:06 -0500
@@ -87,6 +87,7 @@
/* state bits for the journal */
#define WRITERS_BLOCKED 1 /* set when new writers not allowed */
+#define REPLAY_ERROR 2 /* set when -o noreplay forces unclean mount */
static int do_journal_end(struct reiserfs_transaction_handle *,struct super_block *,unsigned long nblocks,int flags) ;
static int flush_journal_list(struct super_block *s, struct reiserfs_journal_list *jl, int flushall) ;
@@ -99,6 +100,10 @@
memset(SB_JOURNAL(p_s_sb)->j_hash_table, 0, JOURNAL_HASH_SIZE * sizeof(struct reiserfs_journal_cnode *)) ;
}
+int reiserfs_replay_error(struct super_block *s) {
+ return test_bit(REPLAY_ERROR, &SB_JOURNAL(s)->j_state) ;
+}
+
/*
** clears BH_Dirty and sticks the buffer on the clean list. Called because I can't allow refile_buffer to
** make schedule happen after I've freed a block. Look at remove_from_transaction and journal_mark_freed for
@@ -1651,12 +1656,20 @@
brelse(d_bh) ;
}
- if (continue_replay && is_read_only(p_s_sb->s_dev)) {
- printk("clm-2076: device is readonly, unable to replay log\n") ;
- return -1 ;
- }
- if (continue_replay && (p_s_sb->s_flags & MS_RDONLY)) {
- printk("Warning, log replay starting on readonly filesystem\n") ;
+ if (continue_replay) {
+ if (is_read_only(p_s_sb->s_dev)) {
+ printk("clm-2076: device is readonly, unable to replay log\n") ;
+ return -1 ;
+ }
+ if (reiserfs_noreplay(p_s_sb)) {
+ printk("-o noreplay used to force unclean mount. FS set to readonly\n");
+ p_s_sb->s_flags |= MS_RDONLY ;
+ set_bit(REPLAY_ERROR, &SB_JOURNAL(p_s_sb)->j_state) ;
+ return 0 ;
+ }
+ if (p_s_sb->s_flags & MS_RDONLY) {
+ printk("Warning, log replay starting on readonly filesystem\n") ;
+ }
}
/* ok, there are transactions that need to be replayed. start with the first log block, find
@@ -2037,6 +2050,12 @@
PROC_INFO_INC( p_s_sb, journal.journal_relock_writers );
goto relock ;
}
+
+ if (test_bit(REPLAY_ERROR, &SB_JOURNAL(p_s_sb)->j_state)) {
+ printk("clm-2100: calling journal_begin after replay errors\n") ;
+ BUG() ;
+ }
+
/* if there is no room in the journal OR
** if this transaction is too old, and we weren't called joinable, wait for it to finish before beginning
Index: linux/include/linux/reiserfs_fs_sb.h
--- linux/include/linux/reiserfs_fs_sb.h Wed, 12 Dec 2001 11:10:14 -0500
+++ linux(w)/include/linux/reiserfs_fs_sb.h Thu, 13 Dec 2001 15:05:06 -0500
@@ -464,6 +464,7 @@
#define REISERFS_NO_UNHASHED_RELOCATION 12
#define REISERFS_HASHED_RELOCATION 13
#define REISERFS_TEST4 14
+#define REISERFS_NO_REPLAY 15
#define REISERFS_TEST1 11
#define REISERFS_TEST2 12
@@ -478,6 +479,7 @@
#define reiserfs_no_unhashed_relocation(s) ((s)->u.reiserfs_sb.s_mount_opt & (1 << REISERFS_NO_UNHASHED_RELOCATION))
#define reiserfs_hashed_relocation(s) ((s)->u.reiserfs_sb.s_mount_opt & (1 << REISERFS_HASHED_RELOCATION))
#define reiserfs_test4(s) ((s)->u.reiserfs_sb.s_mount_opt & (1 << REISERFS_TEST4))
+#define reiserfs_noreplay(s) ((s)->u.reiserfs_sb.s_mount_opt & (1 << REISERFS_NO_REPLAY))
#define dont_have_tails(s) ((s)->u.reiserfs_sb.s_mount_opt & (1 << NOTAIL))
#define replay_only(s) ((s)->u.reiserfs_sb.s_mount_opt & (1 << REPLAYONLY))
Index: linux/include/linux/reiserfs_fs.h
--- linux/include/linux/reiserfs_fs.h Thu, 13 Dec 2001 10:46:27 -0500
+++ linux(w)/include/linux/reiserfs_fs.h Thu, 13 Dec 2001 15:11:09 -0500
@@ -1506,6 +1506,7 @@
void reiserfs_commit_for_inode(struct inode *) ;
void reiserfs_update_inode_transaction(struct inode *) ;
void reiserfs_wait_on_write_block(struct super_block *s) ;
+int reiserfs_replay_error(struct super_block *s) ;
void reiserfs_block_writes(struct reiserfs_transaction_handle *th) ;
void reiserfs_allow_writes(struct super_block *s) ;
void reiserfs_check_lock_depth(char *caller) ;
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Howto mount without replay?
2002-05-03 11:37 ` Chris Mason
@ 2002-05-04 2:44 ` Dax Kelson
0 siblings, 0 replies; 7+ messages in thread
From: Dax Kelson @ 2002-05-04 2:44 UTC (permalink / raw)
To: Chris Mason; +Cc: Oleg Drokin, reiserfs-list@namesys.com
On Fri, 2002-05-03 at 05:37, Chris Mason wrote:
>
> This might work on 2.4.18, I think it was 2.4.16 based. I'll port
> forward a little later today.
I'm about to try this. Do you have something against 2.4.18?
Dax
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Howto mount without replay?
2002-05-03 4:53 ` Howto mount without replay? Dax Kelson
2002-05-03 6:32 ` Oleg Drokin
@ 2002-05-14 22:21 ` Matthew Toseland
1 sibling, 0 replies; 7+ messages in thread
From: Matthew Toseland @ 2002-05-14 22:21 UTC (permalink / raw)
To: Dax Kelson; +Cc: reiserfs-list
[-- Attachment #1: Type: text/plain, Size: 346 bytes --]
On Thu, May 02, 2002 at 10:53:52PM -0600, Dax Kelson wrote:
>
> I don't care about this filesystem or drive other than I need to get a few
> files off of it.
>
> Is there anyway to mount it without it attempting the log replay?
Can you dd the whole partition to a (writable) file somewhere, then mount -o loop
that?
>
> Dax
>
>
[-- Attachment #2: Type: application/pgp-signature, Size: 232 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2002-05-14 22:21 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-05-03 4:34 Bad Sectors during log replay, help? Will Stowe
2002-05-03 4:39 ` Dax Kelson
2002-05-03 4:53 ` Howto mount without replay? Dax Kelson
2002-05-03 6:32 ` Oleg Drokin
2002-05-03 11:37 ` Chris Mason
2002-05-04 2:44 ` Dax Kelson
2002-05-14 22:21 ` Matthew Toseland
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.