4
4

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.

LVのtableをerrorにしたりlinearに戻したり

Posted at

今の状態を確認する。

# dmsetup table
testvg-iscsi1: 0 409600 linear 8:5 2048

errorのテーブルを作る。サイズはさっきのに合わせる。

# cat iscsi1_err.table
0 409600 error

元のlinearのtableも作っておく。

# cat iscsi1.table
0 409600 linear 8:5 2048

tableをreloadしてからsuspend、resumeして新しいtableを有効にする。

# dmsetup reload /dev/mapper/testvg-iscsi1 iscsi1_err.table
# dmsetup suspend /dev/mapper/testvg-iscsi1
# dmsetup resume /dev/mapper/testvg-iscsi1
# dmsetup status /dev/mapper/testvg-iscsi1
0 409600 error

元のtableに戻す。

# dmsetup reload /dev/mapper/testvg-iscsi1 iscsi1.table
# dmsetup suspend /dev/mapper/testvg-iscsi1
# dmsetup resume /dev/mapper/testvg-iscsi1
# dmsetup status /dev/mapper/testvg-iscsi1
0 409600 linear
4
4
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
4
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?