[TriLUG] Resizing partition with ext3 file system

Mailing List maillist at shenadoahkennels.net
Sun Jan 23 15:01:41 EST 2005


Rick DeNatale wrote:
> On Sun, 23 Jan 2005 11:14:58 -0500, Jason Tower <jason at cerient.net> wrote:
> 
>>i just resized a ext3 filesystem yesterday (grew a LVM logical volume)
>>using resize2fs.  you'll have to umount it first and run fsck -f.  no
>>converting from ext3 to 2 or vice versa should be necessary.
>>
>>jason
> 
> 
> Thanks Jason. So just to make sure that my feeble little mind is
> getting this, here are the steps I think I need to take:
> 
> 1. take proper steps to temporarily stop further backups, just in case
> I can't get all this done before the next backup is scheduled (every 4
> hours).
> 2. unmount the snapshot device (both the r/w mounting to
> /root/snapshot for root only access, and the r/o nfs mount to
> /snapshot for others).
> 3. run fdisk and delete the partition and recreate it at the same
> first cylinder but larger.  I understand that this WILL leave the
> existing data in place.
> 4. execute (sudo?) resize2fs /dev/hdc2
> 5. execute (sudo?) fsck -f  /dev/hdc2 
> 6. remount /root/snapshot and /snapshot
> 7. let loose the backup cron job.
> 8. bob's yer uncle
> 
> 'ave I got it perfesser 'iggins?

Umm there is a difference.  If you are NOT using LVM them Jason's case 
does not apply and I am not sure that deleting the partition with fdisk 
will work...  I think that once you fry the partition table and inode 
relationship that you are out of luck.  If you are keeping an 
incremental backup and you have no worries bout killing the data that is 
in the backup set then go ahead BUT if you need to keep the stuff in the 
backup set then I would look at offloading it, killing the partition, 
recreating the partition as LVM, and using LVM on it from this point on. 
  That will allow you to enlarge on the fly and even shrink partitions 
as long as you ensure that you don't go below the size of your data.

Just my .02

Matthew Lavigne



More information about the TriLUG mailing list