You are not logged in.
Whenever in the past I've done a file system check as part of a routine system administration check, as root in a console I've run
telinit 1
and after logging in as root, run
umount /dev/sdc6
reiserfs --check --logfile check.log /dev/sdc6
exit
and that was it.
This is the first time I've attempted this kind of thing with Arch and while I get started perfectly well, when I attempt to unmount the file system I want to check I get a "busy" error. I thought that going back into run level 1 got me out of that kind of trouble but apparently not. What do I have to do to run this file system check; /dev/sdc6 is the root partition.
I'm lost.
jlowell
Offline
As I'm sure you know, you can only unmount a filesystem when it is not in use. To find out what programs/processes are using your filesystem, try running 'lsof /dev/sdc6'.
Your best bet for checking the root filesystem will be on boot up into single user mode so that the filesystem is still in read-only mode and before any processes have been started.
Follow the link below, sign up, and accept one promotional offer. If I can get five suckers (err... friends) to do this, I'll get a free iPod. Then you too can try to get a free iPod. Thanks! http://www.freeiPods.com/?r=11363142
Offline
Hi farphel,
Did you change this spelling recently from farfel? Maybe I'm getting too old and the memory is shot but I thought you'd spelled it farfel in the past, same avatar.
Anyway, thanks for your reply. And, yes, I did know that you can't unmount an active process, but I did think telinit 1 took me into a read only condition. Bad guess, eh?
This one hasn't been easy. I've tried everything, lazy umounts, for example, which work, but after which the system refuses to pick up the devise so that I can mount it read only and go from there. I'm about googled and man-paged out (five hours last night). Thanks for the idea.
Now, how do I get the system to boot into single user mode? Can this be done via grub once their splashscreen appears? I'll try that and see and get back to you.
jlowell
Offline
farphel,
Well, booting into grub, running c and hitting Tab doesn't help but googling does. So that someone else that wants an answer to this question will have it, boot into grub, select e for edit, select the kernel line and add the separate word single to it and reboot. You'll have to re-edit to remove the word single after the file system check is complete.
Why this process requires all this work baffles me. My first experiences with a working Linux system were with SuSE 7.3 and you could move directly into single user mode with telinit 1 from the command line, umount the root partition and run a file system check without thinking about it. While I'm not going to reinstall SuSE 7.3 so as to determine how that was achieved, I do think that this was a capability of older Linux versions and not present ones because I've had the same problem with Gentoo, another distro I use here. Perhaps a case of progress not being progressive, eh?
Regards, farphel.
jlowell
Offline
You can also
$ telinit 1
$ mount / -o remount,ro
do the check stuff & then
$ mount / -o remount,rw
$ telinit 3
Offline
farphel & zen_gorilla,
Well I shot off my mouth too fast about getting this to work by doing a kernel line edit with grub. Truth be known, it doesn't work that way at all because while you'll get into single user mode OK, the preceeding file system mount read only, file system check and file system mount steps have already taken place. You get the request for the root password, etc. but you're no better off than if you ran telinit 1 from a console. My apologies to anyone taking my instructions above and trying to do a filesystem check this way, it simply doesn't work.
Zen, I'm going to try your solution next. I'll get back to you in a few minutes. Thanks for the reply!
jlowell
Offline
zen_gorilla,
OK, here's what I've done: From a console
telinit 1
and logged on with root password.
mount / -o remount, ro
and get output
mount: / is busy
If I try a lazy umount with subsequent attempt to mount the device, the device isn't recognized no matter if I call it /dev/sdc6 or /dev/discs/disc2/part6. Where do we go from here? It's looking to me that the only way to do a file system check on this system is via the pre-arranged boot script method. What ever happened to flexibilty?
jlowell
Offline
Ok, I figured it out
$ telinit 1
$ /etc/rc.d/klogd stop
$ /etc/rc.d/syslogd stop
$ mount / -o remount,ro
and it should work
Offline
mount / -o remount, ro
no space, very important
mount / -o remount,ro
I have discovered that all of mans unhappiness derives from only one source, not being able to sit quietly in a room
- Blaise Pascal
Offline
zen_gorilla & Xentac,
Xentac,
Happy to report that was a typo. Thanks for your eagle-eye!
Zen,
That did it!
The correct sequence, then, from a console is:
telinit 1
/etc/rc.d/klogd stop
/etc/rc.d/syslogd stop
mount / -o remount, ro
umount /dev/sdc6
reiserfsck --check /dev/sdc6
reboot
I chose in this way to let the system re-mount /dev/sdc6 rw after the check as you can see to make sure I hadn't borked the boot scripts somehow. I hadn't. Also, I'm happy to report the file system was healthy.
Many thanks for the analytical work and the command line instructions! This way when I do my regular maintenance I won't be left guessing if I've got a sound file system.
Best regards to all three of you, farphel included.
jlowell
Offline
Enter the uptime-junkie area . You can also
mount / -o remount,rw
mount /dev/sdc6
telinit 3
and get back in action without restarting .
Offline