NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

kern/49135: wedge support thwarts read/write update of root filesystem with traditional device path in fstab



>Number:         49135
>Category:       kern
>Synopsis:       wedge support thwarts read/write update of root filesystem 
>with traditional device path in fstab
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Aug 21 13:55:00 +0000 2014
>Originator:     John D. Baker
>Release:        NetBSD/i386-7.99.1 after 18-Aug-2014 06:32 UTC
>Organization:
>Environment:
NetBSD brenowin.reltuk.net 7.99.1 NetBSD 7.99.1 (RELTUK) #4: Thu Aug 21 
07:31:45 CDT 2014  
sysop%kepler.clamp.net@localhost:/d0/nbsd/current/obj/i386/sys/arch/i386/compile/RELTUK
 i386

>Description:
On a system with traditional device paths in "/etc/fstab":

/dev/ld0a      /       ffs     rw,log   1 1
/dev/ld0b      none    swap    sw,dp    0 0
/dev/ld0e      /tmp    ffs     rw,log,nosuid,nodev      1 2
/dev/ld0f      /var    ffs     rw,log,nosuid    1 2
/dev/ld0g      /usr    ffs     rw,log,nodev     1 2
#/dev/ld0h      /home   ffs     rw,log,nosuid,nodev      1 2

the enabling of MBR/disklabel wedge support caused "/etc/rc.d/root" to
fail updating the "root_device" to read/write with the error:

  specified device does not match mounted device

although "swap[12]" and "mountall" proceed to mount the devices as
before.  The output of 'mount' shows "root_device" for "/" and the
traditional device paths for the rest.

Looking back through 'dmesg' showed various "dkN" devices being
assigned, so that was a clue.
>How-To-Repeat:
On a system with tradtional "/dev/xxNp" device paths in "/etc/fstab"
boot a kernel built with MBR/DISKLABEL wedge support enabled.

(Perhaps this only happens on systems with hardware RAID or other
"ld" disk devices?)
>Fix:
For the immediate case of updating "/" to read/write, find the "dkN"
device associated with the traditional device, or use "NAME=...":

  mount -t ffs -u /dev/dk0

or (in the case of un-named/fictitious label)

  mount -t ffs -u NAME=ld0a

after which one may edit "/etc/fstab" accordingly.  For the no-name
fictitious label case:

# wedge support is now mandatory, use NAME=<device> for no-name disklabel
NAME=ld0a       /       ffs     rw,log   1 1
NAME=ld0b       none    swap    sw,dp    0 0
NAME=ld0e       /tmp    ffs     rw,log,nosuid,nodev      1 2
NAME=ld0f       /var    ffs     rw,log,nosuid    1 2
NAME=ld0g       /usr    ffs     rw,log,nodev     1 2
#NAME=ld0h      /home   ffs     rw,log,nosuid,nodev      1 2



Home | Main Index | Thread Index | Old Index