DaemonForums  

Go Back   DaemonForums > FreeBSD > FreeBSD General

FreeBSD General Other questions regarding FreeBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 2nd December 2008
map7 map7 is offline
Fdisk Soldier
 
Join Date: Jun 2008
Posts: 75
Default fsck reports errors but does not fix them.

When I do a fsck /var I get the following errors:
Code:
** /dev/da0s1d (NO WRITE)
** Last Mounted on /var
** Phase 1 - Check Blocks and Sizes
** Phase 2 - Check Pathnames
** Phase 3 - Check Connectivity
** Phase 4 - Check Reference Counts
UNREF FILE I=188420  OWNER=mysql MODE=100600
SIZE=0 MTIME=Dec  2 11:31 2008 
CLEAR? no

UNREF FILE I=188447  OWNER=mysql MODE=100600
SIZE=0 MTIME=Dec  2 11:31 2008 
CLEAR? no

UNREF FILE I=188482  OWNER=mysql MODE=100600
SIZE=0 MTIME=Dec  2 11:31 2008 
CLEAR? no

UNREF FILE I=188483  OWNER=mysql MODE=100600
SIZE=0 MTIME=Dec  2 11:31 2008 
CLEAR? no

** Phase 5 - Check Cyl groups
37401 files, 231756 used, 1220491 free (2611 frags, 152235 blocks, 0.2% fragmentation)
To try and fix these errors I first go into single user mode with:
# init 1

Then when I recheck that label in single user mode no errors are reported?
# fsck /dev/da0s1d
Code:
** /dev/da0s1d (NO WRITE)
** Last Mounted on /var
** Phase 1 - Check Blocks and Sizes
** Phase 2 - Check Pathnames
** Phase 3 - Check Connectivity
** Phase 4 - Check Reference Counts
** Phase 5 - Check Cyl groups
37401 files, 231756 used, 1220491 free (2611 frags, 152235 blocks, 0.2% fragmentation)
How do I fix the errors?

I've also tried booting frenzy but this does not boot on my computer, it crashes the kernel and reboots.
Reply With Quote
  #2   (View Single Post)  
Old 2nd December 2008
J65nko J65nko is offline
Administrator
 
Join Date: May 2008
Location: Budel - the Netherlands
Posts: 4,128
Default

Have you tried
Code:
fsck -y
?
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump
Reply With Quote
  #3   (View Single Post)  
Old 2nd December 2008
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,977
Default

The problem is no write access to the partition.
Reply With Quote
  #4   (View Single Post)  
Old 2nd December 2008
map7 map7 is offline
Fdisk Soldier
 
Join Date: Jun 2008
Posts: 75
Default

Yes I have tried with the -y partition.

When I went to single user mode I made sure that /var /tmp and /usr were unmounted, so they should have write access.

The problems just don't appear when I'm doing a scan as a single user.
Reply With Quote
  #5   (View Single Post)  
Old 2nd December 2008
map7 map7 is offline
Fdisk Soldier
 
Join Date: Jun 2008
Posts: 75
Default

I forgot to mention that I'm running this on a 3ware 9000 series controller in a 4 disk hardware RAID-5 configuration.

FreeBSD just sees this as one drive though.
Reply With Quote
  #6   (View Single Post)  
Old 2nd December 2008
map7 map7 is offline
Fdisk Soldier
 
Join Date: Jun 2008
Posts: 75
Default

I've disabled the 3ware monitoring tool as I've seen people having problems with that.
Reply With Quote
  #7   (View Single Post)  
Old 2nd December 2008
map7 map7 is offline
Fdisk Soldier
 
Join Date: Jun 2008
Posts: 75
Default

i thought it might be mysql locking files so I stopped mysql and did a fsck of /var and got other problems

Code:
** /dev/da0s1d (NO WRITE)
** Last Mounted on /var
** Phase 1 - Check Blocks and Sizes
** Phase 2 - Check Pathnames
** Phase 3 - Check Connectivity
** Phase 4 - Check Reference Counts
UNREF FILE  I=329912  OWNER=mysql MODE=100660
SIZE=5 MTIME=Dec  2 15:45 2008 
RECONNECT? no


CLEAR? no

** Phase 5 - Check Cyl groups
FREE BLK COUNT(S) WRONG IN SUPERBLK
SALVAGE? no

