fsck on a read only partition?

Christopher Cowart ccowart at rescomp.berkeley.edu
Thu Jul 5 01:45:52 UTC 2007


On Thu, Jul 05, 2007 at 01:49:47AM +0100, Joe Holden wrote:
> Alfred Perlstein wrote:
> > Hello, how do I fsck my disk if it's mounted?
> > 
> > I have downgraded the mount to read-only, but still geom seems
> > to disallow fsck access to it. 
> > 
> > Is there a way to tell the system to allow fsck to open it
> > read/write?
> > 
> > thanks,
> If you unmount it first, you should be able to fsck it fine, /dev/blah
> (ad0/1/2/whatever)

I think that misses the point; what if it's the / filesystem? 

I have personally wanted to do this before myself. I had a situation
where a deleted file was still being written to by a backgrounded
tcpdump, resulting in a full filesystem but no file to rm. It would have
been great to quick remount ro, fsck, then remount rw. Instead, I had to
schedule downtime, reboot into single, and run fsck -- not fun.

-- 
Chris Cowart
Lead Systems Administrator
Network Infrastructure, RSSP-IT
UC Berkeley
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20070705/726f0454/attachment.pgp


More information about the freebsd-questions mailing list