Has anyone gotten gbde working with vnode md devices (file-based)?
I'm trying to create a gbde-managed device from a file, and I keep on
getting various ioctl() failures.  See attached log file.

     Thanks,

-- 
        Darryl Okahata
        [EMAIL PROTECTED]

DISCLAIMER: this message is the author's personal opinion and does not
constitute the support, opinion, or policy of Agilent Technologies, or
of the little green men that have been following him all day.

#
# First attempt: use entire md device for gbde
#
su-2.05b# cd /tmp
su-2.05b# dd if=/dev/zero bs=1k count=16k of=foo
16384+0 records in
16384+0 records out
16777216 bytes transferred in 2.256249 secs (7435888 bytes/sec)
su-2.05b# ll foo*
-rw-r--r--  1 root  wheel  16777216 Feb  2 12:06 foo
su-2.05b# mdconfig -a -t vnode -f /tmp/foo
md0
su-2.05b# ll /dev/md*
crw-r-----  1 root  operator    4,  17 Jan 27 22:50 /dev/md0
crw-------  1 root  wheel      95, 0xffff00ff Jan 27 22:50 /dev/mdctl
su-2.05b# gbde init /dev/md0 -L /tmp/foo.lock
Enter new passphrase:
Reenter new passphrase:
Wrote key 0 at 1400320
su-2.05b# gbde attach md0 -l /tmp/foo.lock
Enter passphrase:
gbde: ioctl(GEOMCONFIGGEOM): Invalid argument


#
# Second attempt: use first slice for gbde
#
su-2.05b# mdconfig -d -u md0
su-2.05b# rm foo*
su-2.05b# dd if=/dev/zero bs=1k count=16k of=foo
16384+0 records in
16384+0 records out
16777216 bytes transferred in 2.365870 secs (7091352 bytes/sec)
su-2.05b# ll foo
-rw-r--r--  1 root  wheel  16777216 Feb  2 12:10 foo
su-2.05b# mdconfig -a -t vnode -f /tmp/foo
md0
su-2.05b# fdisk -I md0
******* Working on device /dev/md0 *******
fdisk: invalid fdisk partition table found
su-2.05b# fdisk md0
******* Working on device /dev/md0 *******
parameters extracted from in-core disklabel are:
cylinders=520 heads=1 sectors/track=63 (63 blks/cyl)

parameters to be used for BIOS calculations are:
cylinders=520 heads=1 sectors/track=63 (63 blks/cyl)

Media sector size is 512
Warning: BIOS sector numbering starts with sector 1
Information from DOS bootblock is:
The data for partition 1 is:
sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD)
    start 63, size 32697 (15 Meg), flag 80 (active)
        beg: cyl 1/ head 0/ sector 1;
        end: cyl 519/ head 0/ sector 63
The data for partition 2 is:
<UNUSED>
The data for partition 3 is:
<UNUSED>
The data for partition 4 is:
<UNUSED>
su-2.05b# gbde init /dev/md0s1 -L /tmp/foo.lock
Enter new passphrase:
Reenter new passphrase:
Wrote key 0 at 312320
su-2.05b# gbde attach md0s1 -l /tmp/foo.lock
Enter passphrase:
gbde: ioctl(GEOMCONFIGGEOM): Invalid argument


#
# Third attempt: use a partition for gbde
#
su-2.05b# mdconfig -d -u md0
su-2.05b# rm foo*
su-2.05b# dd if=/dev/zero bs=1k count=16k of=foo
16384+0 records in
16384+0 records out
16777216 bytes transferred in 2.267865 secs (7397802 bytes/sec)
su-2.05b# mdconfig -a -t vnode -f /tmp/foo
md0
su-2.05b# fdisk -I md0
******* Working on device /dev/md0 *******
fdisk: invalid fdisk partition table found
su-2.05b# disklabel md0s1
disklabel: ioctl DIOCGDINFO: Inappropriate ioctl for device

Reply via email to