How can I transfer space I freed from my Fedora partition to my Ubuntu partition?

761b389db2d5c4f7a902538bc78f49b9 August 24, 2012
Pinterest Stumbleupon Whatsapp

I have a dual-boot system on same hard drive running Fedora 17 and Ubuntu 12.04 (64bit). About 67GB space has been shrunk from Fedora 17, LVM /home. I expect the said free space to be used by Ubuntu, not in LVM partition.

How do I reallocate space freed from LVM to another partition (not in LVM) on the dualboot system?  Please advise! Thanks.

Ads by Google

  1. Declan Lopez
    September 4, 2012 at 11:02 pm

    you could use gparted or run parted magic live from a flash drive.

  2. Sri Swaminathan Vanarasi
    August 28, 2012 at 6:25 pm

    i would suggest Easeus Partition for any such problems.. as partition can be done without formatting the disk

  3. Bruce Epper
    August 24, 2012 at 1:34 pm

    See the instructions here to see how this process should be done. This only works without LUKS encryption.

    • satimisliu
      August 25, 2012 at 4:33 pm

      Hi Bruce Epper,

      Thanks for your link. The whole HD is NOT encrypted.

      I already shunk /dev/mapper/vg_fedora17-lv_hom from 78G to 10G before. There should be about 68G free space available.

      So I started on;
      8. FINALLY - Shrink the PARTITION

      # fdisk -l

      Disk /dev/sda: 160.0 GB, 160041885696 bytes
      255 heads, 63 sectors/track, 19457 cylinders, total 312581808 sectors
      Units = sectors of 1 * 512 = 512 bytes
      Sector size (logical/physical): 512 bytes / 512 bytes
      I/O size (minimum/optimal): 512 bytes / 512 bytes
      Disk identifier: 0x0000d52d

      Device Boot Start End Blocks Id System
      /dev/sda1 * 2048 8263679 4130816 83 Linux
      /dev/sda2 296333310 312580095 8123393 5 Extended
      /dev/sda3 8263680 9287679 512000 83 Linux
      /dev/sda4 9287680 296331263 143521792 8e Linux LVM
      /dev/sda5 296333312 312580095 8123392 82 Linux swap / Solaris

      Partition table entries are not in disk order

      Disk /dev/mapper/vg_fedora17-lv_swap: 10.3 GB, 10267656192 bytes
      255 heads, 63 sectors/track, 1248 cylinders, total 20054016 sectors
      Units = sectors of 1 * 512 = 512 bytes
      Sector size (logical/physical): 512 bytes / 512 bytes
      I/O size (minimum/optimal): 512 bytes / 512 bytes

      Disk /dev/mapper/vg_fedora17-lv_home: 10.7 GB, 10737418240 bytes
      255 heads, 63 sectors/track, 1305 cylinders, total 20971520 sectors
      Units = sectors of 1 * 512 = 512 bytes
      Sector size (logical/physical): 512 bytes / 512 bytes
      I/O size (minimum/optimal): 512 bytes / 512 bytes

      Disk /dev/mapper/vg_fedora17-lv_root: 53.7 GB, 53687091200 bytes
      255 heads, 63 sectors/track, 6527 cylinders, total 104857600 sectors
      Units = sectors of 1 * 512 = 512 bytes
      Sector size (logical/physical): 512 bytes / 512 bytes
      I/O size (minimum/optimal): 512 bytes / 512 bytes

      WARNING: GPT (GUID Partition Table) detected on '/dev/sdb'! The util fdisk doesn't support GPT. Use GNU Parted.

      Disk /dev/sdb: 4111 MB, 4111466496 bytes
      255 heads, 63 sectors/track, 499 cylinders, total 8030208 sectors
      Units = sectors of 1 * 512 = 512 bytes
      Sector size (logical/physical): 512 bytes / 512 bytes
      I/O size (minimum/optimal): 512 bytes / 512 bytes
      Disk identifier: 0x1d459011

      Device Boot Start End Blocks Id System
      /dev/sdb1 * 0 1320959 660480 0 Empty
      /dev/sdb2 164 1299 568 ef EFI (FAT-12/16/32)
      /dev/sdb3 1348 3587 1120 0 Empty

      WARNING: GPT (GUID Partition Table) detected on '/dev/sdb1'! The util fdisk doesn't support GPT. Use GNU Parted.

      Disk /dev/sdb1: 676 MB, 676331520 bytes
      255 heads, 63 sectors/track, 82 cylinders, total 1320960 sectors
      Units = sectors of 1 * 512 = 512 bytes
      Sector size (logical/physical): 512 bytes / 512 bytes
      I/O size (minimum/optimal): 512 bytes / 512 bytes
      Disk identifier: 0x1d459011

      Device Boot Start End Blocks Id System
      /dev/sdb1p1 * 0 1320959 660480 0 Empty
      /dev/sdb1p2 164 1299 568 ef EFI (FAT-12/16/32)
      /dev/sdb1p3 1348 3587 1120 0 Empty

      Disk /dev/mapper/live-rw: 4294 MB, 4294967296 bytes
      255 heads, 63 sectors/track, 522 cylinders, total 8388608 sectors
      Units = sectors of 1 * 512 = 512 bytes
      Sector size (logical/physical): 512 bytes / 512 bytes
      I/O size (minimum/optimal): 512 bytes / 512 bytes

      Disk /dev/mapper/live-osimg-min: 4294 MB, 4294967296 bytes
      255 heads, 63 sectors/track, 522 cylinders, total 8388608 sectors
      Units = sectors of 1 * 512 = 512 bytes
      Sector size (logical/physical): 512 bytes / 512 bytes
      I/O size (minimum/optimal): 512 bytes / 512 bytes

      # lvm pvs --units s
      PV VG Fmt Attr PSize PFree
      /dev/sda4 vg_fedora17 lvm2 a-- 286982144S 141099008S

      # parted /dev/sda unit s print
      Model: ATA Maxtor 6V160E0 (scsi)
      Disk /dev/sda: 312581808s
      Sector size (logical/physical): 512B/512B
      Partition Table: msdos
      Disk Flags:

      Number Start End Size Type File system Flags
      1 2048s 8263679s 8261632s primary ext4 boot
      3 8263680s 9287679s 1024000s primary ext4
      4 9287680s 296331263s 287043584s primary lvm
      2 296333310s 312580095s 16246786s extended
      5 296333312s 312580095s 16246784s logical linux-swap(v1)

      start
      4 9287680s
      PSize 286982144S
      Safety Margin 131072
      Total 296400896

      # parted /dev/sda rm 4
      Error: Partition(s) 4 on /dev/sda have been written, but we have been unable to
      inform the kernel of the change, probably because it/they are in use. As a
      result, the old partition(s) will remain in use. You should reboot now before
      making further changes.
      Ignore/Cancel? Cancel
      Information: You may need to update /etc/fstab.

      What can I do now? Please help. TIA

      B.Regards