Date: Thu, 11 Jun 1998 21:05:52 +0200 From: Stefan Eggers <seggers@semyam.dinoco.de> To: freebsd-bugs@FreeBSD.ORG, jkh@mimsy.cdrom.com Cc: seggers@semyam.dinoco.de Subject: Re: bin/854: swapinfo shows incorrect information for vnconfig'd swap. Message-ID: <199806111905.VAA02085@semyam.dinoco.de>
next in thread | raw e-mail | index | archive | help
[Quoting the GNATS search on the WWW page at www.freebsd.org:] > On a system with swap space added via vnconfig, swapinfo prints an > entry like this for the vn0 device: > > /dev/?? 65536 0 65472 0% Interleaved > Audit-Trail > From: Bruce Evans <bde@zeta.org.au> > To: FreeBSD-gnats-submit@freebsd.org, jkh@mimsy.cdrom.com > Cc: Subject: Re: bin/854: swapinfo shows incorrect information for vnconfig'd swap. > Date: Fri, 1 Dec 1995 23:06:21 +1100 > This is probably because you don't have /dev/vn0b and/or because you > didn't specify swapping on the `b' partition. Unless slicing is enabled, > the slice _and_ partition bits in the minor number are ignored, so > /dev/vn0 is a bogus alias for /dev/vn0b and swapping on /dev/vn0 may > work for bogus reasons. Having four vn devices configured into the system I wanted to track down today why I once had a similar symptom when using two of them for adding swap space. So I added the missing device entries (I just had vn0, its partitions and its slices in /dev) for vn1 (and partitions and slices) with MAKEDEV(8). The system uses a swap file already with an entry in /etc/rc.conf. If you don't have this attach a file to /dev/vn0b and do a swapon on it. Then do the same for /dev/vn1b. When I was at this point I had a swap partition and two swap files. /dev/vn0b was known at boot time, /dev/vn1b was not. swapinfo(8) was able to give the name /dev/vn0b but didn't come up with /dev/vn1b. Now I did some research and found out that swapinfo(8) does its device name resolution with the library function devname(3). This devname(3) uses a databases which resides in /var/run and which gets created on startup. As I didn't have /dev/vn1b when I booted the machine it wasn't in there and in such a case devname(3) returns "??". After a reboot with a new /var/run/dev.db I tried it again. Now /dev/vn1b was known and swapinfo(8) was able to give it a name in the listing. What I didn't find out, yet is who creates /var/run/dev.db. I did no extensive research, though. Just a few man's and grep's in places I thought to be promising. Maybe someone else knows. Stefan. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199806111905.VAA02085>