Project

General

Profile

Feature #3400

ZFS: recursive mounts (via "zfs mount")

Added by Jim Klimov almost 7 years ago. Updated almost 7 years ago.

Status:
New
Priority:
Normal
Category:
zfs - Zettabyte File System
Start date:
2012-12-05
Due date:
% Done:

0%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage

Description

It is sometimes beneficial, i.e. during systems recovery, to not mount the whole pool upon import. We can use "zpool import -N" to achieve that, and later use "zfs mount -a" to mount all datasets (with canmount=on).

However, let's say there is a branch of datasets, like a particular rootfs or a user's homedir split into sub-datasets, which we do want to mount.

Currently the needed datasets have to be found with "zfs list -H -o name -r pool/data/set/MYDS" and mounted in succession with a while loop. This is kind of clumsy.

I propose adding a "zfs mount -r pool/data/set/MYDS" which would mount the specified dataset and its children (FS datasets with canmount=on), possibly as a tree rooted under the mountpoint specified with "-o mountpoint=/mnt/a" - or under the default mountpoints, like "zfs mount -a" would do.

Things to think about: what to do with lower-level child datasets which change their mountpoint to be outside this tree - report and ignore them?

History

#1

Updated by Christopher Siden almost 7 years ago

  • Assignee set to Christopher Siden

I think Delphix has this already, I'll look in to it.

Also available in: Atom PDF