ZFS: commands emulation

I’m considering getting myself an x86 server with Solaris for home use, and today I’ve decided to play around with ZFS on my old Sparc-box.

I believe those of you who are just getting started with ZFS will really like the -n command line option for zfs and zpool, which allows you to see what result would a certain command yield, while there is nothing actually done to your disks.

So, if you’re thinking of creating a new storage pool, you don’t have to actually create it just to see how it will look – you can use -n option instead:

solaris# zpool create -n mypool raidz /export/vdev/d1 /export/vdev/d2 /export/vdev/d3 /export/vdev/d4
it will create a ‘storage’ with the following layout:


The command will still be validated – its syntax will be checked, plus you’ll have the existance of the disks verified as well. So, if you don’t have one of the devices in your system, you might see something like this:

solaris# zpool create -n mypool raidz /export/vdev/d1 /export/vdev/d2 /export/vdev/d3 /export/vdev/d4
cannot open '/export/vdev/d1': No such file or directory

Speak Your Mind