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 05-25-2013, 06:03 AM   #1
pedenski
Member
 
Registered: Feb 2012
Posts: 33

Rep: Reputation: Disabled
cannot detect the additional 5GB on my expanded virtual disk


Detecting the newly added unallocated disk in UBUNTU.

Initial setup, i have 10GB of virtual disk, then i added another 5GB, total of 15GB.

fdisk -l displays below [line 1]
Disk /dev/sda: 16.1 GB, 16106127360 bytes

Code:
Disk /dev/sda: 16.1 GB, 16106127360 bytes
255 heads, 63 sectors/track, 1958 cylinders, total 31457280 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
Disk identifier: 0x0002948a

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048      499711      248832   83  Linux
/dev/sda2          501758    20969471    10233857    5  Extended
/dev/sda5          501760    20969471    10233856   8e  Linux LVM

Disk /dev/mapper/test-root: 9403 MB, 9403629568 bytes
255 heads, 63 sectors/track, 1143 cylinders, total 18366464 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
Disk identifier: 0x00000000

Disk /dev/mapper/media-root doesn't contain a valid partition table

Disk /dev/mapper/test-swap_1: 1073 MB, 1073741824 bytes
255 heads, 63 sectors/track, 130 cylinders, total 2097152 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
Disk identifier: 0x00000000

Disk /dev/mapper/test-swap_1 doesn't contain a valid partition table
root@test:~#
when i create a new partition using the below syntax

#fdisk /dev/sda

Code:
Partition type:
   p   primary (1 primary, 1 extended, 2 free)
   l   logical (numbered from 5)
Select (default p): p
Partition number (1-4, default 3):
Using default value 3
First sector (499712-31457279, default 499712):
Using default value 499712
Last sector, +sectors or +size{K,M,G} (499712-501757, default 501757):
Using default value 501757

Command (m for help): p

Disk /dev/sda: 16.1 GB, 16106127360 bytes
255 heads, 63 sectors/track, 1958 cylinders, total 31457280 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
Disk identifier: 0x0002948a

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048      499711      248832   83  Linux
/dev/sda2          501758    20969471    10233857    5  Extended
/dev/sda3          499712      501757        1023   83  Linux
/dev/sda5          501760    20969471    10233856   8e  Linux LVM

Partition table entries are not in disk order

Command (m for help): /dev/sda3          499712      501757        1023   83  Li
nux^C
root@test:~#
why is my
Code:
/dev/sda3          499712      501757        1023   83  Linux
only getting 1023? i dont seem to detect the additional 5GB
 
Old 05-25-2013, 07:15 AM   #2
at398
LQ Newbie
 
Registered: May 2013
Posts: 15

Rep: Reputation: Disabled
Is your ubuntu install in virtualbox? if it is can you not add a virtual disk to the system from settings and use gparted (or whatever tool you prefer) to format it as ext4 etc etc?
 
Old 05-25-2013, 07:54 AM   #3
mddnix
Member
 
Registered: Mar 2013
Distribution: Redhat, Ubuntu
Posts: 525

Rep: Reputation: 141Reputation: 141
Quote:
Partition table entries are not in disk order
Probably this is because partitions are not in order. Try this
  1. # fdisk /dev/sda
  2. Delete /dev/sda3 partition
  3. Hit x for expert commands
  4. Hit f to correct partition table entry disk order
  5. Hit r to return to main menu
  6. Now create partition.
Hopefully you will get that lost size.

Last edited by mddnix; 05-25-2013 at 07:58 AM.
 
Old 05-25-2013, 09:54 AM   #4
pedenski
Member
 
Registered: Feb 2012
Posts: 33

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by at398 View Post
Is your ubuntu install in virtualbox? if it is can you not add a virtual disk to the system from settings and use gparted (or whatever tool you prefer) to format it as ext4 etc etc?
yes, its installed in VMware. im really considering the option of switching to ext4, instead of using lvm.
but expansion of disk in ext4 requires a reboot, i was just testing lvm because people were saying you cannot have reboot when expanding additional disk in lvm filesystem.

makes me really think about how windows does the disk expansion really easy to the user. but now im stuck with ubuntu for some reasons..

Quote:
Probably this is because partitions are not in order. Try this
# fdisk /dev/sda
Delete /dev/sda3 partition
Hit x for expert commands
Hit f to correct partition table entry disk order
Hit r to return to main menu
Now create partition.
i get this
Code:
Expert command (m for help): f
Nothing to do. Ordering is correct already.
 
Old 05-25-2013, 10:17 AM   #5
mddnix
Member
 
Registered: Mar 2013
Distribution: Redhat, Ubuntu
Posts: 525

Rep: Reputation: 141Reputation: 141
Quote:
Originally Posted by pedenski View Post
Expert command (m for help): f
Nothing to do. Ordering is correct already.
hmmm. /dev/sda3 is taking secotrs in the gap between sda1 and sda2 (499711 - 501758). that is why it is 1023 in size. i hoped 'fix disk ordering' will correct the problem. try to create another partition. see that partition will get rest of the sectors (20969471 and above).

Quote:
i was just testing lvm because people were saying you cannot have reboot when expanding additional disk in lvm filesystem.
It is correct. you dont need to reboot to resize lvm logical volume. in case the logical volume is '/', it recommended to resize the LV while offline. rest you can resize online.
 
  


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
cannot detect additional virtual disk on centos pedenski Linux - Newbie 1 05-22-2013 03:21 PM
Debian does Not detect additional RAM Abhid Linux - Hardware 23 09-19-2012 06:36 AM
Detect viruses inside the .vmdk(VMware "Virtual MAchine Disk Format") image? m4rtin Linux - Security 1 02-06-2011 04:42 AM
Expanded disk linuxgoose Linux - Software 14 03-24-2010 08:49 PM
Slackware and Gentoo only detect 1GB out of 3.5GB of RAM DiscoGranny Linux - Newbie 6 06-25-2005 02:34 PM


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