<---- template headericclude ----->
[SOLVED] LVM reports size different than df -h
FedoraForum.org - Fedora Support Forums and Community
Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2006
    Posts
    17
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    LVM reports size different than df -h

    I was recently running out of space on my 160gb hdd in this laptop. After all it is split between Fedora 14 and Win 7. So I bought an external 320 with the intent to image the windows and boot partitions over, then us the lvm manager to transfer over while running. everything went swimmingly, I used Clonezilla to copy over windows, and boot partitions, then booted up, created the necessary partitions with the disk managers, added it to the lvm group, and initiated the "migration of extents" using the LVM gui. I should mention my lvm consists of my swap, root and home. when they finished the move (much faster than I expected), the physical view showed the home at the far left of the drive, with root and swap in the middle, and the free space on the far right. I proceded to swap the hdd's in their respective homes.

    I wasn't too worried about the physical layout when the "edit properties" allowed me to use the free space in the lvm to expand that logical volume to fill. it then showed either side of the swap and root as home, and reported each as the size for that physical area of the drive, but with the same amount of space used. In other words, different physical volume size, same space used. further, df -h showed still the original amount of space from just the single original home partition.

    I rebooted with no change to reports or listings, let it run a few days, and rebooted again. It still had no change. so I plugged the original drive back in, added it to the lvm, moved the original three partitions back to it and tried to delete the addition to home and was told that it was in use. the physical view showed the far left as empy "unused space" and a portion of home to the right. I then moved the partitions back onto the internal drive, one at a time, starting with swap, then root, and finally home, and they were put onto the drive starting at the left so it looks like a good old fasioned swap>root>home. once home finished moving, the lvm manager shows it as one single large volume with the correct amount of total space from the two combined, however df -h still doesn't show correctly, nor does the system recognize the extra space.

    How do I get the system to use the space?


    [root@blenda ~]# lvdisplay
    --- Logical volume ---
    LV Name /dev/vg_blenda/blendahome
    VG Name vg_blenda
    LV UUID TdiT2I-McnA-TPkY-0Otu-5ejK-9a28-hUWsX2
    LV Write Access read/write
    LV Status available
    # open 1
    LV Size 238.94 GiB
    Current LE 7646
    Segments 1
    Allocation inherit
    Read ahead sectors auto
    - currently set to 256
    Block device 253:2

    --- Logical volume ---
    LV Name /dev/vg_blenda/blendaroot
    VG Name vg_blenda
    LV UUID 1G4N2S-eA8L-MOup-y3Bj-pELs-6DVj-3Yfe17
    LV Write Access read/write
    LV Status available
    # open 1
    LV Size 19.53 GiB
    Current LE 625
    Segments 1
    Allocation inherit
    Read ahead sectors auto
    - currently set to 256
    Block device 253:0

    --- Logical volume ---
    LV Name /dev/vg_blenda/swap
    VG Name vg_blenda
    LV UUID i3xy4x-n3jU-0pvo-QQar-B0uJ-y0QP-7U0f9m
    LV Write Access read/write
    LV Status available
    # open 1
    LV Size 2.00 GiB
    Current LE 64
    Segments 1
    Allocation inherit
    Read ahead sectors auto
    - currently set to 256
    Block device 253:1

    [root@blenda ~]# df -h
    Filesystem Size Used Avail Use% Mounted on
    /dev/mapper/vg_blenda-blendaroot
    20G 6.5G 13G 34% /
    tmpfs 1.8G 1.9M 1.8G 1% /dev/shm
    /dev/sda3 485M 66M 394M 15% /boot
    /dev/mapper/vg_blenda-blendahome
    89G 80G 4.6G 95% /home
    "The pioneers of a warless world are the youth that refuse military service."

  2. #2
    Join Date
    Jul 2011
    Location
    Berlin, Germany
    Posts
    113
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: LVM reports size different than df -h

    Up to now you completed two of three steps necessary.

    First step: Resize of the partition (You will change the disk)
    Second step: Resize of the LVM information on the partition

    Now: You have to resize the file systems to use the free spacein the lvms.
    Unmount blendahome or use a Live-CD
    Code:
    su 
    resize2fs /dev//mapper/vg_blenda-blendahome
    Without any size parameter given, resize2fs will default to filling the device or the lv to capacity.

  3. #3
    Join Date
    Dec 2006
    Posts
    17
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: LVM reports size different than df -h

    alright, so, booted to fedora 15 live usb...

    [liveuser@localhost ~]$ df -h
    Filesystem Size Used Avail Use% Mounted on
    rootfs 4.0G 2.2G 1.8G 56% /
    udev 1.8G 0 1.8G 0% /dev
    tmpfs 1.8G 432K 1.8G 1% /dev/shm
    tmpfs 1.8G 768K 1.8G 1% /run
    /dev/sdb1 7.4G 724M 6.3G 11% /run/initramfs/live
    /dev/mapper/live-rw 4.0G 2.2G 1.8G 56% /
    tmpfs 1.8G 0 1.8G 0% /sys/fs/cgroup
    tmpfs 1.8G 0 1.8G 0% /media
    /dev/sdb1 7.4G 724M 6.3G 11% /mnt/live
    varcacheyum 1.8G 76M 1.7G 5% /var/cache/yum
    /tmp 1.8G 40K 1.8G 1% /tmp
    vartmp 1.8G 0 1.8G 0% /var/tmp
    /tmp 1.8G 40K 1.8G 1% /tmp
    vartmp 1.8G 0 1.8G 0% /var/tmp
    /dev/mapper/live-rw 4.0G 2.2G 1.8G 56% /home
    /dev/mapper/vg_blenda-blendahome
    162G 80G 74G 52% /mnt/blenda
    [liveuser@localhost ~]$ df -h
    Filesystem Size Used Avail Use% Mounted on
    rootfs 4.0G 2.2G 1.8G 56% /
    udev 1.8G 0 1.8G 0% /dev
    tmpfs 1.8G 432K 1.8G 1% /dev/shm
    tmpfs 1.8G 768K 1.8G 1% /run
    /dev/sdb1 7.4G 724M 6.3G 11% /run/initramfs/live
    /dev/mapper/live-rw 4.0G 2.2G 1.8G 56% /
    tmpfs 1.8G 0 1.8G 0% /sys/fs/cgroup
    tmpfs 1.8G 0 1.8G 0% /media
    /dev/sdb1 7.4G 724M 6.3G 11% /mnt/live
    varcacheyum 1.8G 76M 1.7G 5% /var/cache/yum
    /tmp 1.8G 40K 1.8G 1% /tmp
    vartmp 1.8G 0 1.8G 0% /var/tmp
    /tmp 1.8G 40K 1.8G 1% /tmp
    vartmp 1.8G 0 1.8G 0% /var/tmp
    /dev/mapper/live-rw 4.0G 2.2G 1.8G 56% /home
    /dev/mapper/vg_blenda-blendahome
    236G 80G 144G 36% /mnt/blenda

    [liveuser@localhost ~]$ su -
    [root@localhost ~]# resize2fs /dev//mapper/vg_blenda-blendahome
    resize2fs 1.41.14 (22-Dec-2010)
    The filesystem is already 62636032 blocks long. Nothing to do!

    I'll reboot into fedora 14 and see what it reports now

    ---------- Post added at 02:38 PM ---------- Previous post was at 02:33 PM ----------

    now reports correctly, thank you very much!

    [katzu@blenda ~]$ df -h
    Filesystem Size Used Avail Use% Mounted on
    /dev/mapper/vg_blenda-blendaroot
    20G 6.5G 13G 34% /
    tmpfs 1.8G 260K 1.8G 1% /dev/shm
    /dev/sda3 485M 66M 394M 15% /boot
    /dev/mapper/vg_blenda-blendahome
    236G 80G 144G 36% /home
    "The pioneers of a warless world are the youth that refuse military service."

Similar Threads

  1. superblock size != partition size after Fedora 14 install with resize option
    By manse in forum Installation, Upgrades and Live Media
    Replies: 2
    Last Post: 24th May 2012, 04:14 PM
  2. Reports Wrong VRAM Size
    By roxiesvendetta in forum Hardware
    Replies: 1
    Last Post: 9th December 2007, 10:33 AM
  3. Replies: 1
    Last Post: 17th October 2006, 08:55 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
[[template footer(Guest)]]