Project

General

Profile

Bug #7538

zpool destroy umount datasets if it's failed on destroy rpool

Added by Igor Kozhukhov almost 3 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
zfs - Zettabyte File System
Start date:
2016-11-06
Due date:
% Done:

0%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage

Description

I have DilOS, but i can reproduce it on smartos:

i have additional datasets on rpool for cores and crashes for reduce size of snapshots for upgrades of rpool.

root@dilos-zfs:/var/cores# zfs list
NAME                                     USED  AVAIL  REFER  MOUNTPOINT
rpool                                   9.31G  9.94G    27K  /rpool
rpool/ROOT                              2.48G  9.94G    19K  none
rpool/ROOT/dilos                        35.1M  9.94G   330M  legacy
rpool/ROOT/dilos_1.3.7.150-3d-dilos      547K  9.94G   680M  /
rpool/ROOT/dilos_1.3.7.152-2d-7146-pre   747K  9.94G   687M  /
rpool/ROOT/dilos_1.3.7.152-3d-54         774K  9.94G   704M  /
rpool/ROOT/dilos_1.3.7.152-4d-dilos      912K  9.94G   721M  /
rpool/ROOT/dilos_1.3.7.153-2d-dilos      916K  9.94G   727M  /
rpool/ROOT/dilos_1.3.7.153-5d-dilos     2.44G  9.94G   817M  /
rpool/cores                             1.72G  9.94G  1.72G  /var/cores
rpool/crash                             1.78M  9.94G  1.78M  /var/crash
rpool/dump                              3.92G  9.94G  3.92G  -
rpool/export                             153M  9.94G    19K  /export
rpool/export/home                        153M  9.94G    19K  /export/home
rpool/export/home/user                   153M  9.94G   153M  /export/home/user
rpool/smbshare                            33K  9.94G    33K  /smbshare
rpool/swap                              1.03G  9.96G  1.01G  -

root@dilos-zfs:/root# mount
/ on rpool/ROOT/dilos_1.3.7.153-5d-dilos read/write/setuid/devices/dev=1790002 on    :: 
/devices on /devices read/write/setuid/devices/dev=81c0000 on    :: 
/dev on /dev read/write/setuid/devices/dev=8200000 on    :: 
/system/contract on ctfs read/write/setuid/devices/dev=82c0001 on    :: 
/proc on proc read/write/setuid/devices/dev=8240000 on    :: 
/etc/mnttab on mnttab read/write/setuid/devices/dev=8300001 on    :: 
/etc/svc/volatile on swap read/write/setuid/devices/xattr/dev=8340001 on    :: 
/system/object on objfs read/write/setuid/devices/dev=8380001 on    :: 
/system/boot on bootfs read/write/setuid/devices/dev=83c0001 on    :: 
/etc/dfs/sharetab on sharefs read/write/setuid/devices/dev=8400001 on    :: 
/lib/libc.so.1 on /usr/lib/libc/libc_hwcap1.so.1 read/write/setuid/devices/dev=1790002 on    :: 
/dev/fd on fd read/write/setuid/devices/dev=8500001 on    :: 
/tmp on swap read/write/setuid/devices/xattr/dev=8340002 on    :: 
/var/run on swap read/write/setuid/devices/xattr/dev=8340003 on    :: 
/export on rpool/export read/write/setuid/devices/nonbmand/exec/xattr/atime/dev=1790003 on    :: 
/export/home on rpool/export/home read/write/setuid/devices/nonbmand/exec/xattr/atime/dev=1790004 on    :: 
/export/home/user on rpool/export/home/user read/write/setuid/devices/nonbmand/exec/xattr/atime/dev=1790005 on    :: 
/rpool on rpool read/write/setuid/devices/nonbmand/exec/xattr/atime/dev=1790006 on    :: 
/smbshare on rpool/smbshare read/write/setuid/devices/nonbmand/exec/xattr/atime/dev=1790007 on    :: 
/var/cores on rpool/cores read/write/setuid/devices/nonbmand/exec/xattr/atime/dev=1790008 on    :: 
/var/crash on rpool/crash read/write/setuid/devices/nonbmand/exec/xattr/atime/dev=1790009 on    :: 

root@dilos-zfs:/root# cd /var/cores
root@dilos-zfs:/var/cores# zpool destroy rpool
cannot unmount '/var/cores': Device busy
could not destroy 'rpool': could not unmount datasets

root@dilos-zfs:/var/cores# mount
/ on rpool/ROOT/dilos_1.3.7.153-5d-dilos read/write/setuid/devices/dev=1790002 on    :: 
/devices on /devices read/write/setuid/devices/dev=81c0000 on    :: 
/dev on /dev read/write/setuid/devices/dev=8200000 on    :: 
/system/contract on ctfs read/write/setuid/devices/dev=82c0001 on    :: 
/proc on proc read/write/setuid/devices/dev=8240000 on    :: 
/etc/mnttab on mnttab read/write/setuid/devices/dev=8300001 on    :: 
/etc/svc/volatile on swap read/write/setuid/devices/xattr/dev=8340001 on    :: 
/system/object on objfs read/write/setuid/devices/dev=8380001 on    :: 
/system/boot on bootfs read/write/setuid/devices/dev=83c0001 on    :: 
/etc/dfs/sharetab on sharefs read/write/setuid/devices/dev=8400001 on    :: 
/lib/libc.so.1 on /usr/lib/libc/libc_hwcap1.so.1 read/write/setuid/devices/dev=1790002 on    :: 
/dev/fd on fd read/write/setuid/devices/dev=8500001 on    :: 
/tmp on swap read/write/setuid/devices/xattr/dev=8340002 on    :: 
/var/run on swap read/write/setuid/devices/xattr/dev=8340003 on    :: 
/export on rpool/export read/write/setuid/devices/nonbmand/exec/xattr/atime/dev=1790003 on    :: 
/export/home on rpool/export/home read/write/setuid/devices/nonbmand/exec/xattr/atime/dev=1790004 on    :: 
/export/home/user on rpool/export/home/user read/write/setuid/devices/nonbmand/exec/xattr/atime/dev=1790005 on    :: 
/rpool on rpool read/write/setuid/devices/nonbmand/exec/xattr/atime/dev=1790006 on    :: 
/smbshare on rpool/smbshare read/write/setuid/devices/nonbmand/exec/xattr/atime/dev=1790007 on    :: 
/var/cores on rpool/cores read/write/setuid/devices/nonbmand/exec/xattr/atime/dev=1790008 on    ::

root@dilos-zfs:/var/cores# zfs list
NAME                                     USED  AVAIL  REFER  MOUNTPOINT
rpool                                   9.31G  9.94G    27K  /rpool
rpool/ROOT                              2.48G  9.94G    19K  none
rpool/ROOT/dilos                        35.1M  9.94G   330M  legacy
rpool/ROOT/dilos_1.3.7.150-3d-dilos      547K  9.94G   680M  /
rpool/ROOT/dilos_1.3.7.152-2d-7146-pre   747K  9.94G   687M  /
rpool/ROOT/dilos_1.3.7.152-3d-54         774K  9.94G   704M  /
rpool/ROOT/dilos_1.3.7.152-4d-dilos      912K  9.94G   721M  /
rpool/ROOT/dilos_1.3.7.153-2d-dilos      916K  9.94G   727M  /
rpool/ROOT/dilos_1.3.7.153-5d-dilos     2.45G  9.94G   817M  /
rpool/cores                             1.72G  9.94G  1.72G  /var/cores
rpool/crash                             1.78M  9.94G  1.78M  /var/crash
rpool/dump                              3.92G  9.94G  3.92G  -
rpool/export                             153M  9.94G    19K  /export
rpool/export/home                        153M  9.94G    19K  /export/home
rpool/export/home/user                   153M  9.94G   153M  /export/home/user
rpool/smbshare                            33K  9.94G    33K  /smbshare
rpool/swap                              1.03G  9.96G  1.01G  -

we can see -
rpool/crash 1.78M 9.94G 1.78M /var/crash

but we have no seen it in mount list - it was unmounted , but we can see /export/home/* mounts as well

Also available in: Atom PDF