> man pvremove
PVREMOVE(8) System Manager's Manual PVREMOVE(8)
NAME
pvremove — remove a physical volume
SYNOPSIS
pvremove [--commandprofile ProfileName] [-d|--debug]
[-h|--help] [-t|--test] [-v|--verbose] [--version]
[-f[f]|--force [--force]] [--reportformat {basic|json}]
[-y|--yes] PhysicalVolume [PhysicalVolume...]
DESCRIPTION
pvremove wipes the label on a device so that LVM will no
longer recognise it as a physical volume.
OPTIONS
See lvm(8) for common options.
-ff, --force --force
Force the removal of a physical volume belonging to an
existing volume group. Normally vgreduce(8) should be
used instead of this command. You cannot remove a
physical volume which in use by some active logical
volume.
-y, --yes
Answer yes to all questions.
SEE ALSO
lvm(8), pvcreate(8), pvdisplay(8), vgreduce(8)
Sistina SoftwaLVMUTOOLS 2.02.166(2)-RHEL7 (2016-09-28) PVREMOVE(8)
尋ねる:なぜ「f」が2つの個人ですか?
ベストアンサー1
--please-destroy-my-drive
これはオプションと同様の安全スイッチですhdparm
。基本的に、プログラムはこれらの作業を拒否しますが(何かが破損する可能性があるため)、自分が何をしているのか(少なくとも想像の中で)実際に知っている人のための上書きオプションがあります。
プログラム自体で提供される説明(既に引用したマンページに加えて)
# pvremove /dev/loop0
PV /dev/loop0 is used by VG foobar so please use vgreduce first.
(If you are certain you need pvremove, then confirm by using --force twice.)
# pvremove --force /dev/loop0
PV /dev/loop0 is used by VG foobar so please use vgreduce first.
(If you are certain you need pvremove, then confirm by using --force twice.)
# pvremove --force --force /dev/loop0
WARNING: PV /dev/loop0 is used by VG foobar
Really WIPE LABELS from physical volume
"/dev/loop0" of volume group "foobar" [y/n]? y
WARNING: Wiping physical volume label from /dev/loop0 of volume group "foobar"
Labels on physical volume "/dev/loop0" successfully wiped.
実際にはこれをしたくないので、使用後に確認を要求することもあります-ff
(対話モードで実行している場合)。
なぜ--force
2回、1回では十分ではありませんか? LVMはあまり重要ではない作業のために他の場所で使用されるため、他のLVMコマンドで単一のLVMを使用することに精通している人--force
にアピールすることができます。--force