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

Antti Louko alo at
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
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Aug 06 22:20:04 UTC 2012
>Originator:     Antti Louko
>Release:        9.0-RELEASE
FreeBSD 9.0-RELEASE FreeBSD 9.0-RELEASE #0: Fri Feb 24 13:46:39 EET 2012     root at  amd64
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.

Run the following shell script as root and observe results:

#! /bin/sh
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"



More information about the freebsd-bugs mailing list