Bug 157399 - [zfs] trouble with: mdconfig force delete && zfs stripe
Summary: [zfs] trouble with: mdconfig force delete && zfs stripe
Status: Closed Unable to Reproduce
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 9.0-CURRENT
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-fs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-29 20:00 UTC by Ilya A. Arhipov
Modified: 2014-06-10 10:36 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ilya A. Arhipov 2011-05-29 20:00:20 UTC
On VirtualBox with freebsd head system install on ufs:
testbsd# uname -a
FreeBSD testbsd 9.0-CURRENT FreeBSD 9.0-CURRENT #0: Wed Apr 27 00:19:50 MSD 2011     root@testbsd:/usr/obj/usr/src/sys/GENERIC  i386

testbsd# mdconfig -a -t malloc -s 100M 
md0

testbsd# mdconfig -a -t malloc -s 100M
md1

testbsd# zpool create testpools md0 md1

testbsd# zfs list
NAME        USED  AVAIL  REFER  MOUNTPOINT
testpool    100K  62,9M    31K  /testpool
testpools    97K   159M    31K  /testpools

testbsd# dd if=/dev/random of=/testpools/myfile.dat bs=1M count=100
100+0 records in
100+0 records out
104857600 bytes transferred in 8.402073 secs (12479968 bytes/sec)

testbsd# ll /testpools
total 102479
-rw-r--r--  1 root  wheel  104857600 13 май 10:33 myfile.dat

testbsd# zfs list
NAME        USED  AVAIL  REFER  MOUNTPOINT
testpool    100K  62,9M    31K  /testpool
testpools   101M  58,2M   100M  /testpools

testbsd# mdconfig -d -u 0 -o force
not responding... 

http://imm.io/5BLl -- screen vb(not responding)
hard reboot

micro[10:47:20]> ssh micro@192.168.3.116
Password:
Last login: Fri May 13 10:46:03 2011
FreeBSD 9.0-CURRENT (GENERIC) #0: Wed Apr 27 00:19:50 MSD 2011

%zpool status testpools
  pool: testpools
 state: UNAVAIL
status: One or more devices could not be opened.  There are insufficient
    replicas for the pool to continue functioning.
action: Attach the missing device and online it using 'zpool online'.
   see: http://www.sun.com/msg/ZFS-8000-3C
 scan: none requested
config:

    NAME        STATE     READ WRITE CKSUM
    testpools   UNAVAIL      0     0     0  insufficient replicas
      md0       UNAVAIL      0     0     0  cannot open
      md1       UNAVAIL      0     0     0  cannot open

%su -
Password:

testbsd# zpool destroy testpools
testbsd#

On virtual box after "mdconfig -d -u 0 -o force" i have freezee.. &&
system not responding.

#########Laptop##########
system install on pool z
root[16:24:45]> zpool destroy tester
load: 1.78  cmd: zpool 45206 [zfs] 192.77r 0.00u 0.01s 0% 2248k

root[16:31:27]> zpool status tester
  pool: tester
 state: UNAVAIL
status: One or more devices are faulted in response to IO failures.
action: Make sure the affected devices are connected, then run 'zpool clear'.
   see: http://www.sun.com/msg/ZFS-8000-HC
 scan: none requested
config:

    NAME        STATE     READ WRITE CKSUM
    tester      UNAVAIL      0     0     0  insufficient replicas
      md0       ONLINE       0     0     0
      md2       UNAVAIL      0     0     0  corrupted data

errors: No known data errors

root[16:39:35]> mdconfig -l
md0 

root[16:39:44]> mdconfig -d -u 0 -o force
mdconfig: ioctl(/dev/mdctl): No such file or directory

root[16:41:20]> procstat -kk 45206
  PID    TID COMM             TDNAME           KSTACK                       
45206 100990 zpool            initial thread   mi_switch+0x21d sleepq_switch+0x123 sleepq_wait+0x4d __lockmgr_args+0x793 vop_stdlock+0x39 VOP_LOCK1_APV+0x9b _vn_lock+0x47 vflush+0x200 zfs_umount+0x9f dounmount+0x2dc unmount+0x28e syscallenter+0x1aa syscall+0x4c Xfast_syscall+0xdd

On my system "mdconfig -o force" normal work but.. after "zpool destoy <pool>" have freeze

micro[11:36:48]> sysctl vfs.zfs. | grep version
vfs.zfs.version.zpl: 5
vfs.zfs.version.spa: 28
vfs.zfs.version.acl: 1

Vb have zfsv28 too.
##########################

Fix: 

Sorry i don't know.
How-To-Repeat: testbsd# mdconfig -a -t malloc -s 100M 
md0
testbsd# mdconfig -a -t malloc -s 100M
md1
testbsd# zpool create testpools md0 md1
testbsd# dd if=/dev/random of=/testpools/myfile.dat bs=1M count=100
100+0 records in
100+0 records out
104857600 bytes transferred in 9.230674 secs (11359690 bytes/sec)
testbsd# mdconfig -d -u 0 -o force
if all right try "zpool destoy <pool>"
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2011-05-30 00:37:56 UTC
Responsible Changed
From-To: freebsd-bugs->freebsd-fs

reclassify.
Comment 2 vladislav V. Prodan 2011-05-30 12:28:38 UTC
Error occurs in 8.2-CURRENT, ZFS v15

