From owner-freebsd-current Tue Jan 11 16: 7:43 2000 Delivered-To: freebsd-current@freebsd.org Received: from sonet.crimea.ua (OTC-sl3-FLY.CRIS.NET [212.110.136.71]) by hub.freebsd.org (Postfix) with ESMTP id 8096D153B2; Tue, 11 Jan 2000 16:07:24 -0800 (PST) (envelope-from phantom@scorpion.crimea.ua) Received: (from uucp@localhost) by sonet.crimea.ua (8.9.3/8.9.3) with UUCP id CAA05964; Wed, 12 Jan 2000 02:15:16 +0300 (MSK) Received: (from phantom@localhost) by scorpion.crimea.ua (8.8.8/8.8.5+ssl+keepalive) id BAA28576; Wed, 12 Jan 2000 01:32:34 +0300 (MSK) Date: Wed, 12 Jan 2000 01:32:34 +0300 From: Alexey Zelkin To: current@FreeBSD.org, dillon@FreeBSD.org Subject: vn device strange behaviour Message-ID: <20000112013234.A28567@scorpion.crimea.ua> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.95.7i X-Operating-System: FreeBSD 2.2.7-RELEASE i386 Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG hi, I just discovered some strange points about using vn devices (files) as swap devices. I have placed below some output gathered with script(1) and now some comments. 1) I can easy unconfigure vn device which already mounted as swap device and then remove swapfile without any problems. I not sure about behaviour of the swapper when it will try to allocate swap from /dev/vn0c. 2) When I am creating small file (about 100k) and try to mount it as swap device swapinfo(8) output looks broken. 3) I could not mount three and more vn devices as swap devices. BTW, I also got strange results once (but I could not reporoduce it later): swapinfo(8) shown that I have three swap devices mounted: /dev/wd0s1b, /dev/rvn0c and /dev/#46:10. What's that ? I'll try to reproduce it again, but ... Comments ? ------------------------------------------------- 1) # dd if=/dev/zero of=swapfile count=1 bs=50m 1+0 records in 1+0 records out 52428800 bytes transferred in 8.401941 secs (6240082 bytes/sec) # vnconfig -e /dev/vn0c swapfile swap # swapon /dev/vn0c # swapinfo Device 1K-blocks Used Avail Capacity Type /dev/wd0s1b 32640 2640 30000 8% Interleaved /dev/rvn0c 51072 0 51072 0% Interleaved Total 83712 2640 81072 3% # vnconfig -u /dev/vn0c # swapinfo Device 1K-blocks Used Avail Capacity Type /dev/wd0s1b 32640 2640 30000 8% Interleaved /dev/rvn0c 51072 0 51072 0% Interleaved Total 83712 2640 81072 3% # vnconfig -e /dev/vn0c swapfile swap # swapon /dev/vn0c swapon: /dev/vn0c: device already in use # vnconfig -u /dev/vn0c # rm swapfile # swapinfo Device 1K-blocks Used Avail Capacity Type /dev/wd0s1b 32640 2640 30000 8% Interleaved /dev/rvn0c 51072 0 51072 0% Interleaved Total 83712 2640 81072 3% # 2) # dd if=/dev/zero of=smallswap count=1 bs=100k 1+0 records in 1+0 records out 102400 bytes transferred in 0.003174 secs (32261453 bytes/sec) # vnconfig -c /dev/vn1c smallswap swap # swapon /dev/vn1c # swapinfo Device 1K-blocks Used Avail Capacity Type /dev/wd0s1b 32640 2212 30428 7% Interleaved /dev/rvn1c -28 -28 0 100% Interleaved Total 83684 2184 81500 3% # 3) # swapinfo Device 1K-blocks Used Avail Capacity Type /dev/wd0s1b 32640 0 32640 0% Interleaved /dev/rvn0c 51072 0 51072 0% Interleaved /dev/rvn1c 51072 0 51072 0% Interleaved Total 134784 0 134784 0% # vnconfig -c /dev/vn2c smallswap # swapon /dev/vn2c swapon: /dev/vn2c: Invalid argument # -- /* Alexey Zelkin && phantom@cris.net */ /* Tavric National University && phantom@crimea.edu */ /* http://www.ccssu.crimea.ua/~phantom && phantom@FreeBSD.org */ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message