NetBSD Problem Report #13574

Received: (qmail 17128 invoked from network); 28 Jul 2001 08:57:52 -0000
Message-Id: <20010728090131.D58B71110F@www.netbsd.org>
Date: Sat, 28 Jul 2001 02:01:31 -0700 (PDT)
From: manu@netbsd.org
Sender: nobody@netbsd.org
Reply-To: manu@netbsd.org
To: gnats-bugs@gnats.netbsd.org
Subject: can't remount root if the root device file inode has been changed
X-Send-Pr-Version: www-1.0

>Number:         13574
>Category:       kern
>Synopsis:       can't remount root if the root device file inode has been changed
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Jul 28 08:58:00 +0000 2001
>Closed-Date:    
>Last-Modified:  
>Originator:     Emmanuel Dreyfus
>Release:        NetBSD-current/macppc
>Organization:
The NetBSD Project
>Environment:
NetBSD violette 1.5X NetBSD 1.5X (LCOMP5) #0: Sat Jul 28 02:14:30 CEST 2001     root@violette:/usr/src/sys/arch/macppc/compile/LCOMP5 macppc
>Description:
Sometimes, we need to remount the root partition to change some attributes. Most common use it changing read/write status, by doing "mount -o ro /dev/sd0a /" or "mount -o rw /dev/sd0a".

mount(9) allow mounting an already-mounted partition because the new device file has the same inode as the already mounted device file.

If the device file inode changes, for instance because it has been deleted and re-installed, the kernel will not allow remounting any more.
>How-To-Repeat:
kill enough processes to be able to mount / as read-only (inlcudes syslogd, cron, xdm, sendmail... going to single user is the easiest way if you have many processes)

Assuming you booted off /dev/sd0a:
cd /dev
rm sd0a
./MAKEDEV sd0
mount -o ro /dev/sd0a /
mount_ffs: /dev/sd0a on /: specified device does not match mounted device
>Fix:
The current root device recognition, based on the inode might be too weak. Maybe this check could rely on the major/minor numbers instead of the inode?
>Release-Note:
>Audit-Trail:
>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.