[3:27]vm1:root->/root# mdconfig -a -t malloc -s 100M
md0
[3:28]vm1:root->/root# mdconfig -a -t malloc -s 100M
md1
[3:28]vm1:root->/root# zpool create testpools md0 md1
[3:28]vm1:root->/root# dd if=/dev/random of=/testpools/myfile.dat bs=1M 
count=100
100+0 records in
100+0 records out
104857600 bytes transferred in 1.610346 secs (65114947 bytes/sec)
[3:28]vm1:root->/root# mdconfig -d -u 0 -o force
[3:28]vm1:root->/root# zpool status
   pool: tank
  state: ONLINE
  scrub: none requested
config:

         NAME             STATE     READ WRITE CKSUM
         tank             ONLINE       0     0     0
           gpt/disk-ada0  ONLINE       0     0     0

errors: No known data errors

   pool: test-tank
  state: ONLINE
  scrub: none requested
config:

         NAME           STATE     READ WRITE CKSUM
         test-tank      ONLINE       0     0     0
           raidz2       ONLINE       0     0     0
             gpt/disk0  ONLINE       0     0     0
             gpt/disk1  ONLINE       0     0     0
             gpt/disk2  ONLINE       0     0     0
             gpt/disk3  ONLINE       0     0     0
             gpt/disk4  ONLINE       0     0     0
             gpt/disk5  ONLINE       0     0     0

errors: No known data errors

   pool: testpools
  state: ONLINE
  scrub: none requested
config:

         NAME        STATE     READ WRITE CKSUM
         testpools   ONLINE       0     0     0
           md0       ONLINE       0     0     0
           md1       ONLINE       0     0     0

errors: No known data errors
[3:29]vm1:root->/root# mdconfig -d -u 0 -o force
mdconfig: ioctl(/dev/mdctl): No such file or directory
[3:29]vm1:root->/root# mdconfig -d -u 0 -o force
mdconfig: ioctl(/dev/mdctl): No such file or directory
[3:29]vm1:root->/root# mdconfig -d -u 1 -o force
[3:29]vm1:root->/root# zpool status
   pool: tank
  state: ONLINE
  scrub: none requested
config:

         NAME             STATE     READ WRITE CKSUM
         tank             ONLINE       0     0     0
           gpt/disk-ada0  ONLINE       0     0     0

errors: No known data errors

   pool: test-tank
  state: ONLINE
  scrub: none requested
config:

         NAME           STATE     READ WRITE CKSUM
         test-tank      ONLINE       0     0     0
           raidz2       ONLINE       0     0     0
             gpt/disk0  ONLINE       0     0     0
             gpt/disk1  ONLINE       0     0     0
             gpt/disk2  ONLINE       0     0     0
             gpt/disk3  ONLINE       0     0     0
             gpt/disk4  ONLINE       0     0     0
             gpt/disk5  ONLINE       0     0     0

errors: No known data errors

   pool: testpools
  state: UNAVAIL
  scrub: none requested
config:

         NAME        STATE     READ WRITE CKSUM
         testpools   UNAVAIL      0     0     0  insufficient replicas
           md0       REMOVED      0     0     0
           md1       ONLINE       0     0     0

errors: No known data errors
[3:29]vm1:root->/root# mdconfig -d -u 1 -o force
mdconfig: ioctl(/dev/mdctl): No such file or directory

not responding...


After hard reboot:

[3:34]vm1:root->/root# uname -a
FreeBSD vm1.local 8.2-STABLE FreeBSD 8.2-STABLE #0: Fri May 27 02:30:57 
EEST 2011     root@vm1.local:/usr/obj/usr/src/sys/virtualbox.2  amd64
[3:34]vm1:root->/root# zpool status
   pool: tank
  state: ONLINE
  scrub: none requested
config:

         NAME             STATE     READ WRITE CKSUM
         tank             ONLINE       0     0     0
           gpt/disk-ada0  ONLINE       0     0     0

errors: No known data errors

   pool: test-tank
  state: ONLINE
  scrub: none requested
config:

         NAME           STATE     READ WRITE CKSUM
         test-tank      ONLINE       0     0     0
           raidz2       ONLINE       0     0     0
             gpt/disk0  ONLINE       0     0     0
             gpt/disk1  ONLINE       0     0     0
             gpt/disk2  ONLINE       0     0     0
             gpt/disk3  ONLINE       0     0     0
             gpt/disk4  ONLINE       0     0     0
             gpt/disk5  ONLINE       0     0     0

errors: No known data errors

   pool: testpools
  state: UNAVAIL
status: One or more devices could not be opened.  There are insufficient
         replicas for the pool to continue functioning.
action: Attach the missing device and online it using 'zpool online'.
    see: http://www.sun.com/msg/ZFS-8000-3C
  scrub: none requested
config:

         NAME        STATE     READ WRITE CKSUM
         testpools   UNAVAIL      0     0     0  insufficient replicas
           md0       UNAVAIL      0     0     0  cannot open
           md1       UNAVAIL      0     0     0  cannot open




-- 
Vladislav V. Prodan
VVP24-UANIC
+380[67]4584408
+380[99]4060508
vlad11@jabber.ru
Comment 3 ru_M1cRO 2014-06-04 14:57:17 UTC
Seems as it was fixed, can't reproduce it on head.
Comment 4 Alexey Dokuchaev freebsd_committer freebsd_triage 2014-06-10 10:36:09 UTC
Closed per submitter's request (no longer reproducible).