MFV r342532: 5882 Temporary pool names
Note that this commit brings only formatting changes that were done during the final review of the illumos change, because FreeBSD got the main changes before illumos. illumos/illumos-gate@04e563565204e5635652
https://www.illumos.org/issues/5882 This is an import of the temporary pool names functionality from ZoL:e2282ef57e
26b42f3f9d
2f3ec90061
00d2a8c92f
83e9986f6e
023bbe6f01
It is intended to assist the creation and management of virtual machines that have their rootfs on ZFS on hosts that also have their rootfs on ZFS. These situations cause SPA namespace collisions when the standard name rpool is used in both cases. 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. MFC after: 1 week Sponsored by: Panzura
This commit is contained in:
commit
4c325393f3
@ -276,8 +276,8 @@ spa_write_cachefile(spa_t *target, boolean_t removing, boolean_t postsysevent)
|
|||||||
nvl = fnvlist_alloc();
|
nvl = fnvlist_alloc();
|
||||||
|
|
||||||
if (spa->spa_import_flags & ZFS_IMPORT_TEMP_NAME) {
|
if (spa->spa_import_flags & ZFS_IMPORT_TEMP_NAME) {
|
||||||
pool_name = fnvlist_lookup_string(spa->spa_config,
|
pool_name = fnvlist_lookup_string(
|
||||||
ZPOOL_CONFIG_POOL_NAME);
|
spa->spa_config, ZPOOL_CONFIG_POOL_NAME);
|
||||||
} else {
|
} else {
|
||||||
pool_name = spa_name(spa);
|
pool_name = spa_name(spa);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user