Project

General

Profile

Actions

Bug #13388

closed

ZFS list bookmark not working on zvols

Added by Anil Jangity 12 months ago. Updated 11 months ago.

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

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:

Description

This is the error I get:

[root@fmt1-sr5 ~]# zfs list -t bookmark -r zones/cb75aba3-c6c1-e061-8da8-aec34fd1940d-disk1
cannot open 'zones/cb75aba3-c6c1-e061-8da8-aec34fd1940d-disk1': operation not applicable to datasets of this type
[root@fmt1-sr5 ~]#

But I do have some bookmarks, when I explicitly list it:

[root@fmt1-sr5 ~]# zfs list -t bookmark -r zones/cb75aba3-c6c1-e061-8da8-aec34fd1940d-disk1#zrepl_CURSOR_G_4480531bc5edf443_J_push-zones-backup
NAME                                                                                                   USED  AVAIL  REFER  MOUNTPOINT
zones/cb75aba3-c6c1-e061-8da8-aec34fd1940d-disk1#zrepl_CURSOR_G_4480531bc5edf443_J_push-zones-backup      -      -      -  -
[root@fmt1-sr5 ~]#
[root@fmt1-sr5 ~]#
[root@fmt1-sr5 ~]# zfs list -t bookmark,snapshot -r zones/cb75aba3-c6c1-e061-8da8-aec34fd1940d-disk1
NAME                                                                                                   USED  AVAIL  REFER  MOUNTPOINT
zones/cb75aba3-c6c1-e061-8da8-aec34fd1940d-disk1@np_zrepl_20201220_021049_000                          280M      -  32.8G  -
zones/cb75aba3-c6c1-e061-8da8-aec34fd1940d-disk1@np_zrepl_20201223_152412_000                         12.0M      -  32.8G  -
zones/cb75aba3-c6c1-e061-8da8-aec34fd1940d-disk1#zrepl_CURSOR_G_4480531bc5edf443_J_push-zones-backup      -      -      -  -
[root@fmt1-sr5 ~]#

This is on:

[root@fmt1-sr5 ~]# uname -a
SunOS fmt1-sr5 5.11 joyent_20201203T165910Z i86pc i386 i86pc
[root@fmt1-sr5 ~]#

https://illumos.topicbox.com/groups/discuss/T42fb054166303b58

Actions #1

Updated by Andy Fiddaman 12 months ago

It looks like illumos is missing https://github.com/openzfs/zfs/commit/e33da554c5daf0103b093f44ab5b90ad6c064c3f

commit e33da554c5daf0103b093f44ab5b90ad6c064c3f
Author: loli10K <ezomori.nozomu@gmail.com>
Date:   Wed Sep 7 19:34:20 2016 +0200

    Allow ZVOL bookmarks to be listed recursively
Actions #2

Updated by Andy Fiddaman 12 months ago

  • Status changed from New to In Progress
  • Assignee set to Andy Fiddaman
Actions #3

Updated by Electric Monk 12 months ago

  • Gerrit CR set to 1113
Actions #4

Updated by Andy Fiddaman 12 months ago

Testing the attached patch.

Before as per the bug reporter:

build:openzfs:objsetref% zfs list -t bookmark -r data/zone/build
NAME                                                   USED  AVAIL  REFER  MOUNTPOINT
data/zone/build/export/test#zrepl_replication_cursor      -      -      -  -

build:openzfs:objsetref% zfs list -t bookmark -r data/zone/build/export/omnios-build
no datasets available

After:

bloody# zfs create -v 2G rpool/testvol

bloody# zfs list -t bookmark -r rpool/testvol
cannot open 'rpool/testvol': operation not applicable to datasets of this type

bloody# ~/zfs list -t bookmark -r rpool/testvol
no datasets available

bloody# zfs snapshot rpool/testvol@luci
bloody# zfs bookmark rpool/testvol@luci rpool/testvol#bob

bloody# zfs list -t bookmark -r rpool/testvol
cannot open 'rpool/testvol': operation not applicable to datasets of this type

bloody# ~/zfs list -t bookmark -r rpool/testvol
NAME                USED  AVAIL  REFER  MOUNTPOINT
rpool/testvol#bob      -      -      -  -

bloody# ~/zfs list -t bookmark -r rpool
NAME                USED  AVAIL  REFER  MOUNTPOINT
rpool/testvol#bob      -      -      -  -
Actions #5

Updated by Electric Monk 11 months ago

  • Status changed from In Progress to Closed
  • % Done changed from 0 to 100

git commit 1473b8d60e902819558a8b0e8a257eb0d754c3c3

commit  1473b8d60e902819558a8b0e8a257eb0d754c3c3
Author: loli10K <ezomori.nozomu@gmail.com>
Date:   2020-12-24T14:29:26.000Z

    13388 ZFS list bookmark not working on zvols
    Reviewed by: Andy Fiddaman <andy@omnios.org>
    Reviewed by: Andrew Stormont <andyjstormont@gmail.com>
    Reviewed by: Jason King <jason.king@joyent.com>
    Approved by: Gordon Ross <gordon.w.ross@gmail.com>

Actions

Also available in: Atom PDF