If you ever wanted to play around with ZFS but don’t want to use cold, hard disks then you can simulate disks and create a test pool. This is really handy if you just want to play around and want to save yourself the trouble.
Step 1 is to make a folder to hold your disks
root@solaris:~# mkdir /disks
Now populate it with a bunch of “disks” using the dd command
root@solaris:~# dd if=/dev/zero of=/disks/disk1 bs=1024 count=100000 100000+0 records in 100000+0 records out root@solaris:~# dd if=/dev/zero of=/disks/disk2 bs=1024 count=100000 100000+0 records in 100000+0 records out root@solaris:~# dd if=/dev/zero of=/disks/disk3 bs=1024 count=100000 100000+0 records in 100000+0 records out root@solaris:~# dd if=/dev/zero of=/disks/disk4 bs=1024 count=100000 100000+0 records in 100000+0 records out root@solaris:~# dd if=/dev/zero of=/disks/disk5 bs=1024 count=100000 100000+0 records in 100000+0 records out
In this case we created five disks because we want to implement raidz2.
root@solaris:~# zpool create testpool raidz2 /disks/disk1 /disks/disk2 /disks/disk3 /disks/disk4 /disks/disk5
Now we can se the pool status and it looks good. Have fun playing around.
root@solaris:~# zpool status testpool pool: testpool state: ONLINE scan: none requested config: NAME STATE READ WRITE CKSUM testpool ONLINE 0 0 0 raidz2-0 ONLINE 0 0 0 /disks/disk1 ONLINE 0 0 0 /disks/disk2 ONLINE 0 0 0 /disks/disk3 ONLINE 0 0 0 /disks/disk4 ONLINE 0 0 0 /disks/disk5 ONLINE 0 0 0 errors: No known data errors