LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-29-2010, 08:56 AM   #1
mookNOW
LQ Newbie
 
Registered: Apr 2010
Posts: 11

Rep: Reputation: 0
Missing Disk Space


Hi,

I've just installed CentOS 5.4 on a 8GB solid state disk. I took all the default steps through installation. Everything works fine, but I appear to have lost about half the disk space. I believe the filesystem takes away about 5% of the diskspace

Here's what's led me to believe this:

________________________________________________________________________
[root@localhost ~]# fdisk /dev/sda

Command (m for help): p

Disk /dev/sda: 8220 MB, 8220835840 bytes
255 heads, 63 sectors/track, 999 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 104391 83 Linux
/dev/sda2 14 999 7920045 8e Linux LVM

Command (m for help):
_________________________________________________________________________


_________________________________________________________________________
[root@localhost ~]# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
3872392 2738140 934368 75% /
/dev/sda1 101086 12587 83280 14% /boot
tmpfs 8218288 0 8218288 0% /dev/shm
_________________________________________________________________________

fdisk reports there are 8220835840 bytes
df reports there are 3872392 + 101086 KB

which more or less works out as (3973478000/8220835840)*100 = 48%

Is tmpfs set up incorrectly? Am I using linux LVM incorrectly? Or have I just interpreted all this information incorrectly? Any clues as to why I'm losing this space would be most welcome.

Thanks,
 
Old 04-29-2010, 09:15 AM   #2
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824

Rep: Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615
What do /usr/sbin/vgdisplay and /usr/sbin/pvdisplay return?
 
Old 04-29-2010, 10:23 AM   #3
mookNOW
LQ Newbie
 
Registered: Apr 2010
Posts: 11

Original Poster
Rep: Reputation: 0
thanks for the fast reply, here are the results

[root@localhost /]# vgdisplay
--- Volume group ---
VG Name VolGroup00
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 3
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 2
Open LV 2
Max PV 0
Cur PV 1
Act PV 1
VG Size 7.53 GB
PE Size 32.00 MB
Total PE 241
Alloc PE / Size 241 / 7.53 GB
Free PE / Size 0 / 0
VG UUID RwoRbb-fCI6-n1VV-8eRl-o5Gj-RpRt-OuyQex

[root@localhost /]# pvdisplay
--- Physical volume ---
PV Name /dev/sda2
VG Name VolGroup00
PV Size 7.55 GB / not usable 22.42 MB
Allocatable yes (but full)
PE Size (KByte) 32768
Total PE 241
Free PE 0
Allocated PE 241
PV UUID 5hTqVl-LxWE-CyOc-ziX2-zjcn-NNgi-e248Qw
 
Old 04-29-2010, 10:34 AM   #4
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824

Rep: Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615
And 'df -h'?

You might try booting from CD, importing the volume group, and fscking the logical volume.
 
Old 04-29-2010, 10:44 AM   #5
mookNOW
LQ Newbie
 
Registered: Apr 2010
Posts: 11

Original Poster
Rep: Reputation: 0
[root@localhost /]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
3.7G 2.7G 913M 75% /
/dev/sda1 99M 13M 82M 14% /boot
tmpfs 7.9G 0 7.9G 0% /dev/shm


Do you have a link about how to do what you've described? Does it look like I've set something up incorrectly?

many thanks,
 
Old 04-29-2010, 11:46 AM   #6
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,696

Rep: Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894
The output of the command lvdisplay would also help.
The default installation creates 2 partitions, one for /boot and 2 the LVM which contains / and swap. It appears that the LV for / is only 3.7G from the ouput of df. The output of lvdisplay will show us the actual size.

Last edited by michaelk; 04-29-2010 at 12:01 PM.
 
Old 04-30-2010, 03:11 AM   #7
mookNOW
LQ Newbie
 
Registered: Apr 2010
Posts: 11

Original Poster
Rep: Reputation: 0
[root@localhost /]# lvdisplay
--- Logical volume ---
LV Name /dev/VolGroup00/LogVol00
VG Name VolGroup00
LV UUID ifgYuc-89Im-22aP-bwih-Rxr2-A0Nf-I0TXZd
LV Write Access read/write
LV Status available
# open 1
LV Size 3.81 GB
Current LE 122
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:0

