linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
* [linux-lvm] Is it considered safe to resize a mounted partition (root filesystem) with lvextend
@ 2016-11-10  7:12 Kevin Wilson
  2016-11-10 11:22 ` Andy Smith
  0 siblings, 1 reply; 2+ messages in thread
From: Kevin Wilson @ 2016-11-10  7:12 UTC (permalink / raw)
  To: linux-lvm

Hello,

Is it safe to extend a mounted partition ?
For example,
lvextend --size +9G --resizefs /dev/mapper/vg_paeiserver5-lv_my_partition

when
/dev/mapper/vg_paeiserver5-lv_my_partition is mounted ?

I cannot simply unmount that partition as it is the root filesystem
"/" is hosted on it. I can reboot to a second partition as this
is a dual boot machine, and from there run that lvextend, as
/dev/mapper/vg_paeiserver5-lv_my_partition is not mounted there. But I
prefer doing it without boot if it is considered safe
to perform this on a booted partition.

If I try it I get:
"on-line resizing required" message, which I am not sure what it means.
and "df -h" show that the partition was indeed increased by 20GB.

lvextend --size +20G --resizefs /dev/mapper/vg_paeiserver5-lv_my_partition
  Extending logical volume lv_ubuntu to 34.00 GiB
  Logical volume lv_ubuntu successfully resized
resize2fs 1.42.9 (4-Feb-2014)
Filesystem at /dev/mapper/vg_paeiserver5-lv_my_partition is mounted on
/; on-line resizing required
old_desc_blocks = 1, new_desc_blocks = 3
The filesystem on /dev/mapper/vg_paeiserver5-lv_my_partition is now
8912896 blocks long.

Regards,
Kevin

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

* Re: [linux-lvm] Is it considered safe to resize a mounted partition (root filesystem) with lvextend
  2016-11-10  7:12 [linux-lvm] Is it considered safe to resize a mounted partition (root filesystem) with lvextend Kevin Wilson
@ 2016-11-10 11:22 ` Andy Smith
  0 siblings, 0 replies; 2+ messages in thread
From: Andy Smith @ 2016-11-10 11:22 UTC (permalink / raw)
  To: linux-lvm

Hi Kevin,

On Thu, Nov 10, 2016 at 09:12:58AM +0200, Kevin Wilson wrote:
> Is it safe to extend a mounted partition ?

Yes, if the tool you would use without LVM (e.g. resize2fs) is safe
for that. LVM just uses the appropriate tool, in your case
resize2fs, which can handle on-line resize.

> If I try it I get:
> "on-line resizing required" message, which I am not sure what it means.

It means that resize2fs has detected that the device is mounted and
so is doing an on-line resize. It is merely informational. That
message comes from resize2fs and so this is not really an LVM
question.

As you can see…

> lvextend --size +20G --resizefs /dev/mapper/vg_paeiserver5-lv_my_partition
>   Extending logical volume lv_ubuntu to 34.00 GiB
>   Logical volume lv_ubuntu successfully resized

…from this point on the output comes from the resize2fs program.

> resize2fs 1.42.9 (4-Feb-2014)
> Filesystem at /dev/mapper/vg_paeiserver5-lv_my_partition is mounted on
> /; on-line resizing required
> old_desc_blocks = 1, new_desc_blocks = 3
> The filesystem on /dev/mapper/vg_paeiserver5-lv_my_partition is now
> 8912896 blocks long.

Cheers,
Andy

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

end of thread, other threads:[~2016-11-10 11:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-10  7:12 [linux-lvm] Is it considered safe to resize a mounted partition (root filesystem) with lvextend Kevin Wilson
2016-11-10 11:22 ` Andy Smith

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).