LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   lvm extend on running file system (https://www.linuxquestions.org/questions/linux-newbie-8/lvm-extend-on-running-file-system-913183/)

drManhattan 11-12-2011 10:55 AM

lvm extend on running file system
 
Hi

I wonder can I extend file system and lvm volume on running server.
File system is being used when I want to extend its size.

Can I do this without any danger to file system itself ?

ths for help.

catkin 11-12-2011 11:58 AM

LVM volume: Yes. File system: depends on the file system.

No -- there is always a small possibility of something going wrong.

drManhattan 11-13-2011 10:58 AM

I have ext3 fs.

How can I do it without downtime ?

hen770 11-13-2011 11:16 AM

The fs itself couldn't be resized when it's mounted and in use, take full backup if you try to force it, but in case it fails you have more downtime, so better to do do it unmounted.

drManhattan 11-13-2011 01:05 PM

thx for info.

But if I perform fs extension while fs is mounted but there is no I/O operations ?

syg00 11-13-2011 04:51 PM

Not (necessarily) true.
Ext3 has supported online resize for some time (years). Extending the f/s can be done online, is supported, and works (for me). Check "man resize2fs".

A backup is always prudent.

hen770 11-15-2011 04:02 AM

Yep, my mistake there, you can resize you ext3 or ext4 fs with resize2fs (as long as the kernel supports it [from the man page]).
I have did it today with my /root ext4 partition that was on a 10G logical volume but the fs itself was just 7G, so with the /root partition mounted as root I have used resize2fs /dev/mapper/system-root (my lv name), and it became 10G in 2 sec.


All times are GMT -5. The time now is 08:09 PM.