by ilovezfs » Wed Feb 03, 2016 1:52 am
You are confusing several things.
pen drive: physical device
pen drive device node: /dev/disk3 (let's say it's disk3)
pen drive bsd name: disk3
pen drive block device: /dev/disk3
pen drive partition table: gpt or mbr. You would have to tell me.
pen drive first partition: /dev/disk3s1
pen drive second partition: /dev/disk3s2
likely location of pen drive FAT32 file system: /dev/disk3s2
pen drive FAT32 file system mount point: /Volumes/FAT
file on pen drive: /Volumes/FAT/test.dsk
ZFS pool backing store: /Volumes/FAT/test.dsk
ZFS pool virtual device, "vdev" : /Volumes/FAT/test.dsk
test.dsk vdev type: file
Number of vdevs in the pool: 1
Number of datasets in the pool: 2
Pool name: TESTT
First dataset name: TESTT
Type of first dataset: file system
Mountpoint of first dataset: none
Second dataset name: TESTT/vol
Type of second dataset: ZFS volume or "zvol"
Mountpoint of TESTT/vol: not applicable (N/A). zvols do not have mountpoints.
Location of second dataset when pool is imported: /dev/disk4 (it will vary each time you import the pool. You must locate up the current name of the disk each time)
TESTT/vol block device: /dev/disk4
Initial partitioning status of TESTT/vol: Not partitioned, also referred to as "Not initialized"
Initial number of partitions on TESTT/vol: zero
Initial number of file systems on TESTT/vol: zero
What is TESTT/vol? zvol
Is TESTT/vol a file system? No.
Does TESTT/vol initially have a FAT32 file system on it? No.
You must partition TEST/vol in order to use it. You can do this with Disk Utility.app or the command line utility /usr/sbin/diskutil
Assuming TESTT/vol is currently assigned to disk4, you may partition it with this command:
diskutil partitionDisk disk4 1 GPTFormat fat32 myfirstzvol 100%
Should I run this command ever again? No.
Following this command,
Is TESTT/vol partitioned? Yes.
Does it have a partition table? Yes.
What type of partition table? GPT.
How many partitions? 1
Location of block device of first partition on TESTT/vol: /dev/disk4s1
Is disk4 a vdev in your pool? No.
Does disk4 have a file system on it now? Yes.
Can you see the file system? If TESTT is imported.
Where is TESTT/vol mounted? It's not.
What is mounted? disk4s1.
What is disk4s1? A partition on disk4.
What is disk4? The block device assigned to the zvol TESTT/vol.
Is the pool on disk4? No.
Is the pool on disk4s1? No.
Is disk4 a vdev of the pool TESTT? No.
Is /Volumes/FAT the mountpoint of the ZVOL? No.
Are /Volumes/FAT and /Volumes/myfirstzvol the same folder? No.
Is /Volumes/FAT the mountpoint of the pool? No.
Does the pool have a mountpoint? No. You set it to none.
Does the ZVOL have a mountpoint? No. ZVOLs are block devices, not file systems.
Where is the file system on the ZVOL? Its first partition.
What is the name of the first partition on the ZVOL? disk4s1.
What is on disk4s1? A fat32 file system.
How do I unmount disk4s1? diskutil unmount disk4s1 OR diskutil unmount /Volumes/myfirstzvol or diskutil unmountDisk disk4
How do I mount disk4s1? diskutil mount disk4s1
How do I eject disk4? diskutil eject disk4
How do I re-insert disk4 after I eject it? You cannot. You must export, and re-import the pool to get it back.
How do I export the pool? zpool export TESTT
How do I import the pool? zpool import -d /Volumes/FAT TESTT
Should I run zpool create again? No.
What happens if I run zpool create again? You destroy the pool.
When I import the pool, do I have to mount the file system on the zvol's first partition manually? No.
Why not? Disk arbitration will mount it automatically.
Where will it mount it? /Volumes/myfirstzvol
Will I see files that are on /Volumes/FAT in /Volumes/myfirstzvol? No.
What will I see in /Volumes/myfirstzvol? Nothing until you put something there.