[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[linux-lvm] Resizing an ext3 file system after extending a logical volume group



Dear All:

I apologize if this has been asked before, but I can't find a way to search the list archives:

How do you safely resize an ext3 filesystem after extending a logical volume?

I am adding a new hard drive to increase the size of my logical volume "home1" in logical volume group "home" with LVM2 under Ubuntu 6.10.1 LTS.  The instructions in the LVM Howto are pretty straightforward; the only part that spooks me is the resizing of the ext3 filesystem.  This is what I have done so far:

(installed new hardware & partitioned with fdisk; shows up as /dev/sdb1)
(backed up the existing logical volume in case something bad happens)

# pvcreate /dev/sdb1
  Physical volume "/dev/sdb1" successfully created

# vgextend home /dev/sdb1
  Volume group "home" successfully extended

# lvextend -l 357700 /dev/home/home1
  Extending logical volume home1 to 1.36 TB
  Logical volume home1 successfully resized

From what I googled, the next steps are a bit more involved for LVM2 than the Howto lets on.  Does the following look o.k. to the experts:

' use a root login, not su or sudo, because /home will be unmounted

# umount /dev/home/home1 ' the next steps should be done off-line

# e2fsck -C 0 -v dev/home/home1 ' make sure the file system is ok

# tune2fs -O ^has_journal /dev/home/home1 'disable journaling on the logical volume

# resize2fs /dev/home/home1 'do the resizing

# e2fsck -C 0 -v dev/home/home1 ' make sure the file system is still ok

# tune2fs -O has_journal /dev/home/home1 're-enable journaling

# e2fsck -C 0 -v dev/home/home1 ' yes, I am a first-timer and somewhat paranoid

# mount /dev/home/home1 /home ' back on-line

Thanks in advance for any help,

microscope


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]