Skip to content

Commit

Permalink
Allow GPT+EFI vdev replacement in boot pools.
Browse files Browse the repository at this point in the history
Commit 57a4edd
allows the bootfs property to be set on any pool, but does not
accommodate subsequent vdev changes. For example:

	# zpool replace rpool /dev/sda /dev/sdb
	operation not supported on this type of pool
	property 'bootfs' is not supported on EFI labeled devices

For non-Solaris builds, disable the check that emits this error.

Signed-off-by: Brian Behlendorf <[email protected]>
  • Loading branch information
dajhorn authored and behlendorf committed Jan 18, 2012
1 parent 7505628 commit f783130
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/libzfs/libzfs_pool.c
Original file line number Diff line number Diff line change
Expand Up @@ -490,6 +490,7 @@ zpool_valid_proplist(libzfs_handle_t *hdl, const char *poolname,
verify(nvlist_lookup_nvlist(zpool_get_config(zhp, NULL),
ZPOOL_CONFIG_VDEV_TREE, &nvroot) == 0);

#if defined(__sun__) || defined(__sun)
/*
* bootfs property cannot be set on a disk which has
* been EFI labeled.
Expand All @@ -502,6 +503,7 @@ zpool_valid_proplist(libzfs_handle_t *hdl, const char *poolname,
zpool_close(zhp);
goto error;
}
#endif
zpool_close(zhp);
break;

Expand Down

0 comments on commit f783130

Please sign in to comment.