Skip to content

Instantly share code, notes, and snippets.

@libero18
Created June 19, 2015 09:03
Show Gist options
  • Save libero18/95d34daa81679fd0c945 to your computer and use it in GitHub Desktop.
Save libero18/95d34daa81679fd0c945 to your computer and use it in GitHub Desktop.
gmirror の復旧手順についてのメモ
/dev/mirror/gm0p1
    /dev/ada0p1
    /dev/ada1p1

/dev/mirror/gm0p2
    /dev/ada0p2
    /dev/ada1p2

/dev/mirror/gm0p3
    /dev/ada0p3
    /dev/ada1p3

/dev/ada1 が壊れたものとして、新しく交換されたものを /dev/ada2 とする

メタデータの削除

  • gmirror forget gm0p1
  • gmirror forget gm0p2
  • gmirror forget gm0p3

パーティション情報のコピー

  • gpart backup ada0 | gpart restore -F /dev/ada2

ミラーへの追加

  • gmirror insert gm0p1 /dev/ada2p1
  • gmirror insert gm0p2 /dev/ada2p2
  • gmirror insert gm0p3 /dev/ada2p3

GPTラベルの追加

  • gpart modify -i 1 -l boot ada2
  • gpart modify -i 2 -l swap ada2
  • gpart modify -i 3 -l rootfs ada2

rebuild が終わるまで待つ

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment