Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 21 Nov 2017 17:08:16 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-bugs@FreeBSD.org
Subject:   [Bug 223786] Remounting a UFS filesystem read-only takes very long time
Message-ID:  <bug-223786-8@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D223786

            Bug ID: 223786
           Summary: Remounting a UFS filesystem read-only takes very long
                    time
           Product: Base System
           Version: 10.4-STABLE
          Hardware: Any
                OS: Any
            Status: New
          Keywords: regression
          Severity: Affects Only Me
          Priority: ---
         Component: kern
          Assignee: freebsd-bugs@FreeBSD.org
          Reporter: mi@ALDAN.algebra.com

I usually keep my / mounted read-only -- mostly for safety. When I need to
change some aspect of configuration or add a port, I remount rw, do what ne=
eds
doing, and then remount back to read-only mode.

This worked for me for many years, but lately I noticed, the remounting bac=
k to
the ro-mode is taking longer than it used to. Many seconds, especially, whe=
n it
was active shortly before the remount command.

Today, however, with the freshly rebuilt kernel (FreeBSD 10.4-STABLE #15
r325999M), it takes well over a minute! A minute, during which the machine
largely freezes -- for example, making new logins impossible.

I understand the need to flush the unwritten to disk, when switching to ro,=
 but
just how much should that take in the scenario I just had:

  1048  11:56   mount -orw -u /
  1049  11:56   chmod u+s /opt/cyrus/bin/deliver
  1050  11:56   mount -oro -u /

? The second remount took well over minute and it seems wrong.

The filesystem is based on SSD and looks like:

  /dev/ada0s1a on / (ufs, NFS exported, local, read-only)

`tunefs -p /` reports:

tunefs: POSIX.1e ACLs: (-a)                                disabled
tunefs: NFSv4 ACLs: (-N)                                   disabled
tunefs: MAC multilabel: (-l)                               disabled
tunefs: soft updates: (-n)                                 enabled
tunefs: soft update journaling: (-j)                       disabled
tunefs: gjournal: (-J)                                     disabled
tunefs: trim: (-t)                                         enabled
tunefs: maximum blocks per file in a cylinder group: (-e)  1048576
tunefs: average file size: (-f)                            16384
tunefs: average number of files in a directory: (-s)       64
tunefs: minimum percentage of free space: (-m)             8%
tunefs: space to hold for metadata blocks: (-k)            0
tunefs: optimization preference: (-o)                      time
tunefs: volume label: (-L)

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-223786-8>