All of lore.kernel.org
 help / color / mirror / Atom feed
* [linux-lvm] LVM2 - pvresize alert
@ 2017-12-12 13:13 VESELÍK Jan
  2017-12-12 15:22 ` Zdenek Kabelac
  0 siblings, 1 reply; 2+ messages in thread
From: VESELÍK Jan @ 2017-12-12 13:13 UTC (permalink / raw)
  To: linux-lvm

[-- Attachment #1: Type: text/plain, Size: 2674 bytes --]

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.

Thank you for consideration and have a great day.


Best regards


Jan Veselik
Administrátor
Československá obchodní banka, a. s.
Linux Servery
Radlická 714/113a
158 00 Praha 5

e-mail: jveselik@csob.cz<mailto:jveselik@csob.cz>
http://www.csob.cz/
Je nutné tento e-mail tisknout? Myslete na životní prostředí.

:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

Pravni informace: Tento e-mail a vsechny pripojene soubory (i) jsou duverne a mohou byt chraneny zakonem a (ii) nejsou navrhem na uzavreni smlouvy, ledaze jsou jako navrh na uzavreni smlouvy vyslovne oznaceny. Tento e-mail je urcen pouze uvedenemu prijemci a dalsim osobam, ktere  jsou jmenovite uvedeny jako prijemci. Jestlize nejste opravneny prijemce, pak jakakoliv forma zverejneni, reprodukce, kopirovani, distribuce nebo sireni je prisne zakazana. Pokud jste obdrzel tento e-mail omylem, oznamte to, prosim, neprodlene jeho odesilateli a pak jej vymazte. CSOB neruci za bezchybny a uplny prenos zasilanych informaci, ani za zpozdeni nebo preruseni prenosu a ani za skody zpusobene pouzitim nebo duverou v tyto informace.

Legal Disclaimer: This e-mail and any attached files (i) are confidential and may be legally privileged and (ii) do not constitute any proposal for conclusion of an agreement, unless they are expressly designated as such. If you are not the addressee, any disclosure, reproduction, copying, distribution, or other dissemination or use of this communication is strictly prohibited. If you have received this transmission in error please notify CSOB immediately and then delete this e-mail. CSOB does not accept liability for the correct and complete transmission of the information, nor for any delay or interruption of the transmission, nor for damages arising from the use of or reliance on the information. All e-mail messages addressed to, received or sent by CSOB or CSOB employees are deemed to be professional in nature. Accordingly, the sender or recipient of these messages agrees that they may be read by other CSOB employees than the official recipient or sender in order to ensure the continuity of work-related activities and allow supervision thereof.

[-- Attachment #2: Type: text/html, Size: 7224 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [linux-lvm] LVM2 - pvresize alert
  2017-12-12 13:13 [linux-lvm] LVM2 - pvresize alert VESELÍK Jan
@ 2017-12-12 15:22 ` Zdenek Kabelac
  0 siblings, 0 replies; 2+ messages in thread
From: Zdenek Kabelac @ 2017-12-12 15:22 UTC (permalink / raw)
  To: LVM general discussion and development, VESELÍK Jan

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-12-12 15:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-12 13:13 [linux-lvm] LVM2 - pvresize alert VESELÍK Jan
2017-12-12 15:22 ` Zdenek Kabelac

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.