kern/170431: Partition resize and growfs destroys label entry in /dev/ufs

Antti Louko alo at louko.com
Mon Aug 6 22:20:05 UTC 2012


>Number:         170431
>Category:       kern
>Synopsis:       Partition resize and growfs destroys label entry in /dev/ufs
>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:   Mon Aug 06 22:20:04 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     Antti Louko
>Release:        9.0-RELEASE
>Organization:
>Environment:
FreeBSD yyyy.alo.fi 9.0-RELEASE FreeBSD 9.0-RELEASE #0: Fri Feb 24 13:46:39 EET 2012     root at yyyy.alo.fi:/usr/src/sys/amd64/compile/ALOIPF5  amd64
>Description:
When a UFS partiotion has been created with a label (-L option), its partition appears in /dev/ufs. If partition is resized and the file system growfs:d, the entry in /dev/ufs disappears.

>How-To-Repeat:
Run the following shell script as root and observe results:

#! /bin/sh
label="Randomlabel"
partfile="Some-random-file-name"
rm -f "$partfile"
tee "$partfile" < /dev/null
dev=`mdconfig -a -t vnode -f "$partfile" -s 256M`
gpart create -s bsd $dev
gpart add -t freebsd-ufs -i 1 -s 64M "$dev"
newfs -L "$label" /dev/"$dev"a
echo "Label exists in /dev/ufs/"
ls -l /dev/ufs/"$label"
gpart resize -i 1 -s 128M "$dev"
growfs -y /dev/"$dev"a
echo "Label doesn't exists in /dev/ufs/"
ls -l /dev/ufs/"$label"
mdconfig -d -u "$dev"
rm "$partfile"

>Fix:


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


More information about the freebsd-bugs mailing list