docker.io post-removal script fails to delete btrfs subvolume, when /var/lib/docker is on an ext4 filesystem
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
docker.io (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
krenshaw@
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
cgroupfs-mount pigz ubuntu-fan
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
docker.io*
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 192492 files and directories currently installed.)
Removing docker.io (18.06.
Purging configuration files for docker.io (18.06.
Nuking /var/lib/docker ...
(if this is wrong, press Ctrl+C NOW!)
+ sleep 10
+ btrfs subvolume delete /var/lib/
ERROR: not a subvolume: /var/lib/
dpkg: error processing package docker.io (--purge):
subprocess installed post-removal script returned error exit status 1
Errors were encountered while processing:
docker.io
E: Sub-process /usr/bin/dpkg returned an error code (1)
/ (and therefore /var/lib/docker) is:
/dev/mapper/
ProblemType: Package
DistroRelease: Ubuntu 16.04
Package: docker.io (not installed)
ProcVersionSign
Uname: Linux 4.15.0-43-generic x86_64
NonfreeKernelMo
ApportVersion: 2.20.1-0ubuntu2.18
AptOrdering:
docker.io: Purge
NULL: ConfigurePending
Architecture: amd64
Date: Thu Jan 31 10:33:08 2019
ErrorMessage: subprocess installed post-removal script returned error exit status 1
InstallationDate: Installed on 2017-02-27 (703 days ago)
InstallationMedia: Ubuntu 16.04.1 LTS "Xenial Xerus" - Release amd64 (20160719)
RelatedPackageV
dpkg 1.18.4ubuntu1.5
apt 1.2.29ubuntu0.1
SourcePackage: docker.io
Title: package docker.io (not installed) failed to install/upgrade: subprocess installed post-removal script returned error exit status 1
UpgradeStatus: No upgrade log present (probably fresh install)
tags: | removed: need-duplicate-check |
The post rm script calls `nuke-graph- directory. sh` which relies on these predicates to identify btrfs subvolumes:
if command -v btrfs > /dev/null 2>&1; then stackoverflow. com/a/32865333
# Find btrfs subvolumes under $dir checking for inode 256
# Source: http://
for subvol in $(find "$dir" -type d -inum 256 | sort -r)
Which on my system (not using btrfs) returns many directories.