Unoffical empeg BBS

Quick Links: Empeg FAQ | RioCar.Org | Hijack | BigDisk Builder | jEmplode | emphatic
Repairs: Repairs

Page 1 of 2 1 2 >
Topic Options
#59898 - 16/01/2002 19:20 e2fsck?
mandiola
enthusiast

Registered: 26/12/2001
Posts: 386
Loc: Miami, FL - Sioux Falls, SD
When I mounted my HD on my empeg a few mins ago I got:

empeg:/empeg/bin# rw
EXT2-fs warning: maximal mount count reached, running e2fsck is recommended

I looked around for e2fsck but didn't find it. How can I run this?

-Greg

Top
#59899 - 16/01/2002 19:26 Re: e2fsck? [Re: mandiola]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31597
Loc: Seattle, WA
This error message means that you did not remember to read-only mount (ro, rom) the player after you messed around on the hard disk. Don't forget to do this!

From an old thread where Brian Mihulka was answering the same question when I did the same thing, the solution is to do:

fsck.ext2 /dev/hda5

I would like to put this in the FAQ. For those who know: Is this still the correct thing to do?
_________________________
Tony Fabris

Top
#59900 - 16/01/2002 19:29 Re: e2fsck? [Re: tfabris]
mandiola
enthusiast

Registered: 26/12/2001
Posts: 386
Loc: Miami, FL - Sioux Falls, SD
Thanks, the only time i didn't set back to ro was when the player froze 2 days ago with hijack v117. Since then it never said anything uptill i just reuploaded the finaly index.html to my root.

-Greg

Top
#59901 - 16/01/2002 20:23 Re: e2fsck? [Re: mandiola]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31597
Loc: Seattle, WA
the only time i didn't set back to ro was when the player froze 2 days ago with hijack v117

Right, and the error message has been waiting to pounce on you ever since.

Can anyone confirm whether what I put in the other message is still the correct fix or not?
_________________________
Tony Fabris

Top
#59902 - 16/01/2002 20:33 Re: e2fsck? [Re: tfabris]
drakino
carpal tunnel

Registered: 08/06/1999
Posts: 7868
Actually, that warning just means the filesystem reached a certain mount count, and thinks it needs a routine check. Emplode would have probably done a check on the next sync, if it wasn't disabled in hijack.

EXT2-fs warning: mounting unchecked fs, running e2fsck is recommended

Thats the error message when a filesystem wasn't unmounted cleanly (ro'ed in the case of the empeg)

Top
#59903 - 16/01/2002 20:36 Re: e2fsck? [Re: drakino]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31597
Loc: Seattle, WA
Oh, so I was getting my e2fsck errors mixed up?

Okay, if that SECOND error appears, then is the fix line I posted still the correct fix?
_________________________
Tony Fabris

Top
#59904 - 16/01/2002 20:49 Re: e2fsck? [Re: tfabris]
BAKup
addict

Registered: 11/11/2001
Posts: 552
Loc: Houston, TX
The fix will work in both cases...As long as the partiton is mounted RO.

_________________________
--Ben
78GB MkIIa, Dead tuner.

Top
#59905 - 16/01/2002 23:56 Re: e2fsck? [Re: tfabris]
wfaulk
carpal tunnel

Registered: 25/12/2000
Posts: 16706
Loc: Raleigh, NC US
First, they're mount errors. Second, they're not errors, they're warnings. Neither one means that there is an error. Third, the one initially complained about is a very mild warning. Basically, the filesystem keeps track of how many times it's been mounted. Once it reaches a certain number of mounts, the mount utility suggests fscking it, just to be on the safe side. If this happens on boot, most Linux systems will automatically fsck it for you. The other warning means that there's a reasonable possibility of there being filesystem problems, as it wasn't unmounted, so there could be inconsistencies in the filesystem. But there might not be any errors, too. Just like powering off Windows without shutting down. Sorry for the partial repetition. Just trying to be clear.
_________________________
Bitt Faulk

Top
#59906 - 17/01/2002 00:40 Re: e2fsck? [Re: tfabris]
JaBZ
addict

