Re: LVM question

From: Aleksandar Milivojevic (amilivojevic_at_pbl.ca)
Date: 04/21/05

  • Next message: Touriste: "Re: 3 questions :)"
    Date: Thu, 21 Apr 2005 08:42:59 -0500
    To: For users of Fedora Core releases <fedora-list@redhat.com>
    
    

    Nitai @ ComputerOil wrote:
    > Hi all,
    >
    > I have a huge problem, with that I installed on a 25GB Partiton WinXP
    > and then run the FC3 installer. With disk Druid I made a partition for
    > swap (2GB), one for /boot, one for /home (10GB) and another for /
    > (10GB). So, this made up another 25GB of my HardDisk.
    >
    > Now the problem ist that I have a 80GB HardDisk and that I have another
    > FreeSpace of 29GB which I somehow cant access anymore, because the Linux
    > Installer made the /, swap and /home to a LVM Volume.
    >
    > Does anymore know how I can get the remaining 29GB back? Better would be
    > to have them as Fat32 partitioned so I can access them with WinXP.

    ...

    > vgdisplay:
    >
    > --- Volume group ---
    > VG Name VolGroup00
    > VG Size 50.00 GB
    > PE Size 32.00 MB
    > Total PE 1600
    > Alloc PE / Size 688 / 21.50 GB
    > Free PE / Size 912 / 28.50 GB

    This is strange. Have you used "autopartition" feature, or have you
    created partitions completely by hand? If you used "autopartition"
    feature, maybe you should make a bug report. If you created them by
    hand, well, than the only possibility is that you told installer to use
    all available space for LVM partition.

    I don't think there's much you can do now, since pvresize command is not
    yet implemented. If you have 20GB+ disk somewhere, you might try
    popping it into the machine and doing something as described below. If
    you don't, your only option might be to reinstall Linux from scratch,
    but this time, make sure you size your partitions appropriately.

    I'll assume new disk is /dev/hdb, and you are going to create single
    primary partition /dev/hdb1.

    Also, from the above output, it is not visible on which partition your
    current physical volume is. Output of "pvdisplay" or "p" command in
    fdisk would show that. I'll assume it is /dev/hda3 (probably isn't).

    Change device names appropriately.

    # fdisk /dev/hdb

    create partition on it, and mark it as type 8e (Linux LVM). The size
    must be at least what "Alloc PE / Size" line from vgdisplay output says.

    Now, import the partition into LVM (create physical volume on it):

    # pvcreate /dev/hdb1

    Add this new physical volume to volume group

    # vgextend VolGroup00 /dev/hdb1

    Remove the "old" physical volume. This will probably take some time to
    complete (20GB+ of data needs to be moved from one disk to another):

    # vgreduce VolGroup00 /dev/hda3 <- change to match your real PV

    Remove the "old" partition from LVM system:

    # pvremove /dev/hda3 <- same thing

    Repartition the disk:

    # fdisk /dev/hda

    delete partition where PV was, create new one with correct size (which,
    again, must be at least what "Alloc PE / Size" line from vgdisplay
    output says). Make sure you tag partition as type 8e (Linux LVM). You
    may also create new FAT32 partition in this step. Make sure you tag
    that partition as type b (FAT32).

    Now, this steps are basically the same thing as above. We are just
    moving things where they were, so that you can remove second disk from
    the system.

    # pvcreate /dev/hda3
    # vgextend VolGroup00 /dev/hda3
    # vgreduce VolGroup00 /dev/hdb1
    # pvremove /dev/hdb1

    -- 
    Aleksandar Milivojevic <amilivojevic@pbl.ca>    Pollard Banknote Limited
    Systems Administrator                           1499 Buffalo Place
    Tel: (204) 474-2323 ext 276                     Winnipeg, MB  R3T 1L7
    -- 
    fedora-list mailing list
    fedora-list@redhat.com
    To unsubscribe: http://www.redhat.com/mailman/listinfo/fedora-list
    

  • Next message: Touriste: "Re: 3 questions :)"

    Relevant Pages

    • Re: What are the advantages of LVM?
      ... If you want to learn more about LVM these two web sites can get you ... PartitionMagic or whatever) to split the disk up into partitions. ... or from another partition and run cfdisk or fdisk to set the ... Unfortunately, once I did partition the hard disk, I forgot to mark / as ...
      (Ubuntu)
    • Re: Hosed Grub with the push of a button
      ... occupies part of the LVM. ... I don't think the developers of the program counted on some crazy button changing the partition table with one touch. ... Did it write over that portion of the disk or did it actually format the portion and place information from some storage chip on the mother board. ... My guess would be that the motherboard has a chip inside that has a compressed image of what was originally installed on the computer, like what a install CD would have. ...
      (Fedora)
    • Re: Linux community software-update-anarchy polemic
      ... Remember, I'm just a monkey. ... That implies that if you have one disk per partition, ... Trust the kernel or don't trust the kernel, but either way, both ...
      (comp.os.linux.misc)
    • Re: to lvm or not to lvm?
      ... have the optimal size and this is very doable with LVM, ... cabinet, storage cabinet(s with drawers full of disk), Multi-path SAN ... A typo in a script can do more harm in 20 ... As long as it's not possible for a growing partition to take space away ...
      (Debian-User)
    • iBook 800Mhz install: done
      ... have enough space available on the target machine to hold a Leopard DVD's worth plus do the upgrade ... Using Disk Utility, create a partition to hold the Leopard installer. ...
      (uk.comp.sys.mac)