All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zdenek Kabelac <zdenek.kabelac@gmail.com>
To: "LVM general discussion and development" <linux-lvm@redhat.com>,
	"VESELÍK Jan" <jveselik@csob.cz>
Subject: Re: [linux-lvm] LVM2 - pvresize alert
Date: Tue, 12 Dec 2017 16:22:15 +0100	[thread overview]
Message-ID: <2c45e680-f84d-b067-dd52-684e45560b6a@gmail.com> (raw)
In-Reply-To: <VI1PR05MB15032E32F70BEB2B14AABE56D1340@VI1PR05MB1503.eurprd05.prod.outlook.com>

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

      reply	other threads:[~2017-12-12 15:22 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-12 13:13 [linux-lvm] LVM2 - pvresize alert VESELÍK Jan
2017-12-12 15:22 ` Zdenek Kabelac [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2c45e680-f84d-b067-dd52-684e45560b6a@gmail.com \
    --to=zdenek.kabelac@gmail.com \
    --cc=jveselik@csob.cz \
    --cc=linux-lvm@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.