Registered: 08/08/2001
Posts: 452
Loc: NZ
This error message means that you did not remember to read-only mount (ro, rom) the player after you messed around on the hard disk.
ok so say if you DO forget to do this, I presume on the next power cycle, or boot. The player mounts the drive as ro?
or not?

cheers,
Jaidev

Top
#59907 - 17/01/2002 04:09 Re: e2fsck? [Re: BAKup]
Roger
carpal tunnel

Registered: 18/01/2000
Posts: 5683
Loc: London, UK
You really ought to unmount the partition first.
_________________________
-- roger

Top
#59908 - 17/01/2002 11:28 Re: e2fsck? [Re: Roger]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31597
Loc: Seattle, WA
Now I'm even more confused.

I just want to write a FAQ entry that simply says:

"Q: I got an E2FSCK error message at the Bash prompt. What do I do to fix it?

A: Type the following:

xxxxxxxxxxxxxx
xxxxxxxxxxxxxx
xxxxxxxxxxxxxx

The error should go away."

What do I put in the xxxxxxxxxxxx section?
_________________________
Tony Fabris

Top
#59909 - 17/01/2002 11:35 Re: e2fsck? [Re: tfabris]
Roger
carpal tunnel

Registered: 18/01/2000
Posts: 5683
Loc: London, UK
umount /dev/hda4
umount /dev/hdc4
fsck -f /dev/hda4
fsck -f /dev/hdc4
mount -n -o ro /dev/hda4 /drive0
mount -n -o ro /dev/hdc4 /drive1


Unmount both music partitions, run fsck on them. By default fsck only checks the disk if it's marked dirty, or the mount count is reached, so -f forces a check.

You then answer yes to the questions it gives you.

Then you remount the disks readonly.
_________________________
-- roger

Top
#59910 - 17/01/2002 11:59 Re: e2fsck? [Re: Roger]
tms13
old hand

Registered: 30/07/2001
Posts: 1115
Loc: Lochcarron and Edinburgh
...and omit all the lines mentioning /dev/hdc4 if you only have one drive.
_________________________
Toby Speight
030103016 (80GB Mk2a, blue)
030102806 (0GB Mk2a, blue)

Top
#59911 - 17/01/2002 12:08 Re: e2fsck? [Re: Roger]
mtempsch
pooh-bah

Registered: 02/06/2000
Posts: 1996
Loc: Gothenburg, Sweden
You then answer yes to the questions it gives you.

In that case you could just give the -y option and go have a coffee instead
Or does the fsck on the empeg not support that flag?

One downside though, is that you don't get to see all things that might be wrong,
so it might be hard to tell exactly how fscked the disk is...

/Michael
_________________________
/Michael

Top
#59912 - 17/01/2002 13:02 Re: e2fsck? [Re: mtempsch]
pgrzelak
carpal tunnel

Registered: 15/08/2000
Posts: 4859
Loc: New Jersey, USA
Greetings!

I thought the -y would still print the errors. What I do is turn on the capture on the terminal session before walking away. If I am feeling lazy, I do a script, turn on capture, run the script and get coffee. The terminal usually has enough screen / buffer to see what is happening, unless there were lots of errors. Then I go back to the capture file.
_________________________
Paul Grzelak
200GB with 48MB RAM, Illuminated Buttons and Digital Outputs

Top
#59913 - 17/01/2002 13:06 Re: e2fsck? [Re: Roger]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31597
Loc: Seattle, WA
This works on both a Mk1 and a Mk2?
_________________________
Tony Fabris

Top
#59914 - 17/01/2002 13:44 Re: e2fsck? [Re: tfabris]
mtempsch
pooh-bah

Registered: 02/06/2000
Posts: 1996
Loc: Gothenburg, Sweden
I'd think so... All from memory, could be off: The empeg guys sort of mislabels the /dev/hdb into /dev/hdc on the MkIIs (normally hdb is slave on the first IDE channel and hdc is master on the second IDE channel) so that the MkI and MkIIs can do the same thing despite the secondary disk in the MkI being master on the second channel while it's slave on the first channel in the MkIIs. What physical device the /dev/whatever actually point to is decided by the major and minor device numbers, not the name.

