[Novalug] Upgrading with LVM

Peter Larsen peter@peterlarsen.org
Tue Aug 19 18:53:07 EDT 2014


On 08/19/2014 01:37 PM, Jon LaBadie via Novalug wrote:
> On Tue, Aug 19, 2014 at 12:49:48PM -0400, covici--- via Novalug wrote:
>> -r will not work for shrinking since you have to do the resize first
>> before you use lvreduce.
>>
>> Peter Larsen <peter@peterlarsen.org> wrote:
>>
>>> No - that's what the -r does. It's one operation.
>>>
>>>        -r, --resizefs
>>>               Resize underlying filesystem together with the logical
>>> volume using fsadm(8).
>>>
> On a Fedora 20 system, I created a new LV (vgData/lvplay) and new ext4
> filesystem on lvplay, then mounted it on /play.
>
> When I attempted to shrink the LV and FS using lvreduce I got:
>
>     # lvreduce -r -L 18GB /dev/vgData/lvplay
>     Do you want to unmount "/play"? [Y|n] n
>     fsadm: Cannot proceed with mounted filesystem "/play"
>       fsadm failed: 1
>       Filesystem resize failed.
>     #
>
> Then I tried to shrink just the FS:
>
>     # resize2fs /dev/vgData/lvplay 18G
>     resize2fs 1.42.8 (20-Jun-2013)
>     Filesystem at /dev/vgData/lvplay is mounted on /play;
>     on-line resizing required
>     resize2fs: On-line shrinking not supported
>     #
>
> Jon

umount it first. Resize, then mount it back. Only root file systems
requires you to be in a recovery console.

-- 
Regards
  Peter Larsen




More information about the Novalug mailing list