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 && [EMAIL PROTECTED] */
/* Tavric National University && [EMAIL PROTECTED] */
/* http://www.ccssu.crimea.ua/~phantom && [EMAIL PROTECTED] */
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message