Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 3 Apr 2010 01:22:46 GMT
From:      Yar Tikhiy <yar@FreeBSD.org>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   kern/145309: Editing disk label invalidates the whole device
Message-ID:  <201004030122.o331Mkcf059536@www.freebsd.org>
Resent-Message-ID: <201004030130.o331U6Xp037744@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         145309
>Category:       kern
>Synopsis:       Editing disk label invalidates the whole device
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Apr 03 01:30:06 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator:     Yar Tikhiy
>Release:        8.0-RELEASE
>Organization:
NA
>Environment:
8.0-RELEASE GENERIC
>Description:
In single-user mode (with just / mounted r/o), any change to the label of the disk the root partition is residing on seems to immediately invalidate the device for the kernel.  E.g., after the partition was written out by bsdlabel(8), any access to the disk with fail with EIO or EXIO.

OTOH, in multi-user mode (i.e., with everything mounted r/w) editing the label is just impossible: bsdlabel will complain:
bsdlabel: Class not found
>How-To-Repeat:
Boot in single-user mode.
Create MFS /tmp so that the editor is happy: mdmfs -s10m md /tmp
Change the default editor: export EDITOR=ed
Start bsdlabel: bsdlabel -e ad0s1
Make a harmless change, e.g., create a new partition in the unused space at the end of the disk -- make sure there is some!
Save.
Run any command from / as nothing else is mounted, e.g., "ls /boot" or "reboot"
See the kernel croak:

vnode_pager_getpages: I/O read error
ls: Input/output error

or

reboot: Device not configured
>Fix:


>Release-Note:
>Audit-Trail:
>Unformatted:



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