fsck on a mounted fs as read-only
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. -- С уважением, Dmitry mailto:dmi...@zhigulinet.ru ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: fsck on a mounted fs as read-only
On Thu, 31 May 2012 14:19:33 +0400, dmi...@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, ... ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: fsck on a mounted fs as read-only
On 5/31/2012 12:19 PM, dmi...@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) Could you copy paste the exact lines? The / dev/aacd0 on on / var / ftp parts make no sense to me. It should be: some_dev on some_dir (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. fsck filesystem_goes_here for example fsck /dev/ada0s1a or fsck mount_point_goes_here for example fsck / You are probably trying to fsck the wrong device... Rebooting to single user and fscking the RO mounted / fs works as usual. Please provide more info. HTH, Nikos ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: fsck on a mounted fs as read-only
On Thu, 31 May 2012, Polytropon wrote: On Thu, 31 May 2012 14:19:33 +0400, dmi...@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. fsck(8) can work on filesystems mounted read only. If, say, graphics/cairo causes X to crash the machine, rebooting into single-user mode and running # fsck -y -t ufs will clean up the read-only mounted / also. Agreed that this should be avoided if possible, but sometimes it is necessary. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org