Project

General

Profile

Bug #3745

zpool create should treat -O mountpoint and -m the same

Added by Will Andrews about 6 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Normal
Category:
zfs - Zettabyte File System
Start date:
2013-04-23
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage

Description

From the original change log:

Make zpool create -m <mountpoint> and -O mountpoint=<mountpoint> equivalent.
This allows specifying a mountpoint using the latter form and having
its value checked and used as it would be using the former form.
Practically speaking, this means that any pool name can now be used,
even if its name would conflict with an existing top-level system
directory name, since the root dataset's mountpoint can be explicitly
specified to something other than the default.
As a consequence of this change:
1. The mountpoint property is set in the fsprops nvlist prior to
creating the pool, rather than being set after creating the pool.
This seems to be the proper approach, since it avoids creating the
pool if the mountpoint setting would cause the command to fail.
2. The mountpoint property, unlike all others, can be specified more
than once. Only the last setting takes effect. This is to avoid
breaking potential existing users that specify -m more than once.
3. The old code in zpool_create() for the "altroot" property never
did anything, since zpool_do_create() mounted the root filesystem
before zpool_create() changed its mountpoint. So remove it.

History

#1

Updated by Christopher Siden about 6 years ago

  • % Done changed from 0 to 100
  • Assignee set to Christopher Siden
  • Status changed from New to Closed
  • Category set to zfs - Zettabyte File System
commit 8b71377
Author: Will Andrews <will@firepipe.net>
Date:   Tue Jun 11 10:13:47 2013

    3745 zpool create should treat -O mountpoint and -m the same
    3811 zpool create -o altroot=/xyz -O mountpoint=/mnt ignores the mountpoint option
    Reviewed by: Matthew Ahrens <mahrens@delphix.com>
    Approved by: Christopher Siden <christopher.siden@delphix.com>

Also available in: Atom PDF