Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora 17/18 > Using Fedora
FedoraForum Search

Forgot Password? Join Us!

Using Fedora General support for current versions. Ask questions about Fedora and it's software that do not belong in any other forum.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 28th July 2011, 09:44 AM
mrHappyPants Offline
Registered User
 
Join Date: Feb 2009
Location: Brisbane, Australia
Age: 23
Posts: 90
linuxchrome
LVM not showing correctly (takes up more disk space than the PV)

I've just managed to compress my LVs, extend my VG to my new SSD, move the LVs to the SSD and remove the old disk from the VG. All is well and good (mind you, I did kill my /home partition but it's sorted now...)

My next step was to shrink the PV (I think that's what I want to shrink???) so that I can add another partition to the SSD (to reduce compile times). See below for my current setup. I have a 35G PV with LVs totalling around 33G but the "partition" of the LVM is still 58G.

I have a feeling I'm missing something simple, but I have absolutely nfi... Any info/guidance would be appreciated


Code:
#pvdisplay 
  --- Physical volume ---
  PV Name               /dev/sda2
  VG Name               vg_desktop
  PV Size               35.00 GiB / not usable 31.81 MiB
  Allocatable           yes 
  PE Size               32.00 MiB
  Total PE              1119
  Free PE               68
  Allocated PE          1051
  PV UUID               ht42dd-eXaK-JnBo-B2bW-D8dJ-iU5C-5sb6df
   
#lvdisplay 
  --- Logical volume ---
  LV Name                /dev/vg_desktop/lv_swap
  VG Name                vg_desktop
  LV UUID                Ok3rSJ-YJSl-1Zad-zmTh-btf7-4j3l-vmFr3U
  LV Write Access        read/write
  LV Status              available
  # open                 2
  LV Size                7.84 GiB
  Current LE             251
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:0
   
  --- Logical volume ---
  LV Name                /dev/vg_desktop/lv_root
  VG Name                vg_desktop
  LV UUID                5gZdio-dr9i-frhV-oo2s-x2Xk-0HAY-K5sdln
  LV Write Access        read/write
  LV Status              available
  # open                 1
  LV Size                15.00 GiB
  Current LE             480
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:1
   
  --- Logical volume ---
  LV Name                /dev/vg_desktop/lv_home
  VG Name                vg_desktop
  LV UUID                rewqnr-BIdy-kdz2-A3l4-Ci63-sIYT-0A21cs
  LV Write Access        read/write
  LV Status              available
  # open                 1
  LV Size                10.00 GiB
  Current LE             320
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:2

#fdisk -s /dev/sda2 
58100969
__________________
Intel Core i7 920
Gigabyte GA-EX58-UD4
G Skill 6G DDR3
Galaxy GF 9800GTX+
OCZ Agility III 60GB (Fedora 15)
Seagate SATAII 1.5TB 32m Cache (Storage)
Seagate SATAII 500GB 32m Cache (Storage)
Western Digital Elements 250GB (old Windows XP)
Linksys WMP54G
Samsung 22X DVDRW
Cooler Master V8 HeatPipe Universal Cooler
Antec Nine Hundred Two Tower
Reply With Quote
  #2  
Old 28th July 2011, 11:37 AM
robwi Offline
Registered User
 
Join Date: Jul 2011
Posts: 1
linuxfirefox
Re: LVM not showing correctly (takes up more disk space than the PV)

Hello,

I'm not sure if I understand correctly.
Do you want to add / extend a logical volume, but you can't because you don't have sufficient space in the VG?

See man pvresize.

Regards,
Robert
Reply With Quote
  #3  
Old 28th July 2011, 11:41 AM
mrHappyPants Offline
Registered User
 
Join Date: Feb 2009
Location: Brisbane, Australia
Age: 23
Posts: 90
linuxchrome
Re: LVM not showing correctly (takes up more disk space than the PV)

I would like to add a primary partition on the disk for my programming files, so my aim is to shrink the... volume group..? Would that make sense? Physical Volumes are the disks, Volume Groups contain Logical Volumes, so I want to shrink the VG..?

I've tried Googling and man pages and --helps but I ran out of ideas...
__________________
Intel Core i7 920
Gigabyte GA-EX58-UD4
G Skill 6G DDR3
Galaxy GF 9800GTX+
OCZ Agility III 60GB (Fedora 15)
Seagate SATAII 1.5TB 32m Cache (Storage)
Seagate SATAII 500GB 32m Cache (Storage)
Western Digital Elements 250GB (old Windows XP)
Linksys WMP54G
Samsung 22X DVDRW
Cooler Master V8 HeatPipe Universal Cooler
Antec Nine Hundred Two Tower
Reply With Quote
  #4  
Old 28th July 2011, 11:58 AM
michaaa62 Offline
Registered User
 
Join Date: Jul 2011
Location: Berlin, Germany
Posts: 113
linuxopera
Re: LVM not showing correctly (takes up more disk space than the PV)

Better you have all the data on the old disk in the case that something might get broken...

Now resize the partition with something like fdisk or parted. The graphical gparted is not able to handle partitions with LVM.

But give yourself room for the difference between decimal and dual GB. There is no clear evidence which numbers are used in the process. So resize the partition to be approx. 20% larger than what you are reading as the size for your PV, then again resize the PV to fill the partition, and resize a LV to fill the PV.
Reply With Quote
  #5  
Old 28th July 2011, 12:15 PM
mrHappyPants Offline
Registered User
 
Join Date: Feb 2009
Location: Brisbane, Australia
Age: 23
Posts: 90
linuxsafari
Re: LVM not showing correctly (takes up more disk space than the PV)

Ah, so now I can just resize the lvm2 partition?

I'll try that tomorrow, thanks!
__________________
Intel Core i7 920
Gigabyte GA-EX58-UD4
G Skill 6G DDR3
Galaxy GF 9800GTX+
OCZ Agility III 60GB (Fedora 15)
Seagate SATAII 1.5TB 32m Cache (Storage)
Seagate SATAII 500GB 32m Cache (Storage)
Western Digital Elements 250GB (old Windows XP)
Linksys WMP54G
Samsung 22X DVDRW
Cooler Master V8 HeatPipe Universal Cooler
Antec Nine Hundred Two Tower
Reply With Quote
Reply

Tags
correctly, disk, lvm, showing, space, takes

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Space used not showing correctly machielr Using Fedora 0 25th June 2008 03:18 PM
Q: Approximately how much disk space FC4 takes? aero-z Using Fedora 4 10th July 2005 08:57 PM
DVD not showing up correctly Javaguy78 Hardware & Laptops 2 28th March 2005 03:55 AM
nfs mount showing wrong disk space ratishkurian Using Fedora 0 25th November 2004 02:06 AM


Current GMT-time: 19:26 (Thursday, 23-05-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat