#16
05-26-2006, 07:22 AM |
|||
|
|||
Quote:
How can I do that? Should I guess, or is there any command that can do that? |
#17
05-26-2006, 07:25 AM |
||||
|
||||
I would recommend that enter in single user mode before fixing problems with file systems, specially with an important one as /var.
Do a restart , then when bootloader with boot netbsd/freebsd press TAB and then write a -s after your kernel. Another sexy way to do that is modify : rc_configured=NO in rc.conf do the work that has to be done and change rc_configured=YES i rc.conf By the way , u have to kill all the process that access /var to umount it. try lsof to find with processes use it: tonyex@antBSD #>lsof | grep /var syslogd 635 root 3u unix 0xc0bab0d8 0t0 /var/run/log syslogd 635 root 7w VREG 2910,833424 0 /var/log/messages syslogd 635 root 8w VREG 2910,833424 0 /var/log/messages syslogd 635 root 9w VREG 2910,833424 0 /var/log/messages syslogd 635 root 10w VREG 1970,832936 0 /var/log/authlog syslogd 635 root 11w VREG 2215,834120 0 /var/cron/log syslogd 635 root 12w VREG 1973,832840 0 /var/log/xferlog syslogd 635 root 13w VREG 794,789200 1 /var/log/lpd-errs syslogd 635 root 14w VREG 2907,833520 0 /var/log/maillog syslogd 635 root 15w VREG 2910,833424 0 /var/log/messages xdm 981 root 2w VREG 226,833048 0 /var/log/xdm.log cron 982 root cwd VDIR 3662,789136 10 /var/cron xdm 988 root 2w VREG 226,833048 0 /var/log/xdm.log xconsole 989 root 1w VREG 226,833048 0 /var/log/xdm.log xconsole 989 root 2w VREG 226,833048 0 /var/log/xdm.log XFree86 1016 root 2w VREG 226,833048 0 /var/log/xdm.log mgt-pty-h 1054 s74673 5w VREG 1588,833708 0 /var/log/lastlog mgt-pty-h 1054 s74673 8w VREG 1588,833708 0 /var/log/lastlog dhclient 1439 root 4w VREG 40,832680 0 /var/db/dhclient.leases the process id is the second column in the output. and then kill them all. It can be hard but is possible, that why single user mode is much more safer. Reg /T __________________
...Ignorance can kill, ...Intelligence can save. Last edited by tonyex : 05-26-2006 at 07:31 AM. |
#18
05-26-2006, 07:35 AM |
|||
|
|||
thanx, but the problem is that I don't have direct access to the box, it is located in a data centre. Remote hands will cost me a lot of money...
|
#19
05-26-2006, 07:38 AM |
|||
|
|||
Is there maybe any way to force fsck to be ran also on partitions markes as clean on startup (like the -f option)? As i said, it seems that fsck is skipping for /var now.
|
#20
05-26-2006, 07:43 AM |
|||
|
|||
alright, I installed lsof, killed all processes that are displayed to access /var, but I'm still getting the device busy message...
|
#21
05-26-2006, 08:19 AM |
||||
|
||||
Unmount /dev/md0 before attempting to unmount /dev/ad0s1d; Since /dev/ad0s1d was mounted to /var prior to /dev/md0 being mounted to /var, I think you're being prevented from pulling the rug out from under /dev/md0's feet.
__________________
)-(alber(V)ensch |
#22
05-26-2006, 08:28 AM |
|||
|
|||
Quote:
still the same (device busy) |
#23
05-26-2006, 10:13 AM |
|||
|
|||
I have risked to umount the broken partition now with the -f flag, and ran fsck. Here's the output:
Quote:
What does that mean? Anything I can do about this? |
#24
05-26-2006, 11:32 AM |
|||
|
|||
Seems like I'm just talking to myself anyway, but again an update: I managed to run fsck now on the broken partition, and it actually fixed the file system. The new output of fsck is now:
Quote:
As you see, no errors anymore, but still read-only! Also, no more unusal errors in dmesg. I going crazy here, is there anything left that I can do? |
#25
05-26-2006, 11:50 AM |
||||
|
||||
I dont know what it means try google for instance.
I think that it has to do with some data failure or in the worst case drive failure. In the last case u have to log on physically to the box ,I'm afraid. Why do not try a restart, i think in netbsd tthere is an option in rc.conf that can fsck the partitions at boot. Like this: fsck_flags=-y in /etc/rc.conf and reboot ---- fsck_flags A string. A file system is checked with fsck(8) during boot before mounting it. This option may be used to override the default command-line options passed to the fsck(8) program. When set to -y, fsck(8) assumes yes as the answer to all operator questions during file system checks. This might be important with hosts where the administrator does not have access to the console and an unsuccessful shutdown must not make the host unbootable even if the file system checks would fail in preen mode. ---- http://netbsd.gw.com/cgi-bin/man-cgi?rc.conf++NetBSD-current This option exists in free as well, but perhaps in a different way. Reg /T __________________
...Ignorance can kill, ...Intelligence can save. Last edited by tonyex : 05-26-2006 at 12:04 PM. |
#26
05-26-2006, 12:08 PM |
|||
|
|||
actually i already tried what you suggested, tonyex. No success
![]() |
#27
05-26-2006, 12:43 PM |
|||
|
|||
What about adding the -f mount option to fstab like this:
Quote:
Could that work? |
#28
05-28-2006, 11:52 PM |
||||
|
||||
If my sugestion didnt work, the rc.configured one works on most cases, then you have to physically login and restart in singel user mode. Reg / T __________________
...Ignorance can kill, ...Intelligence can save. |
Looking for our FreeBSD Forums? We have moved them off our main page,just follow the link to our FreeBSD Forums page.
Copyright © 2009, WEBSERVER CONSUMER GUIDE
Please note:
(1) FreeBSD is a registered trademark of The FreeBSD Foundation.
(2) WEBSERVER CONSUMER GUIDE is in no way affiliated with The FreeBSD Foundation