2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

RAID Z2の構築、運用

Last updated at Posted at 2015-07-08

CentOS 6.5

ステップ1: zfsサービスの導入

まず、以下のサービスをyumる。

yum install zlib-devel libuuid-devel lsscsi

splとzfsを取ってきて、rpmパッケージをインストールする。
http://zfsonlinux.org/

./configure
make rpm
rpm -Uvh *.x86_64.rpm

ステップ2: partedでHDDにラベルをつける

全てのHDDにラベル付けを行う。

parted /dev/任意のid
(parted) mklabel gpt
(parted) quit

ステップ3: zfsでプールを作成し、マウントを行う。

  1. zpool create zfspool raidz2 全てのHDDのシリアルナンバー spare HDDのシリアルナンバー
  2. zfs create zfspool/raid2
  3. zfs set mountpoint=ディレクトリ zfspool/raid2
  4. zfs mount -a

ステータス確認

zpool status -v: ステータス

交換方法

  1. zpool replace 壊れたシリアル spareのシリアル
  2. % doneでチェック
  3. zpool detach 壊れたシリアル
  4. HDDを外し、新しいのをつける
  5. zpool add spare シリアル

コメント

rebootで自動マウントがされない場合

selinuxが起動している可能性あり、getenforceで確認
vi /etc/selinux/configで編集

2
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?