Operating System - Linux
1753437 Members
4642 Online
108794 Solutions
New Discussion юеВ

Re: Online resizing Linux disks & filesystems

 
noldi
Valued Contributor

Online resizing Linux disks & filesystems

Hello,

in a somewhat follow on question to the QLogic
Multipath thread http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=954749
I experimented with the online filesystem resize theme.

When I grow a LUN on an EVA, how do I make that
added space at the end of the LUN available to
the filesystem while it is online?

It seems that I'm struggling with the issue of
extending the partition table, since the
command "ext2online" requires the underlying
SCSI device/partition to be extended in order
to successfully extend the ext3 filesystem.
Something I managed to get done only after an
umount/mount of the said device.

Anybody knows a reasonable approach to extend
a Linux (RH EL 4.0, kernel 2.6) filesystem
online?

Thank's again & best Regards,

Arnold Sutter, Tristar/redIT
16 REPLIES 16
Ivan Ferreira
Honored Contributor

Re: Online resizing Linux disks & filesystems

I think that you will need LVM to extend the size of a partition/volume online, using the lvextend command.

So, after growing the VDISK in the EVA, you should run lvextend and then ext2online.

OR

You can try using parted, parted has the resize partition command, but normally, partitions changes are not detected until next reboot on mounted disks.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
noldi
Valued Contributor

Re: Online resizing Linux disks & filesystems

Hello Ivan,

thank's for your response.

I've thought about the LVM approach too, but
for this I would have to extend the
underlying physical disk (something like
"pvextend" or "pvresize"), which again would
require an online extension to the partition
table, something that doesn't seem to be
easily available.

Any other thoughts?

Best Regards,

Arnold Sutter, Tristar/redIT
Andrej Vavro
Frequent Advisor

Re: Online resizing Linux disks & filesystems

I played with it some time ago. It is (was) not possible to resize online. fdisk to create a partition and then reboot to re-read partition table.

regards,
Andrej
Matthew_50
Valued Contributor

Re: Online resizing Linux disks & filesystems

if you would like to use ext2online to extend/reduce filesystem on the fly, your kernel have to support the option. which means you might need to re-config your kernel.
Ivajlo Yanakiev
Respected Contributor

Re: Online resizing Linux disks & filesystems

I have LVM and I can on line resize my FS without any problem.
You no need lvextend ext2online make lvextend for you.
noldi
Valued Contributor

Re: Online resizing Linux disks & filesystems

Hello all,

one way we do it with EVA is the following:

1) Extend the size of the LUN on the storage
subsystem with additional space at the end.

2) Modify the disk partition, so the
additional space is available to the system

3) Extend the filesystem in order to make
use of the additional space of the device

It seems that step 2 is the problem here.

Of course, I can always add an additional
LUN to the LVM volume group and extend the
logical volume. But this might not always
be desired if I want to extend the EXISTING
device.

Best Regards,

Arnold Sutter, Tristar/redIT
Ivan Ferreira
Honored Contributor

Re: Online resizing Linux disks & filesystems

Hi noldi, the step 2 can you do it ONLINE?

That means, can you modify the partition after growing the VDISK in the EVA, without dismount/reboot the system?
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
noldi
Valued Contributor

Re: Online resizing Linux disks & filesystems

Ivan,

that's exactly the point. So far, I could
not successfully execute Step 2 online
without dismount/mount'ing the device.

Best Regards,

Arnold
Steven E. Protter
Exalted Contributor

Re: Online resizing Linux disks & filesystems

resize2fs ??

In most SAN environments when space is added on the SAN you have to boot the box to get the space recognized.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com