+ -
当前位置:首页 → 问答吧 → zfs的盘被干掉了,该咋办

zfs的盘被干掉了,该咋办

时间:2010-09-03

来源:互联网

一台主机,以前用zfs做测试时,从存储上拉了一些LUN做成pool1。
测试完成后,还没有zpool destroy ,这些lun就被收回做其他用途了。

现在在用zfs destroy和zpool destroy都处于僵死状态。
哪位高手有什么办法

作者: 338378WN8   发布时间: 2010-09-03

没人知道吗

作者: 338378WN8   发布时间: 2010-09-06

我下午用虚拟机试一下,有答案告诉你。

作者: zyl555   发布时间: 2010-09-06

我用虚拟机模拟了一下,用两块盘建了一个镜像。然后关闭虚拟机,把虚拟的两块硬盘删掉了。
然后开启虚拟机删除镜像没有任何问题。
bash-3.00# format
Searching for disks...done


AVAILABLE DISK SELECTIONS:
       0. c1t0d0 <DEFAULT cyl 4092 alt 2 hd 128 sec 32>
          /pci@0,0/pci15ad,1976@10/sd@0,0
       1. c1t3d0 <DEFAULT cyl 508 alt 2 hd 64 sec 32>
          /pci@0,0/pci15ad,1976@10/sd@3,0
       2. c1t4d0 <DEFAULT cyl 405 alt 2 hd 64 sec 32>
          /pci@0,0/pci15ad,1976@10/sd@4,0
       3. c1t5d0 <DEFAULT cyl 405 alt 2 hd 64 sec 32>
          /pci@0,0/pci15ad,1976@10/sd@5,0
       4. c1t6d0 <DEFAULT cyl 406 alt 2 hd 64 sec 32>
          /pci@0,0/pci15ad,1976@10/sd@6,0
Specify disk (enter its number): ^D
bash-3.00# zfs list
no datasets available
bash-3.00# zpool list
NAME   SIZE   USED  AVAIL    CAP  HEALTH  ALTROOT
test      -      -      -      -  FAULTED  -
bash-3.00# zpool status test
  pool: test
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
        test        UNAVAIL      0     0     0  insufficient replicas
          mirror    UNAVAIL      0     0     0  insufficient replicas
            c1t1d0  UNAVAIL      0     0     0  cannot open
            c1t2d0  UNAVAIL      0     0     0  cannot open
bash-3.00#

bash-3.00# zpool destroy test
bash-3.00#
bash-3.00#
bash-3.00# zpool list
no pools available

作者: zyl555   发布时间: 2010-09-06

奇怪了,为啥我这边不行
-bash-3.00# zfs list
NAME          USED  AVAIL  REFER  MOUNTPOINT
pool1         116K  26.3G    23K  /pool1
pool1/test3     6K  26.3G     6K  /pool1/test3
-bash-3.00# zfs destroy -f /pool1/test3
cannot open '/pool1/test3': invalid dataset name
-bash-3.00# zfs destroy -f pool1/test3

^C

-bash-3.00# zpool list         
NAME    SIZE   USED  AVAIL    CAP  HEALTH  ALTROOT
pool1  26.8G   275K  26.7G     0%  UNAVAIL  -
-bash-3.00# zpool destroy pool1



^C

然后整个进程就Hang住了,ctrl-c,ctrl-d都没用了

作者: 338378WN8   发布时间: 2010-09-06