How to use a file as a zpool

filesystemssolariszfs

If I do

dd if=/dev/zero of=/tank/test/zpool bs=1M count=100

how can I treat the file /tank/test/zpool as a vdev, so I can use it as a zpool?

It is for zfs testing purposes only.

Best Answer

There is no need to create a loop device, you can simply use the file itself as a vdev:

zpool create test /tank/test/zpool