Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need to test partitioning but it risky because it might delete or overwrite an existing prtition or delete existing data. how can i check the unpartitioned space. these are the details from different commands :

[pts/1][20:40:19:root@HW123635 ] ~> df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda3              15G  7.5G  6.3G  55% /
/dev/sda1              99M   12M   82M  13% /boot
none                  2.0G     0  2.0G   0% /dev/shm
/dev/sda2              15G   11G  2.8G  80% /home
/dev/sda5             9.7G  6.9G  2.3G  76% /opt
/dev/sda7             9.7G  4.9G  4.4G  53% /usr
/dev/sda6             9.7G  7.8G  1.4G  85% /var



[pts/1][20:41:10:root@HW123635 ] ~> cat /proc/partitions
major minor  #blocks  name

   8     0  143374744 sda
   8     1     104391 sda1
   8     2   15358140 sda2
   8     3   15358140 sda3
   8     4          1 sda4
   8     5   10241406 sda5
   8     6   10241406 sda6
   8     7   10241406 sda7
   8     8    8193118 sda8
   8    16  143374744 sdb

[pts/1][20:41:37:root@HW123635 ] ~> fdisk -l

Disk /dev/sda: 146.8 GB, 146815737856 bytes
255 heads, 63 sectors/track, 17849 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        1925    15358140   83  Linux
/dev/sda3            1926        3837    15358140   83  Linux
/dev/sda4            3838       17849   112551390    5  Extended
/dev/sda5            3838        5112    10241406   83  Linux
/dev/sda6            5113        6387    10241406   83  Linux
/dev/sda7            6388        7662    10241406   83  Linux
/dev/sda8            7663        8682     8193118+  82  Linux swap

Disk /dev/sdb: 146.8 GB, 146815737856 bytes
255 heads, 63 sectors/track, 17849 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
You have new mail in /var/spool/mail/root
share|improve this question
up vote 4 down vote accepted

You seem to have unpartitioned space after cylinder 8682 till 17849. You could try either Gparted which presents a graphical representation of your disk (recommended) or type sudo fdisk -l.

In any case, make sure you backup any important information on an external disk before messing up with partitions to avoid data loss.

share|improve this answer
1  
I see a /dev/sda4 above as an extended partition, meaning it is a sort of container partition. About /dev/shm see this link about shared memory. – To Do Dec 20 '12 at 15:34
    
+1 for gparted but there is unpartitioned space on OP's sda disk and looks like sdb is empty if fdisk output is complete. – laurent Dec 20 '12 at 16:55
    
You're right. I corrected my answer. – To Do Dec 20 '12 at 17:30
    
cfdisk is another utility that shows unpartitioned space relatively intuitively. GParted is GUI whereas cfdisk is text-mode. For GPT disks (vs. MBR, which the question shows), cgdisk works much like cfdisk. – Rod Smith Dec 21 '12 at 5:24

Your free space is on the extended partition /dev/sda4 from cylinders 8683 to 17849. Note that /dev/sda4 covers a large amount of space, but the partitions inside of it don't cover all of that space.

share|improve this answer
    
The fdisk -l output looks truncated but you have also a 160GB (147GB) disk as sdb that may have space on it. This could be seen on a complete fdisk -l output. If the output is not truncated, that means this 2nd disk has no partitions at all yet. – laurent Dec 20 '12 at 16:53
    
Yes, it looks like OP has two areas of free space to partition if there isn't anything on sdb. – Viertaxa Dec 20 '12 at 16:58

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .