NetBSD-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Access FFS partition on GPT on ZVOL
Being a curious person, and because this might let me avoid the zvol
patch (and I now have a spare system to test these things on), I tried
it too:
surtr# uname -a
NetBSD surtr 9.3 NetBSD 9.3 (GENERIC) #0: Thu Aug 4 15:30:37 UTC 2022
mkrepro%mkrepro.NetBSD.org@localhost:/usr/src/sys/arch/amd64/compile/GENERIC amd64
surtr# zfs create -V 1G tank/export
surtr# cat <<EOF>> /etc/iscsi/targets:
extent0 /dev/zvol/rdsk/tank/export 0 1024MB
target0=surtr.export rw extent0 0.0.0.0/0
EOF
surtr# /etc/rc.d/iscsi_target onestart
(initialize and create filesystem on windows client, add a file for good
measure)
surtr# dmsetup create exportdm --table "0 1073741824 linear
/dev/zvol/dsk/tank/export 0"
surtr# gpt -m 1073741824 -s 512 show /dev/mapper/rexportdm
start size index contents
0 1 PMBR
1 1 Pri GPT header
2 32 Pri GPT table
34 32734 1 GPT part - Windows reserved
32768 2060288 2 GPT part - Windows basic data
2093056 4063 Unused
2097119 32 Sec GPT table
2097151 1 Sec GPT header
gpt wouldn't let me show unless I specified -m and -s, perhaps
setgeometry would make that work.
and then... no way of getting at the partitions that I could think of.
surtr# dkctl /dev/mapper/exportdm addwedge xxx 32768 2060288 NTFS
dkctl: /dev/mapper/exportdm: addwedge: Inappropriate ioctl for device
surtr# ccdconfig -c ccd0 0 /dev/mapper/exportdm
ccdconfig: ioctl (CCDIOCSET): /dev/rccd0d: Invalid argument
Staffan
Home |
Main Index |
Thread Index |
Old Index