Tuesday, April 03, 2007

ZFS with history

I stumbled upon a blog today and it highlighted that the ZFS file system contains the history of all commands executed with respect to the ZFS pool.

Below is the output of the zpool history for my previous blog

# zpool history zpool
History for 'zpool':
2007-03-27.14:46:10 zpool create zpool raidz2 /zdisk/z01 /zdisk/z02 /zdisk/z03 /zdisk/z04 /zdisk/z05 /zdisk/z06 raidz2 /zdisk/z07 /zdisk/z08 /zdisk/z09 /zdisk/z10 /zdisk/z11 /zdisk/z12 raidz2 /zdisk/z13 /zdisk/z14 /zdisk/z15 /zdisk/z16 /zdisk/z17 /zdisk/z18 spare /zdisk/z19 /zdisk/z20
2007-03-27.14:47:06 zfs create zpool/zfs_iscsi
2007-03-27.14:47:21 zfs create zpool/zone_brandz
2007-03-27.14:48:06 zfs set shareiscsi=on zpool/zfs_iscsi
2007-03-27.14:49:36 zfs set shareiscsi=off zpool/zfs_iscsi
2007-03-27.14:50:07 zfs create -V 20m zpool/zfs_iscsi/v20m
2007-03-27.14:50:31 zfs set shareiscsi=on zpool/zfs_iscsi/v20m
2007-03-27.15:17:20 zfs destroy -f zpool/zfs_iscsi/v20m
2007-03-27.15:18:45 zfs create -V 20m zpool/zfs_iscsi/vol20m
2007-03-27.15:19:03 zfs set shareiscsi=on zpool/zfs_iscsi/vol20m
2007-03-27.16:05:09 zfs set volsize=100m zpool/zfs_iscsi/vol20m
2007-03-27.16:05:23 zfs set reservation=100m zpool/zfs_iscsi/vol20m
2007-03-27.16:25:17 zfs create zpool/zfs_samba
2007-03-27.16:55:31 zfs rename zpool/zfs_iscsi/vol20m zpool/zfs_iscsi/vol100m
2007-03-27.17:51:24 zpool scrub zpool
2007-03-27.17:53:23 zpool replace zpool /zdisk/z18 /zdisk/z18new
2007-03-28.11:31:24 zpool scrub zpool

IMO, it is a very nice feature 'cos it captures the life cycle of the ZFS pool (almost). It would be even better if this information is written to the OS so that it can really cover the whole life cycle, including the 'zpool destroy'.

Labels: ,


Post a Comment

<< Home