[CentOS] Changing ext3 Partition Size

Fri Feb 8 16:37:28 UTC 2008
William L. Maltby <CentOS4Bill at triad.rr.com>

On Fri, 2008-02-08 at 10:17 -0600, Scott Moseman wrote:
> I have an ext3 partition from our SAN.  The size was increased.
> I am attempting to re-size this specific ext3 partition, obviously.
> 
> I unmount the partition, run fdisk, change the cyls, and save...
> 
> WARNING: Re-reading the partition table failed with error 22: Invalid argument.
> The kernel still uses the old table.
> The new table will be used at the next reboot.
> 
> And that is the message that I receive after I attempt the save.
> I did attempt a reboot to see if it did anything, but it did not help.

Other partitions on the (apparent) device in use? If so, you need to
umount them and then (I use) sfdisk -R <your device>. If the fdisk
changes were written to the device, this should reload the kernel's view
of that device.

BTW, *before* shrinking the partition, be sure the (live?) file system
has been shrunk (if shrinking). If enlarging, do the resize2fs *after*
the kernel knows about the new size.

Other: if LVM is active on that partition or device, it also needs to be
inactive ATT the fdisk/sfdisk is done. This means that LVM meta-data for
the partition may be incorrect after changes have bee done.

> 
> Thanks,
> Scott
> <snip sig stuff>

I *think* I got all that right.

HTH
-- 
Bill