Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 31 Dec 2018 08:24:16 +0100
From:      Polytropon <freebsd@edvax.de>
To:        The Doctor <doctor@doctor.nl2k.ab.ca>
Cc:        The Doctor via freebsd-questions <freebsd-questions@freebsd.org>
Subject:   Re: Read Only Single Mode
Message-ID:  <20181231082416.6a12e12b.freebsd@edvax.de>
In-Reply-To: <20181231070023.GA80127@doctor.nl2k.ab.ca>
References:  <20181230191513.GB15230@doctor.nl2k.ab.ca> <20181231041609.aa9924c1.freebsd@edvax.de> <20181231070023.GA80127@doctor.nl2k.ab.ca>

next in thread | previous in thread | raw e-mail | index | archive | help
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, ...



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20181231082416.6a12e12b.freebsd>