From owner-freebsd-bugs@FreeBSD.ORG Sat Apr 3 01:30:06 2010 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EED5A106566B for ; Sat, 3 Apr 2010 01:30:06 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id AA2388FC19 for ; Sat, 3 Apr 2010 01:30:06 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id o331U6qV037746 for ; Sat, 3 Apr 2010 01:30:06 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id o331U6Xp037744; Sat, 3 Apr 2010 01:30:06 GMT (envelope-from gnats) Resent-Date: Sat, 3 Apr 2010 01:30:06 GMT Resent-Message-Id: <201004030130.o331U6Xp037744@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Yar Tikhiy Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6C7AD106564A for ; Sat, 3 Apr 2010 01:22:47 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21]) by mx1.freebsd.org (Postfix) with ESMTP id 5BC908FC08 for ; Sat, 3 Apr 2010 01:22:47 +0000 (UTC) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.3/8.14.3) with ESMTP id o331MldI059549 for ; Sat, 3 Apr 2010 01:22:47 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.3/8.14.3/Submit) id o331Mkcf059536; Sat, 3 Apr 2010 01:22:46 GMT (envelope-from nobody) Message-Id: <201004030122.o331Mkcf059536@www.freebsd.org> Date: Sat, 3 Apr 2010 01:22:46 GMT From: Yar Tikhiy To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: kern/145309: Editing disk label invalidates the whole device X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Apr 2010 01:30:07 -0000 >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: