From: Peter Rajnoha <prajnoha@redhat.com>
To: rrdavis@ucdavis.edu
Cc: LVM general discussion and development <linux-lvm@redhat.com>
Subject: Re: [linux-lvm] Can't mount LVM RAID5 drives
Date: Tue, 22 Apr 2014 13:14:20 +0200 [thread overview]
Message-ID: <53564F0C.3080402@redhat.com> (raw)
In-Reply-To: <006a01cf5b33$47f5bb20$d7e13160$@edu>
On 04/18/2014 08:23 PM, Ryan Davis wrote:
> Hi Peter,
>
> I made a backup copy of /dev/sdc using dd as you suggested. This took a
> while to get a drive to copy this data to.
>
> I started today with the resizing of the LV and hit a few snags and was
> wondering if you could shine some light on what is going on.
>
> #pvdisplay --maps /dev/sdc1
>
> --- Physical volume ---
> PV Name /dev/sdc1
> VG Name vg_data
> PV Size 3.64 TB / not usable 3.97 MB
> Allocatable yes (but full)
> PE Size (KByte) 4096
> Total PE 953668
> Free PE 0
> Allocated PE 953668
> PV UUID 8D67bX-xg4s-QRy1-4E8n-XfiR-0C2r-Oi1Blf
>
> --- Physical Segments ---
> Physical extent 0 to 953667:
> Logical volume /dev/vg_data/lv_home
> Logical extents 0 to 953667
>
>
> Is the Allocatable yes (but Full) a deal breaker?
>
That's OK and it's not a stopper here...
> # lvchange -an /dev/vg_data/lv_home
>
> [root@hobbes ~]# lvscan
> inactive '/dev/vg_data/lv_home' [3.64 TB] inherit
>
> [root@hobbes ~]# lvreduce -r -l -1 /dev/vg_data/lv_home
> Logical volume lv_home must be activated before resizing filesystem
>
Ah, I see. Well, we have to do that a bit more manually then...
> [root@hobbes ~]# pvresize /dev/sdc1
> /dev/sdc1: cannot resize to 953667 extents as 953668 are allocated.
> 0 physical volume(s) resized / 1 physical volume(s) not resized
>
>
> What should I do now? Did I miss something along the way?
>
This should do the job then (I've tried this exact sequence on my machine):
- deactivate the problematic LV:
lvchange -an vg_data/lv_home
- reduce the size of the LV by 1 extent:
lvreduce -l -1 vg_data/lv_home
- make the PV size to be in sync with the real device size:
pvresize /dev/sdc1
- activate the LV:
lvchange -ay vg_data/lv_home
- run fsck for the FS on the LV:
e2fsck -f -n /dev/vg_data/lv_home
- resize the FS to be in sync with new LV size:
fsadm resize /dev/vg/lvol0
- check the resized filesystem:
e2fsck /dev/vg_data/lv_home
Let me know if it works for you.
--
Peter
next prev parent reply other threads:[~2014-04-22 11:14 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-04 21:32 [linux-lvm] Can't mount LVM RAID5 drives Ryan Davis
2014-04-07 13:22 ` Peter Rajnoha
2014-04-09 16:07 ` Ryan Davis
2014-04-10 14:10 ` Peter Rajnoha
2014-04-10 14:14 ` Peter Rajnoha
2014-04-18 18:23 ` Ryan Davis
2014-04-22 11:14 ` Peter Rajnoha [this message]
2014-04-22 18:43 ` Ryan Davis
2014-04-23 7:59 ` Zdenek Kabelac
2014-04-23 16:56 ` Ryan Davis
2014-04-24 9:38 ` Zdenek Kabelac
-- strict thread matches above, loose matches on Subject: below --
2014-04-10 15:35 Ryan Davis
2014-04-10 16:40 ` Peter Rajnoha
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=53564F0C.3080402@redhat.com \
--to=prajnoha@redhat.com \
--cc=linux-lvm@redhat.com \
--cc=rrdavis@ucdavis.edu \
/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.