linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
From: Marian Csontos <mcsontos@redhat.com>
To: LVM general discussion and development <linux-lvm@redhat.com>
Cc: Harold Pimentel <haroldpimentel@gmail.com>
Subject: Re: [linux-lvm] Removing a (potentially unused?) PV from a VG
Date: Tue, 12 Feb 2013 10:53:44 +0100	[thread overview]
Message-ID: <511A1128.9060405@redhat.com> (raw)
In-Reply-To: <CAGvHCLnuhJXDKSRV5Sp5UkwoR9pGnb_9+Jhb1=eQN-=JP_N0eQ@mail.gmail.com>

On 02/08/2013 09:18 PM, Harold Pimentel wrote:
> Hi all,
>
> So, I have the following setup:
>
> - Ubuntu 12,04
> - 1 6TB physical volume (the one with data) [ext4]
> - 1 13TB PV (no data... I think?) [ext4]
>
> Here is the story...
>
> - I created an ext4 on the 13TB PV, added the 13TB to the VG to make a
> 13TB volume group.

Moment. Why creating ext4 on the PV first?
You added PV to VG first, I guess.

> - Everything went fine and then I ran:
>
> Code:
>
> resize2fs /dev/volgroup/volume
>
>
> And to my surprise.. I couldn't resize past 16TB ! (crap! should have
> checked this first!).

OK, so did it resize to 16TB, right? So now you have 16TB FS over two 
PVs: 6TB + 10TB. You need to downsize the FS first.

Also, when resizing LVs, it is safer to use fsadm, to avoid common 
problem where people shrink LV before FS.

>
> So, nothing happened.. Now what I want to do is remove the 13TB PV
> from the VG and do something else with it... but I get the following
> error:
>
>
> Code:
>
> sudo vgreduce -t home_volume_group /dev/sdc1
>    Test mode: Metadata will NOT be updated.
>    Physical volume "/dev/sdc1" still in use
>
> I don't remember the message, but I was going to try to use pvmove to
> move stuff off of /dev/sdc1 and it failed stating something like "No
> available extents"... which I don't even expect to have anything
> written to that disk since nothing was written after the install.

If above still fails, try `pvmove --alloc anywhere /dev/sdc1`. It may help.

-- Marian

>
> How can I safely remove this PV from the VG?
>
>
> Thanks a bunch!
>
> Harold
>
> _______________________________________________
> 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/

      reply	other threads:[~2013-02-12  9:53 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-08 20:18 [linux-lvm] Removing a (potentially unused?) PV from a VG Harold Pimentel
2013-02-12  9:53 ` Marian Csontos [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=511A1128.9060405@redhat.com \
    --to=mcsontos@redhat.com \
    --cc=haroldpimentel@gmail.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).