SUMMARY INFORMATION BAD
SALVAGE? no

BLK(S) MISSING IN BIT MAPS
SALVAGE? no

37424 files, 231871 used, 1220376 free (2616 frags, 152220 blocks, 0.2% fragmentation)
Reply With Quote
  #8   (View Single Post)  
Old 2nd December 2008
map7 map7 is offline
Fdisk Soldier
 
Join Date: Jun 2008
Posts: 75
Default

I'm running FreeBSD 7.0 by the way.
Reply With Quote
  #9   (View Single Post)  
Old 2nd December 2008
map7 map7 is offline
Fdisk Soldier
 
Join Date: Jun 2008
Posts: 75
Default

I just tried this under a single drive, FreeBSD 7.0 on another machine and I get the same issues with fsck.

It reports errors when it's mounted and live, but if I go into single user mode and unmount then there are no errors. Is this normal?

This didn't used to happen in FreeBSD 6.2, now it does and I cannot run dump on a live system as it keeps hanging on the UNREF files.
Reply With Quote
Old 2nd December 2008
ephemera's Avatar
ephemera ephemera is offline
Knuth's homeboy
 
Join Date: Apr 2008
Posts: 537
Default

Quote:
Originally Posted by map7 View Post
It reports errors when it's mounted and live, but if I go into single user mode and unmount then there are no errors. Is this normal?
Umm, you are not supposed to run fsck on a mounted file system.
Either unmount the FS or mount it R/O in case of root.
Reply With Quote
Old 2nd December 2008
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,977
Default

The errors you keep seeing, and not reading, say NO WRITE. Why do you think that is?
Reply With Quote
Old 2nd December 2008
map7 map7 is offline
Fdisk Soldier
 
Join Date: Jun 2008
Posts: 75
Default

I understand that to fix problems with fsck you must first unmount that filesystem. If you look at post #4 in this thread, you will see I have tried running fsck in single user mode with the filesystems unmounted.

Are you guys saying that I should ignore the errors I get when running fsck on a mounted filesystem because fsck is not supposed to be run this way? I know fsck will not fix errors on a live system, but does it report invalid problems with the filesystems if they are mounted?
Reply With Quote
Old 2nd December 2008
phoenix's Avatar
phoenix phoenix is offline
Risen from the ashes
 
Join Date: May 2008
Posts: 696
Default

Quote:
Originally Posted by map7 View Post
I understand that to fix problems with fsck you must first unmount that filesystem. If you look at post #4 in this thread, you will see I have tried running fsck in single user mode with the filesystems unmounted.
But, all the bits you posted showing fsck running, show "NO WRITE ACCESS".

Quote:
Are you guys saying that I should ignore the errors I get when running fsck on a mounted filesystem because fsck is not supposed to be run this way? I know fsck will not fix errors on a live system, but does it report invalid problems with the filesystems if they are mounted?
If softupdates are enabled on the filesystem, then yes, the results you get from running fsck on a mounted filesystem will be undefined. Softupdates changes the way files are deleted, and space reclaimed.
__________________
Freddie

Help for FreeBSD: Handbook, FAQ, man pages, mailing lists.
Reply With Quote
Old 2nd December 2008
map7 map7 is offline
Fdisk Soldier
 
Join Date: Jun 2008
Posts: 75
Default

pheonix,

thank you for understanding the mess I've posted. I must not of explained myself correctly and posted inaccurate examples. What I was trying to show was the different results I got when running 'fsck' on a live filesystem compared to an unmounted filesystem. I was unsure if I was supposed to be getting errors when scanning a live filesystem, even though that filesystem has reported error free when unmounted.

I have 'soft updates' enabled for the filesystems in question, so that would explain these errors, thanks again.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
JPEG library reports unrecoverable error: Calderon FreeBSD General 2 26th August 2009 03:07 PM
pkgdb errors maxrussell FreeBSD Ports and Packages 1 22nd May 2009 11:06 AM
Uname still reports 7.0 release maxrussell FreeBSD Installation and Upgrading 6 4th May 2009 12:49 PM
mdmfs and fsck on boot elon FreeBSD General 0 8th December 2008 06:33 PM
Disable manual fsck on startup Malakim FreeBSD General 4 2nd September 2008 05:28 PM


All times are GMT. The time now is 05:21 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick