Project

General

Profile

Bug #5569

zfs command does not upgrade userspace automatically

Added by Alex Reece almost 5 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
zfs - Zettabyte File System
Start date:
2015-01-29
Due date:
% Done:

0%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage

Description

The c zfs command does not properly handle the <tt>userspace</tt> subcommand on old filesystems that can be upgraded.

delphix@oi-151:~$ sudo zpool create test c3t1d0
delphix@oi-151:~$ sudo zpool destroy test
delphix@oi-151:~$ sudo zpool create -o version=1 test c3t1d0
delphix@oi-151:~$ sudo zfs create test/fs
delphix@oi-151:~$ sudo zfs set mountpoint=none test/fs
delphix@oi-151:~$ sudo zpool upgrade test
This system supports ZFS pool feature flags.

Successfully upgraded 'test' from version 1 to feature flags.
Enabled the following features on 'test':
  async_destroy
  empty_bpobj
  lz4_compress
  multi_vdev_crash_dump
  spacemap_histogram
  enabled_txg
  hole_birth
  extensible_dataset
  embedded_data
  bookmarks
  filesystem_limits
  large_blocks
delphix@oi-151:~$ sudo zfs userspace test/fs
cannot get used/quota for test/fs: unsupported version or feature

The correct behavior, as per pyzfs, is to issue the <tt>ZFS_IOC_USERSPACE_UPGRADE</tt> ioctl if necessary:

        if not ds.getprop("useraccounting"):                                       
                print(_("Initializing accounting information on old filesystem,     please wait..."))
                ds.userspace_upgrade()

Also available in: Atom PDF