LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 12-25-2010, 05:20 PM   #1
mkafifi
LQ Newbie
 
Registered: Oct 2010
Posts: 4

Rep: Reputation: 1
How to know the unpartitioned space on the HDD


Dears ,

I wondering how to know the unpartitioned space on the HDD on Red Hat 5, for example if I have hda with size 30GB and I already had partation hda1 10GB that's mean that i have 20GB free unpartitioned space , Is there is any command that can shows me the free unpartitioned space on a specific hdd ? and used df -h but with no hope .
 
Old 12-25-2010, 05:45 PM   #2
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824

Rep: Reputation: 613Reputation: 613Reputation: 613Reputation: 613Reputation: 613Reputation: 613
Use "fdisk -l" to show the partition table
 
Old 12-25-2010, 11:11 PM   #3
mkafifi
LQ Newbie
 
Registered: Oct 2010
Posts: 4

Original Poster
Rep: Reputation: 1
I already used fdisk -l , df -h and cat /proc/partitions but with no hope .
 
Old 12-25-2010, 11:30 PM   #4
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824

Rep: Reputation: 613Reputation: 613Reputation: 613Reputation: 613Reputation: 613Reputation: 613
Well, fdisk -l shows you that. It shows you the total size of the disk in various units and the existing partitions, so you could deduce if there's any unallocated space. Or if you want it EXPLICITLY shown to you, you should install and try (g)parted
 
Old 12-25-2010, 11:43 PM   #5
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 15,947

Rep: Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210
cfdisk can also be coerced into printing this data - see the manpage.
 
Old 12-26-2010, 02:27 AM   #6
mkafifi
LQ Newbie
 
Registered: Oct 2010
Posts: 4

Original Poster
Rep: Reputation: 1
As far as I know that cfdisk is not working with Redhat 5 , is there is any other command ?
 
Old 12-26-2010, 07:14 AM   #7
mkafifi
LQ Newbie
 
Registered: Oct 2010
Posts: 4

Original Poster
Rep: Reputation: 1
I got it by using parted and then inside it I typed print free , also u can select the desired HDD by using select /dev/hda1,
for more info check the commands below

==============================================
[root@Redhat001 ~]# parted
GNU Parted 1.8.1
Using /dev/hda
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print free

Model: VMware Virtual IDE Hard Drive (ide)
Disk /dev/hda: 523MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number Start End Size Type File system Flags
1 32.3kB 10.3MB 10.3MB primary raid
2 10.3MB 20.6MB 10.3MB primary raid
3 20.6MB 31.0MB 10.3MB primary raid
4 31.0MB 523MB 492MB extended
5 31.0MB 41.3MB 10.3MB logical linux-swap
6 41.3MB 47.0MB 5645kB logical
7 47.0MB 52.6MB 5645kB logical
8 52.7MB 58.3MB 5645kB logical
9 58.4MB 64.0MB 5645kB logical
10 64.0MB 74.3MB 10.3MB logical ext3
11 74.4MB 523MB 448MB logical ext3

(parted) select /dev/hdd
Using /dev/hdd
(parted) print free

Model: VMware Virtual IDE Hard Drive (ide)
Disk /dev/hdd: 10.7GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number Start End Size Type File system Flags
1 32.3kB 2049MB 2049MB primary ext3
2049MB 10.7GB 8685MB Free Space

(parted) quit
 
1 members found this post helpful.
  


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
Can't find unpartitioned space? DranoMax Slackware - Installation 3 10-31-2009 09:03 AM
Unpartitioned Free Space IBall Linux - Hardware 3 04-17-2006 05:37 AM
Is it ok to leave space unpartitioned? Penguin of Wonder Linux - General 2 03-22-2006 09:30 PM
Using unpartitioned space ChriZathens Linux - General 4 11-25-2005 06:38 AM
Do i have unpartitioned space? p0rt Linux - General 5 08-17-2004 06:00 PM

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

All times are GMT -5. The time now is 06:48 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