Read Only Single Mode

Polytropon freebsd at edvax.de
Mon Dec 31 07:24:52 UTC 2018


On Mon, 31 Dec 2018 00:00:23 -0700, The Doctor wrote:
> On Mon, Dec 31, 2018 at 04:16:09AM +0100, Polytropon wrote:
> > On Sun, 30 Dec 2018 12:15:13 -0700, The Doctor via freebsd-questions wrote:
> > > How do you correct read only devices in single mode?
> > 
> > What do you mean with "to correct"? If you are refering to
> > disk devices to be checked and repaired by fsck, this only
> > works on unmounted or read-only devices (while unmounted is
> > the preferred state). But if "to correct" means how to mount
> > a read-only device in read/write mode, i. e., re-mount, then
> > the command "mount -uw <device>" (-u = update, -w = write)
> > is to be used.
> > 
> > Did I understand your question correctly? ;-)
> >
> 
> 
> More than likely.
> 
> What is happening is a ufs file system oince in single user mode
> is not wanting to mount when I type in
> mount -a and that is not  usually the case.

There is a reason for this specific behaviour, and the reason
is intended: If the filesystem is in an inconsistent state,
it cannot be mounted. Often you can force a read-only mount,
but you should run fsck first in such a case (usually on the
unmounted device). When you receive the message that the
filesystem has been marked clean, a normal r/w mount should
be possible again. This is what "mount -a" usually does in
SUM, according to the options set in /etc/fstab - as long
as the filesystems in question are clean. That's why a
common procedure is "fsck && mount -u / && mount -a". :-)

See "man 8 mount" for details.




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


More information about the freebsd-questions mailing list