ZFSのメンバだったディスクを再利用する時はzpool labelclearすべき

一度でもZFSで使ったことがあるストレージを別のzpoolに使い回す際は、zpool labelclearコマンドで当該デバイスからZFSラベル情報を消した方が良さそうだ。

再利用デバイスで新しいプールを作ろうとすると、殆どの場合は以下のようなエラーが出て作ることができない。

# zpool create ztank da0p3
invalid vdev specification
use '-f' to override the following errors:
/dev/da0p3 is part of potentially active pool 'zroot'

「有効なプールzrootの一部かもよ」とZFS先生は仰ってるものの、zrootは間違いなくdestroy済みで、僕は確信を以てda0p3でztankを作りたいのだよ。先生ったらお節介~。destroyしたんだからラベル情報も一緒に消しとけよ!と思わなくもないが、ZFSではdestroyの取り消しをサポートしてたりする関係で、こういう仕様なのだろう。削除済みプールの復元については、zpool importの-Dオプションを調べておくんなまし。

ところがである、条件は不明だが、このお節介が働かず以前のラベル情報を残したまま新プールが作れちゃうことがある。こうなるとマジで大惨事。新しいプールと昔のプールが管理情報の上では存在する事になり、見るからにヤバげな状態となる。その時の再現ログが↓これ。

# zpool status
  pool: newtank
 state: ONLINE
  scan: none requested
config:

        NAME        STATE     READ WRITE CKSUM
        newtank     ONLINE       0     0     0
          da0p3     ONLINE       0     0     0

errors: No known data errors

  pool: oldtank
 state: UNAVAIL
  scan: none requested
config:

        NAME                      STATE     READ WRITE CKSUM
        oldtank                   UNAVAIL      0     0     0
          1234567890123456789     UNAVAIL      0     0     0

errors: No known data errors

ログ上からは、別々のストレージで構成される2つのプール、newtankとoldtankがあるようにしか見えない。しかし実際のところ、oldtankはnewtank以前にda0p3で使っていたもので、既にdestroy済みのプールなのである。newtankとして実際にデータが書き込まれ、意味消失してるハズの削除済みプールoldtankが認識されているのだ…!

