fsck on a mounted fs as read-only

Polytropon freebsd at edvax.de
Thu May 31 11:53:11 UTC 2012


On Thu, 31 May 2012 14:19:33 +0400, dmitry at zhigulinet.ru wrote:
> Good afternoon.
> Could not tell whether you can run fsck on checking mounted
> file system as read-only, if prior to that with which the parameters
> 
> 
> ftp # mount
> ...
> / dev/aacd0 on / var / ftp (ufs, NFS exported, local, read-only)
> 
> Launched with these parameters and this is what gives
> 
> ftp # fsck -yf / dev/aacd0
> ** / Dev/aacd0 (NO WRITE)
> ** Last Mounted on / var / ftp
> ** Phase 1 - Check Blocks and Sizes
> 
> As I understand it does not fix the fsck filesystem.

Correct. For file system modifications the file system may not
be mounted because "lower level operations" maybe will take
place. In your current setting, only checks will be performed,
but _if_ something needs to be modified, it will not happen.
The reason: It _might_ affect the file system to change, even
if it's "just" in read-only state.

Solution: Unmount the file system and re-run fsck.



-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...


More information about the freebsd-questions mailing list