LinuxQuestions.org
Visit Jeremy's Blog.
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 02-12-2009, 11:10 AM   #1
w11
LQ Newbie
 
Registered: Feb 2009
Posts: 3

Rep: Reputation: 0
Managing disk space


I have a server that has two 1TB hard drives set up in a RAID 1 configuration.
When I run df, the total size listed (used and unused) only adds up to about 28GB. How do I make the rest of the disk space available for use?
I am running Red Hat Enterprise 5.2.
Thanks.
 
Old 02-12-2009, 11:20 AM   #2
instrumentpilot
Member
 
Registered: May 2006
Posts: 34

Rep: Reputation: 2
Disk Space

Hi, how to make it all visible depends on how your disks are configured. Run the command below so we know what you have and someone will be able to beter help you.

# fdisk -l <-- that is a lower case L

Michael
 
Old 02-12-2009, 11:22 AM   #3
w11
LQ Newbie
 
Registered: Feb 2009
Posts: 3

Original Poster
Rep: Reputation: 0
Hi, thanks for replying. Here are the results of that command:

Disk /dev/sda: 999.6 GB, 999653638144 bytes
255 heads, 63 sectors/track, 121534 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 1 8 64228+ de Dell Utility
/dev/sda2 9 661 5245222+ 8e Linux LVM
/dev/sda3 * 662 686 200812+ 83 Linux
/dev/sda4 687 121534 970711560 5 Extended
/dev/sda5 687 121534 970711528+ 8e Linux LVM
 
Old 02-12-2009, 12:39 PM   #4
instrumentpilot
Member
 
Registered: May 2006
Posts: 34

Rep: Reputation: 2
Ok, looks like the Dell install created an LVM (Logicial Volume) of around 970711528 bytes. That's fine. Now you want to see what it's named and how it is allocated. Try out the following commands.

# pvdisplay /dev/sda5 <-- This is the partition where the LVM exists

Keep track of the volume group name which is on the line with VG Name

# vgdisplay <VG Name from above>

Make note of the values which are something like this
Alloc PE / Size 1000 / 3.91 GB
Free PE / Size 5971 / 23.32 GB

This should show you about 950GB free.

What this is really going to show you is how much free space you have for a VG (volume group). This space can be used to create other LVMs with new file systems, or you can extend an LVM and file system to use more space. It is giving you flexibility.

Now, the next step is to learn how to use this free space.

One thing you might want to do is extend a file system. I don't know your layout so let's assume Dell put the /home filesystem on an LVM named mylvm. And further the LVM is on a VG named vg01.

# lvdisplay /dev/vg01/mylvm <-- will show current LV Size
# lvextend -L +5g /dev/vg01/mylvm <-- adds 5GB to the LVM for our fictitious /home filesystem.
# resize2fs /dev/vg01/mylvm <-- resize the filesystem to use all the space on the LVM.

P.S. I'm not sure the syntax for resize2fs is exact because I'm still on RHEL4 and I use ext2online. The ext2online command isn't available (from what I remember) on RHEL5 so you must use resize2fs.

To create a new filesystem do something like this.
# lvcreate -n mynewlvm -L 30g vg01
# mkfs.ext3 /dev/vg01/mynewlvm
# mkdir /newfilesystem

Then edit /etc/fstab and mount the new filesystem.

I hope all this helps, but if it doesn't get you there then write back.

Michael
 
Old 02-12-2009, 01:20 PM   #5
w11
LQ Newbie
 
Registered: Feb 2009
Posts: 3

Original Poster
Rep: Reputation: 0
That was perfect, thank you!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
managing disk space tjod Linux - Newbie 9 01-27-2009 09:26 PM
Cedega "Disk space required for the installation exceeds available disk space" Solved Spewdemon LinuxQuestions.org Member Success Stories 1 10-18-2007 07:19 PM
LXer: Managing disk space with LVM LXer Syndicated Linux News 0 07-22-2007 08:18 AM
LXer: Managing Disk Space with LVM LXer Syndicated Linux News 0 04-28-2006 05:54 AM
3Gb of disk space lost! Disk space problem or mother board conflicts with HDD Mistreated Linux - Hardware 4 12-06-2004 04:58 PM

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

All times are GMT -5. The time now is 06:16 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration