summaryrefslogtreecommitdiffstats
path: root/module/zcommon/zpool_prop.c
diff options
context:
space:
mode:
authorRichard Yao <[email protected]>2014-06-20 19:00:11 -0400
committerBrian Behlendorf <[email protected]>2014-09-30 10:46:59 -0700
commit83e9986f6eefdf0afc387f06407087bba3ead4e9 (patch)
tree4a457cb85a0a59cd219319727893ab9446024ecf /module/zcommon/zpool_prop.c
parent00d2a8c92f614f49d23dea5d73f7ea7eb489ccf1 (diff)
Implement -t option to zpool create for temporary pool names
Creating virtual machines that have their rootfs on ZFS on hosts that have their rootfs on ZFS causes SPA namespace collisions when the standard name rpool is used. The solution is either to give each guest pool a name unique to the host, which is not always desireable, or boot a VM environment containing an ISO image to install it, which is cumbersome. 26b42f3f9d03f85cc7966dc2fe4dfe9216601b0e introduced `zpool import -t ...` to simplify situations where a host must access a guest's pool when there is a SPA namespace conflict. We build upon that to introduce `zpool import -t tname ...`. That allows us to create a pool whose in-core name is tname, but whose on-disk name is the normal name specified. This simplifies the creation of machine images that use a rootfs on ZFS. That benefits not only real world deployments, but also ZFSOnLinux development by decreasing the time needed to perform rootfs on ZFS experiments. Signed-off-by: Richard Yao <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Issue #2417
Diffstat (limited to 'module/zcommon/zpool_prop.c')
-rw-r--r--module/zcommon/zpool_prop.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/module/zcommon/zpool_prop.c b/module/zcommon/zpool_prop.c
index 6bde4f471..e5f69c815 100644
--- a/module/zcommon/zpool_prop.c
+++ b/module/zcommon/zpool_prop.c
@@ -131,6 +131,8 @@ zpool_prop_init(void)
/* hidden properties */
zprop_register_hidden(ZPOOL_PROP_NAME, "name", PROP_TYPE_STRING,
PROP_READONLY, ZFS_TYPE_POOL, "NAME");
+ zprop_register_hidden(ZPOOL_PROP_TNAME, "tname", PROP_TYPE_STRING,
+ PROP_ONETIME, ZFS_TYPE_POOL, "TNAME");
}
/*