/Michael
_________________________
/Michael

Top
#59915 - 17/01/2002 14:02 Re: e2fsck? [Re: mtempsch]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31597
Loc: Seattle, WA
Okay, thanks everyone. FAQ entry put in place:

http://www.riocar.org/modules.php?op=modload&name=FAQ&file=index&myfaq=yes&id_cat=8&categories=Known+problems+and+troubleshooting+questions#162

If corrections are needed, please put them here in this thread.
_________________________
Tony Fabris

Top
#59916 - 18/01/2002 02:32 Re: e2fsck? [Re: tfabris]
drakino
carpal tunnel

Registered: 08/06/1999
Posts: 7868
The only thing I can think to add would be commands to check the root partition as well. To do this, run "ro" first, then "fsck -f /".

Top
#59917 - 18/01/2002 02:52 Re: e2fsck? [Re: drakino]
Roger
carpal tunnel

Registered: 18/01/2000
Posts: 5683
Loc: London, UK
And don't remount the root directory read-write again, afterwards. Reboot.

I can't emphasis this enough. The problems with disk corruption that we experienced early in the 2.0 beta cycle (before anybody other than the alpha team got to see v2.0) were caused by a complicated chain of events involving a read-only, fsck, read-write cycle.
_________________________
-- roger

Top
#59918 - 18/01/2002 03:21 Re: e2fsck? [Re: Roger]
drakino
carpal tunnel

Registered: 08/06/1999
Posts: 7868
Thanks for the warning. I've done this a few times in the past, and haven't noticed a problem. But from now on, I'll avoid doing this.

Top
#59919 - 18/01/2002 04:25 Re: e2fsck? [Re: drakino]
Roger
carpal tunnel

Registered: 18/01/2000
Posts: 5683
Loc: London, UK
It went like this:

1. Disks are mounted read-write.
2. We delete the /lost+found directory.
3. We mount the disk read-only.
4. We run fsck.
5. fsck recreates the /lost+found directory.
6. We mount read-write.
7. Disk corruption results.

The problem seems to be caused by the kernel not updating its directory cache for the root directory. When fsck recreates lost+found, the two get out of sync. Then you remount read-write, and the kernel modifies its cached copy, and then flushes it. Boom.

Now, this sequence of events is so rare as to be extremely unlikely to happen to anyone else, but I'd be aware of it anyway -- simply remounting the disks ro doesn't cause the kernel to flush its changes out, or to discard its cached copy.

This particular bug resulted in Steve Sanders losing all of his music -- the first lot of disk corruption caused _everything_ to be moved into lost+found, which we then emptied. Whoops.
_________________________
-- roger

Top
#59920 - 18/01/2002 04:49 Re: e2fsck? [Re: tfabris]
peter
carpal tunnel

Registered: 13/07/2000
Posts: 4180
Loc: Cambridge, England
If corrections are needed, please put them here in this thread.

The FAQ refers to commands RO, ROM, RW, RWM, but these commands are case-sensitive and lower case. Mind you, anyone clueful enough to have got their player in that state in the first place will probably know this.

And while we're on, what's with those out-of-control URLs that riocar.org invents for everything? Even if it needs that huge URL in Tony's post for internal purposes, can't the server rewrite it from a simpler user-visible URL -- something like http://www.riocar.org/faq/myfaq/8/ ? Tony's post makes this whole thread unviewable in narrow browser windows...

Peter

Top
#59921 - 18/01/2002 12:38 Re: e2fsck? [Re: Roger]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31597
Loc: Seattle, WA
So what are you saying? Should I update the FAQ entry to say "Reboot the player (important!)" after the procedure?

I will fix the case on RO etc.

And sorry for the wide link. My fault for not encasing it in a URL= tag. Got lazy.
_________________________
Tony Fabris

