cannot promote clone: "not a cloned filesystem"

Bug #1947568 reported by James Dingwall
42
This bug affects 9 people
Affects Status Importance Assigned to Milestone
zfs-linux (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

I have a zvol containing a Windows image for a virtual machine. After restarting the system a node under /dev/zvol/... was not created for the virtual disk and no amount of prompting by `udevadm trigger` helped. Instead I created a snapshot from the most recent hourly backup:

# zfs clone rpool/vm/windows/windows10/hda@hourly07 rpool/vm/windows/windows10/hda-new
# zfs promote rpool/vm/windows/windows10/hda-new
cannot promote 'rpool/vm/windows/windows10/hda-new': not a cloned filesystem
(didn't work here but carried on assuming something can be sorted later)
# zfs rename rpool/vm/windows/windows10/hda rpool/vm/windows/windows10/hda-old
# zfs rename rpool/vm/windows/windows10/hda-new rpool/vm/windows/windows10/hda

Entries in /dev appeared and I could start the virtual machine. Trying to promote the clone gives 'not a cloned filesystem' message. I later renamed the old zvol and tried to cleanup:

# zfs rename rpool/vm/windows/windows10/hda-old rpool/to-be-deleted
# zfs destroy rpool/to-be-deleted@hourly07
cannot destroy 'rpool/to-be-deleted@hourly07': snapshot has dependent clones
use '-R' to destroy the following datasets:
rpool/vm/windows/windows10/hda@hourly09
rpool/vm/windows/windows10/hda@hourly10
rpool/vm/windows/windows10/hda
# zfs promote rpool/vm/windows/windows10/hda
cannot promote 'rpool/vm/windows/windows10/hda': not a cloned filesystem

# zfs get origin rpool/vm/windows/windows10/hda
NAME PROPERTY VALUE SOURCE
rpool/vm/windows/windows10/hda origin rpool/to-be-deleted@hourly07 -

# zfs get clones rpool/to-be-deleted@hourly07
NAME PROPERTY VALUE SOURCE
rpool/to-be-deleted@hourly07 clones rpool/vm/windows/windows10/hda -

The dependency between seems to be as expected. This small test fails in the same way:

# zfs create -V1G rpool/vm/test
# zfs snapshot rpool/vm/test@test2
# zfs clone rpool/vm/test@test2 rpool/vm/test3
# zfs promote rpool/vm/test3
cannot promote 'rpool/vm/test3': not a cloned filesystem
# zfs get origin rpool/vm/test3
NAME PROPERTY VALUE SOURCE
rpool/vm/test3 origin rpool/vm/test@test2 -
# zfs get clones rpool/vm/test@test2
NAME PROPERTY VALUE SOURCE
rpool/vm/test@test2 clones rpool/vm/test3 -

All the zpool members are ONLINE and no errors are reported.

# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.3 LTS
Release: 20.04
Codename: focal

# uname -r
5.11.0-37-generic

# modinfo zfs | grep -i version
version: 2.0.2-1ubuntu5.1
srcversion: F267DF7B3FFB43AFE76257D
vermagic: 5.11.0-37-generic SMP mod_unload modversions

# apt-cache policy zfsutils-linux
zfsutils-linux:
  Installed: 0.8.3-1ubuntu12.12
  Candidate: 0.8.3-1ubuntu12.13
  Version table:
     0.8.3-1ubuntu12.13 500
        500 http://gb.archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages
 *** 0.8.3-1ubuntu12.12 100
        100 /var/lib/dpkg/status
     0.8.3-1ubuntu12.9 500
        500 http://security.ubuntu.com/ubuntu focal-security/main amd64 Packages
     0.8.3-1ubuntu12 500
        500 http://gb.archive.ubuntu.com/ubuntu focal/main amd64 Packages

description: updated
description: updated
Revision history for this message
James Dingwall (a-james-launchpad) wrote :

Present with latest kernel and user space packages:

# zfs create -V1G rpool/test1
# zfs snapshot rpool/test1@test2
# zfs clone rpool/test1@test2 rpool/test3
# zfs promote rpool/test3
cannot promote 'rpool/test3': not a cloned filesystem

# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.3 LTS
Release: 20.04
Codename: focal

# uname -r
5.11.0-38-generic

# modinfo zfs | grep -i version
version: 2.0.2-1ubuntu5.1
srcversion: F267DF7B3FFB43AFE76257D
vermagic: 5.11.0-38-generic SMP mod_unload modversions

# apt-cache policy zfsutils-linux
zfsutils-linux:
  Installed: 0.8.3-1ubuntu12.13
  Candidate: 0.8.3-1ubuntu12.13
  Version table:
 *** 0.8.3-1ubuntu12.13 500
        500 http://gb.archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages
        100 /var/lib/dpkg/status
     0.8.3-1ubuntu12.9 500
        500 http://security.ubuntu.com/ubuntu focal-security/main amd64 Packages
     0.8.3-1ubuntu12 500
        500 http://gb.archive.ubuntu.com/ubuntu focal/main amd64 Packages

Revision history for this message
James Dingwall (a-james-launchpad) wrote :

This appears to be an issue with mismatched user/kernel zfs components. After adding ppa:jonathonf/zfs (https://launchpad.net/~jonathonf/+archive/ubuntu/zfs) and updating the user components my `zfs promote` problem has been resolved.

# zfs version
zfs-2.1.1-0york0~20.04
zfs-kmod-2.0.2-1ubuntu5.1

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in zfs-linux (Ubuntu):
status: New → Confirmed
Revision history for this message
Tim K. (tkubnt) wrote :

What can we do to address these types of issues, without relying on 3rd party PPAs?

https://bugs.launchpad.net/ubuntu/+source/zfs-linux/+bug/1939210

Revision history for this message
Some Guy On The Net (lockszmith) wrote :

https://bugs.launchpad.net/ubuntu/+source/zfs-linux/+bug/1947568/comments/1

This is my exact issue as well, elbit using a focal based distro - Zorin:

$ lsb_release -a
No LSB modules are available.
Distributor ID: Zorin
Description: Zorin OS 16
Release: 16
Codename: focal

$ uname -r
5.13.0-27-generic

$ apt-cache policy zfsutils-linux
zfsutils-linux:
  Installed: 0.8.3-1ubuntu12.13
  Candidate: 0.8.3-1ubuntu12.13
  Version table:
 *** 0.8.3-1ubuntu12.13 500
        500 http://us.archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages
        100 /var/lib/dpkg/status
     0.8.3-1ubuntu12.9 500
        500 http://security.ubuntu.com/ubuntu focal-security/main amd64 Packages
     0.8.3-1ubuntu12 500
        500 http://us.archive.ubuntu.com/ubuntu focal/main amd64 Packages

Revision history for this message
d (agentefilemonpi) wrote :

I have the same problem. In my case, it is caused by upgrading the NVIDIA driver metapackage to 510 from 470.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.