Dne 12.12.2017 v 14:13 VESELÍK Jan napsal(a):
Hello,
I would like to suggest small tweak in command pvresize. If you use parameter
–setphysicalvolumesize, you will get only pasive wargning with this
potentially dangerous action. In comparrison to lvresize with parameter –L -,
meaning making logical volume smaller, you receive warning and prompt to
continue.
Is it possible to implement this kind of prompt to enter yes or no before
every lvm action that could pottentially lead to data loss.
Hi
Latest versions (>= 2.02.171) of lvm2 provides this prompt:
# pvs
PV VG Fmt Attr PSize PFree
/dev/loop0 vg lvm2 a-- <30,00g <30,00g
# pvresize --setphysical 1T /dev/loop0
WARNING: /dev/loop0: Overriding real size 30,00 GiB. You could lose data.
/dev/loop0: Requested size 1,00 TiB exceeds real size 30,00 GiB. Proceed? [y/n]:
Regards
Zdenek
_______________________________________________
linux-lvm mailing list
linux-lvm@redhat.com
https://www.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/