Top
#59922 - 18/01/2002 12:44 Re: e2fsck? [Re: tfabris]
Roger
carpal tunnel

Registered: 18/01/2000
Posts: 5683
Loc: London, UK
For any partition that you mounted read-only in order to run fsck, yes. This generally will only mean the root partition.

When a normal Linux box checks its root partition (which is mounted read-only) at bootup, and changes were made by fsck, it forces a reboot for just this reason.

Completely unmounting the music partitions before running fsck (as per my post, above) doesn't require a reboot afterwards.
_________________________
-- roger

Top
#59923 - 18/01/2002 13:40 Re: e2fsck? [Re: peter]
drakino
carpal tunnel

Registered: 08/06/1999
Posts: 7868
And while we're on, what's with those out-of-control URLs that riocar.org invents for everything?

I don't know, ask the PHPNuke people...

I am looking at what to do with the site when I go in to upgrade the code. I'll probably start testing some thing here in the next few weeks. I don't like the code much ,as seen by the many lines of code I have added to "correct" some issues. Some of those involved database framework changes, thus making a normal upgrade even harder.

And for the future, FAQ links can strip out the &category portion, all that does is pass the title over to be displayed on the top of the page. Again, it's a stupid way of doing it when it has the database open already, but again, I didn't code it from scratch.

If no major improvements were made to the FAQ code in whatever I decide to move to, I will recode it, since 75% of the code in the FAQ file is mine anyhow.

Top
#59924 - 18/01/2002 13:55 Re: e2fsck? [Re: Roger]
Roger
carpal tunnel

Registered: 18/01/2000
Posts: 5683
Loc: London, UK
I just read the FAQ entry, and have one comment: if you're going to reboot the player, there's no need to remount the disks...
_________________________
-- roger

Top
#59925 - 18/01/2002 14:20 Re: e2fsck? [Re: Roger]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31597
Loc: Seattle, WA
If what I wrote doesn't HURT anything, I'll just leave it there to be redundant.
_________________________
Tony Fabris

Top
#59926 - 18/01/2002 18:40 Re: e2fsck? [Re: Roger]
wfaulk
carpal tunnel

Registered: 25/12/2000
Posts: 16706
Loc: Raleigh, NC US
fscking any mounted filesystem, even if it's read-only, on any Unix that I'm aware of, can have such problems. The problem is that the OS expects that it's the only thing modifying the filesystem. When you run fsck on the device, it ends up modifying the filesystem. The OS has absolutely no way to know this. So it's easily possible for it to encounter inconsistencies and screw up in undefined ways.
_________________________
Bitt Faulk

Top
#59927 - 19/01/2002 14:04 Re: e2fsck? [Re: tfabris]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14493
Loc: Canada
Well, there's like a bizillion replys so far, mostly correct. Here is some more background info on the "problem":

"maximal mount count" refers to a counter on the disk, one per filesystem, that is normally incremented each time the filesystem is mounted "writable" (read-write). When this counter exceeds a programmed threshold, a lengthy time-consuming filesystem check is "forced" the next time that filesystem is mounted writable (usually by Emplode). Mostly this is a nuisance, a total waste of time..

The Hijack "disable periodic filesystem checks" simply prevents this counter from incrementing. There is a second, related test done on "writeable" mounts: a time/date comparism. If a programmed time "interval" has elapsed since the most recent filesystem check, then this too will force one. Ugh. Hijack also prevents that from happening.

Neither of the mountcount nor interval checks are necessary for a healthy system. On my Linux desktops, I routinely turn these features off using "tune2fs -c0" -i0", necessary once (ever) per filesystem.

The neat thing is that filesystem checks will still happen with those things turned off, but now they happen ONLY when necessary (improper shutdown while "writeable", or kernel bug, or..).

To check filesystems while logged into an Empeg running the developer image, use the following command sequence:

ro
fsck -fay /
fsck -fay /drive0
fsck -fay /drive1
sync
(and force a reboot by cycling the power or using Hijack's menu)


Cheers

the resident kernel dude.

Top
Page 1 of 2 1 2 >