LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 01-15-2010, 12:27 AM   #1
abbas_sw
LQ Newbie
 
Registered: Jan 2010
Posts: 2

Rep: Reputation: 0
To find unpartitioned harddiskspace in Centos


Dear all

Abbas here new user to linux.

Can any one help me how to know the unparitioned disk space in centos

Thankz!!!!!!!!!!!
 
Old 01-15-2010, 04:49 AM   #2
nileshgr
Member
 
Registered: Aug 2007
Location: Pune, Maharashtra, India
Distribution: Gentoo
Posts: 84

Rep: Reputation: 16
Open terminal and type as root-

Code:
parted /dev/<hard-disk>
It will give you a prompt in which you have to type 'p'.

You may have to install parted if its not there.
 
Old 01-15-2010, 05:01 AM   #3
ozanbaba
Member
 
Registered: May 2003
Location: İzmir
Distribution: Slackware64 15.0 Multilib
Posts: 778

Rep: Reputation: 135Reputation: 135
or more generic solution is using fdisk

go root
fdisk /dev/$HDD

then type p
 
Old 01-15-2010, 05:25 AM   #4
abbas_sw
LQ Newbie
 
Registered: Jan 2010
Posts: 2

Original Poster
Rep: Reputation: 0
Thumbs up

Quote:
Originally Posted by nilesh.3892 View Post
Open terminal and type as root-

Code:
parted /dev/<hard-disk>
It will give you a prompt in which you have to type 'p'.

You may have to install parted if its not there.
Thanks sir

but still 1 confusion

we have to manually do calculation for that unpartitioned space
as it shows full harddisk space and the partitioned space separately.

is there is any command which show exactly unpartitioned space.

Thankzzzzzzzzzzzzz
 
Old 01-15-2010, 05:44 AM   #5
ozanbaba
Member
 
Registered: May 2003
Location: İzmir
Distribution: Slackware64 15.0 Multilib
Posts: 778

Rep: Reputation: 135Reputation: 135
i'm not remembering perfectly now, i don't access to my computer to check but p command to fdisk should give you free space, too.
 
Old 01-15-2010, 11:15 AM   #6
nileshgr
Member
 
Registered: Aug 2007
Location: Pune, Maharashtra, India
Distribution: Gentoo
Posts: 84

Rep: Reputation: 16
Quote:
Originally Posted by ozanbaba View Post
i'm not remembering perfectly now, i don't access to my computer to check but p command to fdisk should give you free space, too.
No it doesn't. It gives blocks. I was about to post the same but tested it first.
 
Old 01-15-2010, 11:19 AM   #7
nileshgr
Member
 
Registered: Aug 2007
Location: Pune, Maharashtra, India
Distribution: Gentoo
Posts: 84

Rep: Reputation: 16
Quote:
Originally Posted by abbas_sw View Post
Thanks sir

but still 1 confusion

we have to manually do calculation for that unpartitioned space
as it shows full harddisk space and the partitioned space separately.

is there is any command which show exactly unpartitioned space.

Thankzzzzzzzzzzzzz
I don't think so. You may find some GUI tool if it exists. Or you've to write a script to process the information outputted by parted.
 
Old 01-15-2010, 12:15 PM   #8
ozanbaba
Member
 
Registered: May 2003
Location: İzmir
Distribution: Slackware64 15.0 Multilib
Posts: 778

Rep: Reputation: 135Reputation: 135
Quote:
Originally Posted by nilesh.3892 View Post
No it doesn't. It gives blocks. I was about to post the same but tested it first.
blocks x block size = space

however block size is usually 4k[1], it is a little too much for normal users to find block size.

[1] fs people say that using same size of page size of the hardware is right time to do as it fastens the memory work. hence 4k number is PC specific.

Last edited by ozanbaba; 01-15-2010 at 12:55 PM. Reason: added footnote
 
Old 01-15-2010, 12:19 PM   #9
onebuck
Moderator
 
Registered: Jan 2005
Location: Central Florida 20 minutes from Disney World
Distribution: SlackwareŽ
Posts: 13,925
Blog Entries: 44

Rep: Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159
Hi,

Welcome to LQ!

You could use 'cfdisk /dev/your_device' to show all partitions and available space for expansion if there is any. Note that '/dev/your_device' can be found by 'fdisk -l' to show the disk(s) information. You should 'man cfdisk'.

 
1 members found this post helpful.
Old 01-16-2010, 10:39 AM   #10
nileshgr
Member
 
Registered: Aug 2007
Location: Pune, Maharashtra, India
Distribution: Gentoo
Posts: 84

Rep: Reputation: 16
Quote:
Originally Posted by ozanbaba View Post
blocks x block size = space

however block size is usually 4k[1], it is a little too much for normal users to find block size.

[1] fs people say that using same size of page size of the hardware is right time to do as it fastens the memory work. hence 4k number is PC specific.
Is 4k so common ? I am running Arch Linux. My block size is 512B.

@onebuck, thanks for the info.
 
Old 01-16-2010, 11:36 AM   #11
ozanbaba
Member
 
Registered: May 2003
Location: İzmir
Distribution: Slackware64 15.0 Multilib
Posts: 778

Rep: Reputation: 135Reputation: 135
Quote:
Originally Posted by nilesh.3892 View Post
Is 4k so common ? I am running Arch Linux. My block size is 512B.

@onebuck, thanks for the info.
ik depends on way too much things, from file system, hdd, arch to how the engineer was feeling when he designed the hardware
 
  


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
How do i find new installed harddisk in CentOS 5.2, please help thanks cmjoey Linux - Hardware 26 01-11-2010 07:49 PM
How to find the size of RPM in CentOS? your_shadow03 Linux - Newbie 1 01-08-2010 06:25 AM
Can't find unpartitioned space? DranoMax Slackware - Installation 3 10-31-2009 08:03 AM
Using unpartitioned space ChriZathens Linux - General 4 11-25-2005 05:38 AM
Do i have unpartitioned space? p0rt Linux - General 5 08-17-2004 05:00 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 06:16 AM.

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