LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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-17-2013, 03:00 AM   #1
sachin.davra
Member
 
Registered: Jul 2013
Posts: 213

Rep: Reputation: Disabled
partition table


/dev/sda1 * 1 64 512000 83 Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2 64 12813 102400000 8e Linux LVM
/dev/sda3 12813 25561 102400000 8e Linux LVM
/dev/sda4 25561 60802 283073536 5 Extended
/dev/sda5 25561 31935 51200000 83 Linux
/dev/sda6 31935 32955 8192000 82 Linux swap / Solaris
/dev/sda7 32955 46009 104859165 83 Linux

If above is the partition table then how to know how much space is left in the extended partition to create more partitions?
 
Old 12-17-2013, 04:09 AM   #2
gdejonge
Member
 
Registered: Aug 2010
Location: Netherlands
Distribution: Kubuntu, Debian, Suse, Slackware
Posts: 317

Rep: Reputation: 73
Arrow

Quote:
Originally Posted by sachin.davra View Post
/dev/sda1 * 1 64 512000 83 Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2 64 12813 102400000 8e Linux LVM
/dev/sda3 12813 25561 102400000 8e Linux LVM
/dev/sda4 25561 60802 283073536 5 Extended
/dev/sda5 25561 31935 51200000 83 Linux
/dev/sda6 31935 32955 8192000 82 Linux swap / Solaris
/dev/sda7 32955 46009 104859165 83 Linux

If above is the partition table then how to know how much space is left in the extended partition to create more partitions?
Please if you post output from a command post all the output, not just a part of it. And please, please use code-tags.

Now back to your question. Your extended partition starts on 25561 and ends on 60802. You have 3 logical partitions that start on 25561 and end on 46009. So to my calculation you have 60802 - 46009 free space in your extended partition. I leave it as an exercise to you to calculate how much space that is in Mbytes.

Cheers
 
Old 12-17-2013, 04:28 AM   #3
sachin.davra
Member
 
Registered: Jul 2013
Posts: 213

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by gdejonge View Post
Please if you post output from a command post all the output, not just a part of it. And please, please use code-tags.

Now back to your question. Your extended partition starts on 25561 and ends on 60802. You have 3 logical partitions that start on 25561 and end on 46009. So to my calculation you have 60802 - 46009 free space in your extended partition. I leave it as an exercise to you to calculate how much space that is in Mbytes.

Cheers
Thnx for understading my querry. But i wanted to ask, what you gave me as an exercise. Please tell me how to calulate it to better understand it.
 
Old 12-17-2013, 05:20 AM   #4
gdejonge
Member
 
Registered: Aug 2010
Location: Netherlands
Distribution: Kubuntu, Debian, Suse, Slackware
Posts: 317

Rep: Reputation: 73
That's why I asked to post all of the output of the command you used.

But to go from the information that is provided, I would guess we're talking about a 500Gbyte disk. Of which roughly 400 Gbyte is allocated. So this will leave you with around 100 Gbyte available.

Cheers.
 
Old 12-17-2013, 05:51 AM   #5
sachin.davra
Member
 
Registered: Jul 2013
Posts: 213

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by gdejonge View Post
That's why I asked to post all of the output of the command you used.

But to go from the information that is provided, I would guess we're talking about a 500Gbyte disk. Of which roughly 400 Gbyte is allocated. So this will leave you with around 100 Gbyte available.

Cheers.
Code:
Command (m for help): p

Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xe2a59a25

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          64      512000   83  Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2              64       12813   102400000   8e  Linux LVM
/dev/sda3           12813       25561   102400000   8e  Linux LVM
/dev/sda4           25561       60802   283073536    5  Extended
/dev/sda5           25561       31935    51200000   83  Linux
/dev/sda6           31935       32955     8192000   82  Linux swap / Solaris
/dev/sda7           32955       46009   104859165   8e  Linux LVM

Command (m for help):

Here is the output of full command. but how to calulate it. please tell me.
 
Old 12-17-2013, 06:06 AM   #6
berndbausch
Senior Member
 
Registered: Nov 2013
Location: Tokyo
Distribution: Redhat/Centos, Ubuntu, Raspbian, Fedora
Posts: 1,687

Rep: Reputation: 353Reputation: 353Reputation: 353Reputation: 353
Quote:
Originally Posted by sachin.davra View Post
Code:
Command (m for help): p

Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xe2a59a25

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          64      512000   83  Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2              64       12813   102400000   8e  Linux LVM
/dev/sda3           12813       25561   102400000   8e  Linux LVM
/dev/sda4           25561       60802   283073536    5  Extended
/dev/sda5           25561       31935    51200000   83  Linux
/dev/sda6           31935       32955     8192000   82  Linux swap / Solaris
/dev/sda7           32955       46009   104859165   8e  Linux LVM

Command (m for help):

Here is the output of full command. but how to calulate it. please tell me.
Use the Blocks column; it contains the size of each partition. A block is 1K.
The extended partition contains sda5-7. The sum of sda5-7 is 104859165+8192000+51200000 = 164251165 blocks. The total size is 283073536 blocks, therefore close to 120000000 blocks are free.
 
Old 12-17-2013, 08:11 AM   #7
sachin.davra
Member
 
Registered: Jul 2013
Posts: 213

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by berndbausch View Post
Use the Blocks column; it contains the size of each partition. A block is 1K.
The extended partition contains sda5-7. The sum of sda5-7 is 104859165+8192000+51200000 = 164251165 blocks. The total size is 283073536 blocks, therefore close to 120000000 blocks are free.
How to convert blocks to mb or gb to know the exact size?
 
Old 12-17-2013, 08:18 AM   #8
gdejonge
Member
 
Registered: Aug 2010
Location: Netherlands
Distribution: Kubuntu, Debian, Suse, Slackware
Posts: 317

Rep: Reputation: 73
As Bernd told you 1 block is a kilobyte (kB). So 1 Megabyte would be 1024 blocks and 1 Gigabyte would be 1024 * 1024 blocks.

And if you are a SI fetish-ist it would be 1000 blocks and 1000 * 1000 blocks

Cheers
 
Old 12-17-2013, 08:23 AM   #9
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian i686 (solaris)
Posts: 8,129

Rep: Reputation: 2272Reputation: 2272Reputation: 2272Reputation: 2272Reputation: 2272Reputation: 2272Reputation: 2272Reputation: 2272Reputation: 2272Reputation: 2272Reputation: 2272
first press u to change displayed values/units.
Next, you will see something like this: (this is my drive)
Code:
unit = cylinder
Disk /dev/sda: 180.0 GB, 180045766656 bytes
255 heads, 63 sectors/track, 21889 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

unit = sector
Disk /dev/sda: 180.0 GB, 180045766656 bytes
255 heads, 63 sectors/track, 21889 cylinders, total 351651888 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
You will see 351651888 sectors or 21889 cylinders, altogether 180045766656 bytes
that will give you a hint I think
 
Old 12-17-2013, 08:31 AM   #10
sachin.davra
Member
 
Registered: Jul 2013
Posts: 213

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by gdejonge View Post
As Bernd told you 1 block is a kilobyte (kB). So 1 Megabyte would be 1024 blocks and 1 Gigabyte would be 1024 * 1024 blocks.

And if you are a SI fetish-ist it would be 1000 blocks and 1000 * 1000 blocks

Cheers

Thnx so much.. i got the point.

it means now i am using
164251165 blocks = 160402 MB = 156 GB

total space = 270GB

free space -- 270GB-156GB=114GB


Please tell me if i am wrong. if not then i got your point correctly and i can calculate any number of block size.
 
Old 12-17-2013, 08:51 AM   #11
gdejonge
Member
 
Registered: Aug 2010
Location: Netherlands
Distribution: Kubuntu, Debian, Suse, Slackware
Posts: 317

Rep: Reputation: 73
Nah, you got it all right.

Cheers
 
Old 12-17-2013, 08:51 AM   #12
sachin.davra
Member
 
Registered: Jul 2013
Posts: 213

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by gdejonge View Post
Nah, you got it all right.

Cheers
Thanx for your help.
 
  


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
[SOLVED] gparted: Invalid partition table - recursive partition on /dev/sdb unixunderground Linux - Software 5 04-26-2015 05:26 PM
"No partition table or unknown signature on partition table" 10.1 install madcow007 Slackware 4 02-09-2009 12:04 PM
openSolaris hosed the partition table. Why? Changing primary to secondary partition? JZL240I-U Solaris / OpenSolaris 9 10-16-2008 11:48 AM
Messed up partition table and Windows' partition boot sector pyromithrandir Linux - General 32 04-08-2006 01:26 PM
Slack 10: S-ATA = "No partition table or unknown signature on partition table"? dissolved soul Slackware - Installation 11 08-05-2004 03:12 PM


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