From 43444c2778da7d1ef49df34a2d1392b3564b19c8 Mon Sep 17 00:00:00 2001 From: Eric Chang Date: Mon, 1 Apr 2019 22:00:01 +0800 Subject: [PATCH] hugo daily push 2019-04-01 22:00:01 --- .../fix-zpool-device-busy-using-dmsetup.md | 77 +++ public/404.html | 10 +- public/author/eric-chang/index.html | 180 ++++--- public/author/eric-chang/index.xml | 17 +- public/author/eric-chang/page/2/index.html | 103 +++- public/author/index.html | 12 +- public/author/index.xml | 2 +- public/categories/index.html | 12 +- public/categories/index.xml | 2 +- public/categories/ps/index.html | 10 +- public/categories/碎念/index.html | 10 +- public/categories/筆記/index.html | 170 ++++--- public/categories/筆記/index.xml | 17 +- public/categories/筆記/page/2/index.html | 93 +++- public/categories/群暉/index.html | 10 +- public/en/sitemap.xml | 19 +- public/gallery/index.html | 10 +- public/gallery/sammy93/index.html | 10 +- public/index.html | 184 ++++---- public/index.json | 7 + public/index.xml | 17 +- public/page/2/index.html | 105 ++++- .../index.html | 10 +- .../post/ansible-selectattr-filter/index.html | 10 +- public/post/ansible-selectattr/index.html | 10 +- public/post/bookstack-docker/index.html | 10 +- .../index.html | 10 +- .../post/command_to_test_main_ssl/index.html | 10 +- public/post/copy_role_in_pgsql/index.html | 10 +- .../index.html | 10 +- .../enable-synology-public-ssh/index.html | 10 +- .../index.html | 444 ++++++++++++++++++ .../incredibly-slow-mdadm-rebuild/index.html | 10 +- public/post/index.html | 180 ++++--- public/post/index.xml | 17 +- .../index.html | 10 +- .../index.html | 10 +- .../post/nice-du-report-tool-durep/index.html | 10 +- public/post/page/2/index.html | 103 +++- .../index.html | 10 +- .../synology-ds415-repair-cost/index.html | 10 +- .../transfer-cent62-using-rsync/index.html | 10 +- .../index.html | 10 +- .../weird-client-server-connection/index.html | 10 +- public/sitemap.xml | 2 +- public/tags/10g/index.html | 10 +- public/tags/ansible/index.html | 10 +- public/tags/backup/index.html | 10 +- public/tags/bookstack/index.html | 10 +- public/tags/centos/index.html | 10 +- public/tags/docker/index.html | 10 +- public/tags/du/index.html | 10 +- public/tags/firefox/index.html | 10 +- public/tags/freenas/index.html | 10 +- public/tags/index.html | 12 +- public/tags/index.xml | 9 + public/tags/linux/index.html | 10 +- public/tags/mdadm/index.html | 10 +- public/tags/mellanox/index.html | 10 +- public/tags/metabase/index.html | 10 +- public/tags/nas/index.html | 10 +- public/tags/ps/index.html | 10 +- public/tags/psql/index.html | 10 +- public/tags/raid/index.html | 10 +- public/tags/ssh/index.html | 10 +- public/tags/synology/index.html | 10 +- public/tags/ubuntu/index.html | 10 +- public/tags/vim/index.html | 10 +- public/tags/zfs/index.html | 384 +++++++++++++++ public/tags/zfs/index.xml | 29 ++ public/tags/zfs/page/1/index.html | 1 + public/tags/短今/index.html | 10 +- public/tags/筆記/index.html | 10 +- public/tags/群暉/index.html | 10 +- 74 files changed, 2006 insertions(+), 672 deletions(-) create mode 100644 content/post/fix-zpool-device-busy-using-dmsetup.md create mode 100644 public/post/fix-zpool-device-busy-using-dmsetup/index.html create mode 100644 public/tags/zfs/index.html create mode 100644 public/tags/zfs/index.xml create mode 100644 public/tags/zfs/page/1/index.html diff --git a/content/post/fix-zpool-device-busy-using-dmsetup.md b/content/post/fix-zpool-device-busy-using-dmsetup.md new file mode 100644 index 00000000..43decdbb --- /dev/null +++ b/content/post/fix-zpool-device-busy-using-dmsetup.md @@ -0,0 +1,77 @@ +--- +title: "[筆記] 解決無法建立zpool 的錯誤 / Fix Zpool Device Busy Using dmsetup" +date: 2019-04-01T15:56:27+08:00 +draft: false + +noSummary: false +featuredImage: "https://h.cowbay.org/images/post-default-11.jpg" +categories: ['筆記'] +tags: ['zfs'] +author: "Eric Chang" +--- + +今天把其中一台proxmox 加上10G 光纖網卡,準備和另一台proxmox 組成10G 環境進行測試 + +想說把本機的zpool 拆掉,重新建立一個raid0 的空間來做clone/migrate + +可是一直出現device busy的錯誤訊息 + + + +``` +root@pve:~# zpool create zp sdb1 +cannot open '/dev/sdb1': Device or resource busy + +``` +可是我沒有mount 這個分割進來 + +而且我也可以用fdisk 去切sdb ,代表sdb 沒有真的被使用 + +找了很久,終於找到這個dmsetup指令 + +先用 ```dmsetup info -C ``` 來看現在的狀態 + +``` +root@pve:~# dmsetup info -C +Name Maj Min Stat Open Targ Event UUID +ST2000DM001-1ER164_W4Z3KKJB 253 3 L--w 0 1 0 mpath-ST2000DM001-1ER164_W4Z3KKJB +pve-swap 253 0 L--w 2 1 0 LVM-6Hle5UGjtr8NQQsbMrYlSdGXZklwAi87Kq9NlzQa6xvgiHOEP3Ekx72i5yYNaupf +pve-root 253 1 L--w 1 1 0 LVM-6Hle5UGjtr8NQQsbMrYlSdGXZklwAi87geZeFZsQsgYUbI1ZJU4lKD86TVd1MNrq +ST2000DM001-1ER164_W4Z3KM2F-part1 253 5 L--w 0 1 0 part1-mpath-ST2000DM001-1ER164_W4Z3KM2F +ST2000DM001-1ER164_W4Z3KM2F 253 2 L--w 1 1 0 mpath-ST2000DM001-1ER164_W4Z3KM2F +ST2000DM001-1ER164_W4Z3GYNJ 253 4 L--w 0 1 0 mpath-ST2000DM001-1ER164_W4Z3GYNJ +``` + +除了那兩個LVM開頭的以外,其他都不應該出現在這裡才對 +移除掉應該就可以了 +要照順序,像那個有part1 的,就要先移掉,才能移掉底層 + +``` +root@pve:~# dmsetup remove ST2000DM001-1ER164_W4Z3KM2F-part1 +root@pve:~# dmsetup remove ST2000DM001-1ER164_W4Z3KM2F +root@pve:~# dmsetup remove ST2000DM001-1ER164_W4Z3KKJB +root@pve:~# dmsetup remove ST2000DM001-1ER164_W4Z3KM2F +root@pve:~# dmsetup remove ST2000DM001-1ER164_W4Z3GYNJ +``` + +再來建立zpool 就 OK了 +``` +root@pve:~# zpool create zp sdb sdc sdd +root@pve:~# zpool status + pool: zp + state: ONLINE + scan: none requested +config: + + NAME STATE READ WRITE CKSUM + zp ONLINE 0 0 0 + sdb ONLINE 0 0 0 + sdc ONLINE 0 0 0 + sdd ONLINE 0 0 0 + +errors: No known data errors +root@pve:~# +``` + + + diff --git a/public/404.html b/public/404.html index 50ff5a6f..039413ce 100644 --- a/public/404.html +++ b/public/404.html @@ -115,6 +115,10 @@ Latest posts @@ -153,7 +153,7 @@