--- Logical volume ---
LV Name /dev/VolGroup00/LogVol01
VG Name VolGroup00
LV UUID xYeOFD-gMS7-jcAW-0rWm-A5k0-NzLz-WMruYu
LV Write Access read/write
LV Status available
# open 1
LV Size 3.72 GB
Current LE 119
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:1


Thanks again for looking into this.
 
Old 04-30-2010, 03:31 AM   #8
mookNOW
LQ Newbie
 
Registered: Apr 2010
Posts: 11

Original Poster
Rep: Reputation: 0
So from what I understand of this output: I've got two logical volumes, which both belong to the same Volume group. but only one of them is acessable. Is there anyway to fix this? Should this have happened with a default installation?
 
Old 04-30-2010, 05:38 PM   #9
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,696

Rep: Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894
Post the output of the /etc/fstab file. Is the second logical volume your swap partition?
 
1 members found this post helpful.
Old 05-04-2010, 03:39 AM   #10
mookNOW
LQ Newbie
 
Registered: Apr 2010
Posts: 11

Original Poster
Rep: Reputation: 0
[root@localhost etc]# cat /etc/fstab
/dev/VolGroup00/LogVol00 / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 2
tmpfs /dev/shm tmpfs defaults 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
sysfs /sys sysfs defaults 0 0
proc /proc proc defaults 0 0
/dev/VolGroup00/LogVol01 swap swap defaults 0 0


oh! Does that mean I've got a 3.7GB swap drive? I'm guessing I don't need it anywhere near as big as that. Is there anyway to move some space from LogVol01 over to LogVol00?

Thanks again with your help so far!
 
Old 05-04-2010, 08:11 AM   #11
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824

Rep: Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615
Yes and yes, search the centos/redhat docs for how to resize a logical volume and then your root partition (I believe it's called resize2fs on RHEL5). It's safe, but always have a backup in case of electrical (or user ) error
 
1 members found this post helpful.
Old 05-04-2010, 02:53 PM   #12
ArthurSittler
Member
 
Registered: Jul 2008
Distribution: Slackware
Posts: 124

Rep: Reputation: 31
There are some reasons other than disk space consumption why you might not want to use any space on a solid-state drive for swap. The short story is that solid state drives, like all flash memory, have limited write cycle endurance. Reading data does no harm, so you can read the data any number of times without affecting device life. But every time you write a flash memory cell, there is a small probability that you will actually damage that memory. And the probability of damage increases with the number of writes. If you hit the swap heavily, you will likely shorten the life of the part of the solid state drive used for swap. Errors in the swap can wreak havock with system stability.

On systems where I do have swap, I often find that the swap is never used anyway. You can examine swap file usage from a console terminal with the command

cat /proc/swaps

By contrast, writing to magnetic disks does not impact the life of the media. I run my netbook with no swap. Sometimes I run out of memory and the machine crashes, but it comes back with reset with no real harm. If you run programs that swap heavily on a machine with solid state drive, you may want to consider setting up an external USB hard drive (really a disk drive, not a flash drive) for swap space. Then use the external swap drive space for your heavy-swapping applications.
 
Old 06-08-2010, 08:55 AM   #13
mookNOW
LQ Newbie
 
Registered: Apr 2010
Posts: 11

Original Poster
Rep: Reputation: 0
Thanks to everyone that posted help on this thread.

Here's what I did to remove the swap logical partition and regain the space in another. (as root, OS booted as normal)

swapoff -a
lvremove /dev/VolGroup00/LogVol01
lvextend -L +3.7G /dev/VolGroup00/LogVol00
resize2fs /dev/VolGroup00/LogVol00
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Disk space missing MrMakealotofsmoke Linux - Newbie 3 04-05-2010 07:55 AM
Missing disk space michalng Linux - Newbie 3 02-12-2009 04:05 AM
missing hard disk space? rabbit2345 SUSE / openSUSE 2 08-31-2008 09:41 PM
missing disk space Ayman.mashal Linux - Software 4 06-16-2005 02:41 PM
I seem to be missing disk space... Brother Michael Linux - Newbie 13 12-07-2003 06:49 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:06 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration