Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 02 Feb 2003 13:09:23 -0800
From:      Darryl Okahata <darrylo@soco.agilent.com>
To:        freebsd-current@freebsd.org
Subject:   gbde & vnode md devices?
Message-ID:  <200302022109.NAA05075@mina.soco.agilent.com>

next in thread | raw e-mail | index | archive | help
--Multipart_Sun_Feb__2_13:09:23_2003-1
Content-Type: text/plain; charset=US-ASCII

     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
	darrylo@soco.agilent.com

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.


--Multipart_Sun_Feb__2_13:09:23_2003-1
Content-Type: text/plain; charset=US-ASCII
Content-Disposition: attachment; filename="gbde.log"
Content-Transfer-Encoding: quoted-printable

#
# First attempt: use entire md device for gbde
#
su-2.05b# cd /tmp
su-2.05b# dd if=3D/dev/zero bs=3D1k count=3D16k of=3Dfoo
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=3D/dev/zero bs=3D1k count=3D16k of=3Dfoo
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=3D520 heads=3D1 sectors/track=3D63 (63 blks/cyl)

parameters to be used for BIOS calculations are:
cylinders=3D520 heads=3D1 sectors/track=3D63 (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=3D/dev/zero bs=3D1k count=3D16k of=3Dfoo
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

--Multipart_Sun_Feb__2_13:09:23_2003-1--

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200302022109.NAA05075>