Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
LVM2 question
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
asiobob
Veteran
Veteran


Joined: 29 Oct 2003
Posts: 1375
Location: Bamboo Creek

PostPosted: Wed Feb 02, 2005 8:05 pm    Post subject: LVM2 question Reply with quote

How do I find the "free" space on an LVM volume group?
Does the above mean I have 16mb free in the group?

Code:
vgdisplay vg
  --- Volume group ---
  VG Name               vg
  System ID
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  6
  VG Access             read/write
  VG Status             resizable
  MAX LV                255
  Cur LV                5
  Open LV               0
  Max PV                255
  Cur PV                1
  Act PV                1
  VG Size               73.02 GB
  PE Size               4.00 MB
  Total PE              18692
  Alloc PE / Size       18688 / 73.00 GB
  Free  PE / Size       4 / 16.00 MB
  VG UUID               duOMUN-GYoR-A9xu-Dwj5-djqF-lDGX-YhUNV5
Back to top
View user's profile Send private message
forgotten1
Guru
Guru


Joined: 11 Jan 2005
Posts: 477
Location: East Coast, USA

PostPosted: Wed Feb 02, 2005 8:42 pm    Post subject: Reply with quote

That's how I understand it. I have a 60GB harddrive. It has /boot, /swap, and / partitions and an LVM partition. They are 100MB, 1024MB, and 500MB respectively. The fourth partition is my LVM partition, and should be using the remainder of the disk. The pertinent lines displayes when I run vgdisplay are:
Code:
VG Size                      47.50 GB
PE Size                      4.00 MB
Total PE                     12160
Alloc PE / Size              8960 / 35.00 GB
Free  PE / Size              3200 / 12.50 GB

Before I continue, I must say that I do not understand why my total VG Size is 47.50 GB. With a 60GB harddrive and a partition scheme as indicated above, it is not clear to why it the total VG Size is not at least 58GB.

With that said I've created 5 partitions on the LVM partition (as in the LVM2 Installation doc) totalling 35GB as indicated in the code above. My understanding is that this leaves me with 12.5GB left to use later.
Back to top
View user's profile Send private message
asiobob
Veteran
Veteran


Joined: 29 Oct 2003
Posts: 1375
Location: Bamboo Creek

PostPosted: Wed Feb 02, 2005 9:03 pm    Post subject: Reply with quote

thanks for your reply,
regarding VG size..I've got what I bought as an 80GB disk.
I have a
64mb /boot
512mb /swap
1024mb /
the rest is LVM2 partition which I then created a vg in, which my output indicates 73.02 GB

I sort of made my partitions blindly just assigned numbers. After a day my 10GB /usr is 72% and my home has to much assigned to it so might do a shrink..it's a bummer that you have to unmount to shrink reiserfs or so I've heard.

I'm not at my box so I'm not able to provide exact numbers.
Back to top
View user's profile Send private message
forgotten1
Guru
Guru


Joined: 11 Jan 2005
Posts: 477
Location: East Coast, USA

PostPosted: Wed Feb 02, 2005 9:46 pm    Post subject: Reply with quote

ASIO_BOB wrote:
..it's a bummer that you have to unmount to shrink reiserfs or so I've heard.

The LVM-HOWTO agrees with your comments, plus it gives the code necessary to perform the operation.

I'd appreciate your lessons learned, when you're done. Good luck.
Back to top
View user's profile Send private message
asiobob
Veteran
Veteran


Joined: 29 Oct 2003
Posts: 1375
Location: Bamboo Creek

PostPosted: Thu Feb 03, 2005 11:27 am    Post subject: Reply with quote

forgotten1, it's worked well.

I've not got:
/tmp
/var
/usr
/opt
/home

as LVM. To convert I basically coped by old / (whiched contained everyting including the above to another back up disk I have. So used the live CD to copy the old root the the back up location using cp -avx

Then using fisk I got rid of the partition that had / and made a new smaller one. The remember I made into 8e (LVM) type partition.

Then I created the lvm physical volumes, volume group and logical volumes, formatted as reiserfs and mounted them. Then I / back to the new system.

BTW: Before I did the above I installed lvm2 (in portage) and lvm2 kernel support in my installation.

The only problem I noticed was a 3 libstdc++.so.6 errors early on the boot processe. This file exisits in /usr partition which isn't even mounted at that early stage. I figured out it was programs in coreutils package (like ls , cat , cd , etc...). By only known solution is to USE="static" emerge coreutilis so these apps don't link to a file thats not available yet.

Now it works fine[/code]
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum