[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: vnd(4) issues



Hi all,

A while back I had some issues with vnd(4) :

http://marc.theaimsgroup.com/?l=openbsd-misc&m=107365984521302&w=2

<SNIP>
| I'm having some strange issues with vnd(4). After creating a virtual
| disk in a file and formatting it I can properly mount and umount the
| filesystem. Unfortunately, after I unconfigure the vnd and then
| reconfigure it again, my disklabel is reset to it's initial values.
<SNIP>

After I got no replies, I dug around a bit deeper.

I installed the latest snapshot, upgraded it to the latest current and
had the same issues. I duplicated this on two other i386 boxen and
also on my alpha (all running various versions of post-3.4 -current).

What I found interesting was that if I recreate the disklabel as it
was, I can mount the partition and find my data still intact.

Also, I only have this issue when I use a crypted image.

It must be something I'm doing wrong, but I can't find the problem.
Can somebody tell me what's wrong with the following :

dd if=/dev/arandom of=disk.img bs=65536 count=1024
vnconfig -c -k -v svnd0 disk.img
fdisk -i svnd0
disklabel -E svnd0
	(on i386 accept all defaults when adding a partition)
mkdir test
mount /dev/svnd0a test/
echo "this is a test" > test/check
umount test/
vnconfig -u -v svnd0


vnconfig -c -k -v svnd0 disk.img
disklabel svnd0
	(no a partition)
disklabel -E svnd0
	(create the same partition)
mount /dev/svnd0a test/
cat test/check

Trying the above without the key for vnconfig works as (I) expected.

Anyone care to smack me over the head with a cluestick ? Please ?

Thanks,

Paul 'WEiRD' de Weerd

-- 
>++++++++[<++++++++++>-]<+++++++.>+++[<------>-]<.>+++[<+
+++++++++++>-]<.>++[<------------>-]<+.--------------.[-]
                 http://www.weirdnet.nl/