Re: [linux-lvm] Partition resizing and whatnot

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

 



John Moser <jmoser@erc.wisc.edu> wrote:
> So, after installation the ATA update patches that people recommended,
> I now have a linux system that recognizes the full 160 gigabytes of
> disk space on my disks.  However, I'm not entirely sure as to how I
> should go about resizing my filesystem.  I'm already well aquanted
> with adding disks to existing filesystems and growing them.

??? You can't add a disk to a filesystem.

You can put a PV on a disk and add that to a VG.

(Or, possibly, you could add a disk to the end of a linear MD group,
although this would be pointless with LVM.)

> However, what are the recommended steps for taking existing disk
> partitions, resizing them to fill the disks they reside on,

I wouldn't recommend trying to go down this path:
  Resizing the partitions would be no problem, just use fdisk to delete
  the existing partition and create a new one with the same start point,
  but with a higher end point. The problem would be resizing the PVs,
  which I don't think is supported. So I don't think it would be a good
  idea to go down this path.

Surely the obvious way to do it is:

(a) Using fdisk, create new partition(s) in the newly-usable tail end(s)
    of your disk(s)

(b) *** Re-boot. The kernel cannot re-interpret a partition table if any
    of the partitions are in use. In all probability you will have
    partitions in use on that/those disk(s) so you will need to re-boot
    to make the kernel re-interpret the partition table(s).

(b) create PVs in the new partitions (pvcreate)

(c) add the PVs to your VG(s) (vgextend)

Your VG will then be larger by the amount of PEs which could be fitted
into the new PVs in the new partitions. You can then extend your LVs at
your leisure.

You will probably lose a tiny bit at the end of the existing partitions,
and you may be able to fit one less PE in your new partition(s), because
the size of your existing partitions will probably not be exact
multiples of the PE size, but it's not worth worrying about.

> and then resizing the LVM/e2fs filesystems that use those disks?

??? Unrelated ? This is all basic stuff to do with LV side. Just follow
the documentation: umount ... / e2fsadm ... / mount ... . (Just make
sure you have a suitably up-to-date version of ext2resize; I use version
1.1.17.)

Regards,

Bill
-- 
William H. Blunn - bill+linuxlvm@tao-group.com
Tao
62/63 Suttons Business Park, Earley, READING, RG6 1AZ, United Kingdom
Tel: +44 118 901 2999 - Fax: +44 118 901 2963 - http://tao-group.com/


_______________________________________________
linux-lvm mailing list
linux-lvm@sistina.com
http://lists.sistina.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://www.sistina.com/lvm/Pages/howto.html

[Index of Archives]     [Gluster Users]     [Kernel Development]     [Linux Clusters]     [Device Mapper]     [Security]     [Bugtraq]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]

  Powered by Linux