こうなると最早手遅れ。oldtankを再度destroyしようにも「そんなプールは存在しない」と言われるし、ならばとデバイス1234567890123456789をどうにかする方向で頑張ってもどうにもならず…。かと言って、この段階でlabelclearは絶対にしてはいけない。newtankもろとも消えてしまうので_:(´ཀ`」∠):_(実体験)。

というわけで、ZFSプールを作る時は忘れずにlabelclearで以前の情報を消すようにしたい。


(2017-11-14 追記)

タイミングよく本症状が発生したのでスクショをうp。

やった事はと言うと…

  1. 以前のzroot(赤い方)を削除しlabelclear
  2. 新しいzroot(緑の方)を作成
  3. FreeBSD 11.0-RELEASEをインストール
  4. freebsd-updateで11.1-RELEASEに更新するも、ブート時のTrying to mount root~で失敗して起動しなくなる
    • 今にして思えば、この時点で古いプールが認識されて旧zrootの方をマウントしようとしてたのかも…?
  5. kernel.oldの方から起動してfreebsd-updateで11.0の最新にしようとする
  6. 見事に失敗して起動しなくなる。起動スプラッシュのシェルでload kernelもload zfsも失敗する状態。
  7. インストーラメディアから起動してzpool importしたらこの状態

確かにlabelclearしたハズなんだけどなぁ…。変なzpool.cacheでも食ってんのかなぁ…?わからん。


(2017-11-16 追記)

あ、ありのまま起こったことを(ry。

症状が出たHDDの各パーティションを再度labelclearしてddでゼロフィルまでしたにもかかわらず、古い方のzrootが認識されやがったぜ……。最終的にzpool labelclear da0してようやく認識されなくなった。(が、当然GPTは壊れる。セカンダリテーブルは生きてるからパーティションの認識と復旧は可能だが…。)GPTの領域にZFSラベルが書き込まれそうな使い方─つまりディスク全体をzpoolにするような使い方はした記憶がないんだが、どうしてこうなった……?

結論としては、zpoolを作る時は対象デバイスの/dev/daX/dev/daXpYを全てlabelclearするのが安全、可能なら全体をゼロフィルするということで。

Hello pursuers of pollen-free air ! Don't underestimate the value of investment in a good air purifier. The insights provided at https://best-air-purifiers-for-allergies. <a href=“https://best-air-purifiers-for-allergies.vercel.app/” rel=“best air purifier for pollen allergies</a>. vercel. app/ show the significant benefits that these devices offer. Empower yourself to breathe easier and live better by selecting an optimal air purifier. Many of the best-air-purifiers-for-allergies are suited for different spaces, including bedrooms, living rooms, and even offices. Versatile options ensure you can find a product that meets distinct needs throughout your home or workspace. The right air purifier can significantly enhance your living conditions and comfort. The Best Air Purifiers for Allergies for Pet Owners - п»їhttps://best-air-purifiers-for-allergies.vercel.app/ May you enjoy incredible pure-air comfort for sensitive lungs!

1 | | 2026-04-07 00:10 | reply

<a href=“https://telegra.ph/Pechat-Magii-06-15-11”>https://telegra.ph/Pechat-Magii-06-15-11</a> все об астрологиии в одном месте

2 | | 2026-06-17 00:54 | reply

<a href=“https://omnivatic.webnode.ru/”>омниватик</a> - читайте на лучшем сайте про астрологию, таро и натальные карты www.omnivatic.com

3 | | 2026-06-18 05:26 | reply

<a href=https://22bet.com/>child spiele</a>

4 |
DavidPycle
| 2026-06-22 11:56 | reply

Your writing flows incredibly well, and the transition between different points was smooth. This is exactly the kind of trustworthy and neutral content I enjoy reading on a weekday.

<a href=https://catechistaduepuntozero.it/>Coolzino Casino</a>

5 |
Ismaelchofs
| 2026-06-24 17:13 | reply

Thank you for providing such a balanced and comprehensive overview. It is quite nice to encounter content that remains perfectly unbiased while still delivering all the essential details in a clear sequence that keeps the reader fully engaged from start to finish.

<a href=https://residencesantodomingo.it/>https://residencesantodomingo.it/</a>

6 |
DichaelStany
| 2026-06-25 00:59 | reply

от лучшего сайта спорта и букмекеров bkradar.com

7 | | 2026-06-25 04:28 | reply

I have read quite a bit on this general theme lately, but the way you have organized these specific points stands out as one of the most easy-to-follow and well-structured overviews I have come across in a very long time.

<a href=https://esportnow.pl/>在线购买无处方安定片 xxx Pornhub</a>

8 |
Shanegergo
| 2026-06-25 05:47 | reply

I think this post does a really good job of keeping the content insightful without losing the natural and accessible tone that helps readers stay engaged in the conversation throughout the entire discussion.

<a href=https://www.thegameroom.org/>Watch sexual porno video xxx sex adults site</a>

9 |
LewisBreer
| 2026-06-25 08:52 | reply

I genuinely appreciate how you managed to break down such a complex subject into bite-sized segments without losing any of the critical nuances that make this topic important.

<a href=https://sweepskings.com/>viagra pills sexual xxx porn pills</a>

10 |
Lhanegergo
| 2026-06-25 17:55 | reply

The concise yet comprehensive nature of this article makes it a fantastic resource, and I truly value the organized approach you took to ensure every single point was covered in a logical and easy-to-understand manner for the readers.

<a href=https://sweepstakestable.com/>Xxx video onlyfans sex video site</a>

11 |
EarnestBef
| 2026-06-25 20:49 | reply

The formatting and overall presentation of this post are absolutely impressive. It ensures that the most critical pieces of information stand out clearly without feeling overwhelming.

<a href=https://vegtus.com/>casino con bono</a>

12 |
LewisBreer
| 2026-06-27 19:51 | reply

This post creates a very pleasant reading experience because the structure is simple, the tone stays balanced, and the discussion feels open enough for readers with different opinions to engage openly and thoughtfully.

<a href=https://vegastars-online.com/>dogs porn</a>

13 |
Stephentroft
| 2026-07-08 10:06 | reply

The clarity of your writing truly stands out in this article. You managed to capture all the essential points in a perfectly objective manner, which I always find very appreciated.

<a href=https://vegastars-online.com/>dogs video</a>

14 |
FobertDup
| 2026-07-15 08:13 | reply

Doy la bienvenida a todos los jugadores de casino ! La plataforma casinossinlicenciaenespana-weld.vercel.app reГєne informaciГіn actualizada sobre los operadores mГЎs destacados del sector. <a href=“https://casinossinlicenciaenespana-weld.vercel.app/” rel=“nofollow ugc”>casinos sin licencia en espana</a> Los jugadores pueden consultar reseГ±as detalladas y comparativas antes de registrarse en cualquier casino. Este recurso facilita enormemente la toma de decisiones para quienes se inician en el mundo del juego online. El catГЎlogo de tragamonedas disponible en los casinos sin licencia en espana incluye miles de tГ­tulos de los proveedores mГЎs prestigiosos del mundo. Pragmatic Play, NetEnt, Evolution Gaming y Microgaming son solo algunos de los estudios representados en estas plataformas. Las mecГЎnicas innovadoras como Megaways y compra de bonus mantienen la oferta siempre fresca. Casinos sin licencia en espana con retiros mГЎs rГЎpidos - https://casinossinlicenciaenespana-weld.vercel.app/# Espero que disfrutes de increibles giros ! casinos sin registro

15 | | 2026-07-16 14:22 | reply

Doy la bienvenida a todos los apostadores expertos ! El portal casinossinlicenciaenespana-weld.vercel.app actualiza semanalmente su ranking de operadores recomendados basГЎndose en pruebas reales. <a href=“https://casinossinlicenciaenespana-weld.vercel.app/#” rel=“nofollow ugc”>casinos sin licencia en espana</a> Cada casino es evaluado por un equipo que verifica personalmente los tiempos de retiro, la calidad del soporte y la equidad de los juegos. Esta metodologГ­a rigurosa garantiza recomendaciones fiables y actualizadas. Los casinos online sin licencia actualizan su oferta de juegos con decenas de nuevos tГ­tulos cada semana. Los estudios de desarrollo compiten por lanzar las tragamonedas mГЎs innovadoras y visualmente impactantes del mercado. Esta renovaciГіn constante garantiza que el jugador siempre encuentre algo nuevo por descubrir. Casinos online sin licencia con mejor catГЎlogo de juegos - https://casinossinlicenciaenespana-weld.vercel.app/# Espero que disfrutes de increibles botes! casinossinlicenciaenespana-weld.vercel.app

16 | | 2026-07-17 15:41 | reply

Doy la bienvenida a todos los amantes de la privacidad digital ! Las tragamonedas con mecГЎnicas innovadoras son la categorГ­a estrella en un casino cripto sin verificaciГіn actualizado. <a href=https://casinosinverificacion-hub.vercel.app/#>casinosinverificacion-hub</a> TГ­tulos con sistemas Megaways, compra de bonos, jackpots progresivos y funciones de multiplicador atraen a miles de jugadores. Los estudios de desarrollo lanzan novedades semanalmente manteniendo el catГЎlogo siempre fresco y atractivo. La competencia entre proveedores impulsa una calidad que beneficia directamente al usuario final. La web casinosinverificacion-hub centraliza las mejores opciones disponibles para el jugador hispanohablante actual. Las comparativas incluyen anГЎlisis de bonos, mГ©todos de pago aceptados y variedad de juegos disponibles. La actualizaciГіn constante del contenido asegura que la informaciГіn refleje el estado real del mercado. Consultar este recurso antes de registrarse es una prГЎctica recomendable para cualquier apostador. ВїCuГЎl es el casino sin verificaciГіn mГЎs fiable? - https://casinosinverificacion-hub.vercel.app/ Espero que encuentres las mejores experiencias ! casino sin verificaciГіn

17 | | 2026-07-18 14:50 | reply

Doy la bienvenida a todos los fanaticos del juego online ! La selecciГіn de juegos de mesa en los mejores casinos europeos online satisface desde al jugador casual hasta al apostador mГЎs exigente. <a href=“https://casinosonlineeuropeos-blush.vercel.app/#” rel=“nofollow ugc”>casinos europeos sin licencia espaГ±ola</a> Variantes de ruleta francesa, europea y americana conviven con mГєltiples versiones de blackjack y baccarat en formato digital. Las apuestas mГ­nimas accesibles permiten disfrutar de la experiencia independientemente del presupuesto disponible. Los programas de fidelidad en los casinos europeos sin licencia espaГ±ola recompensan cada apuesta con puntos canjeables por beneficios tangibles. Los niveles VIP desbloquean ventajas exclusivas como retiros prioritarios, gestores de cuenta personalizados y bonos a medida. Estas recompensas a largo plazo incentivan la permanencia y reconocen la lealtad del jugador habitual. Casinos con licencia europea: comparativa completa y reseГ±as - http://casinosonlineeuropeos-blush.vercel.app/ Espero que encuentres las mejores aventuras! plataformas de casino europeas

18 | | 2026-07-18 15:46 | reply
  • blog/2017/2017-11-09.txt
  • 最終更新: 2019-11-26 00:23
  • by Decomo