The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Operating Systems > Linux > Ubuntu
.
google unix.com



Ubuntu Ubuntu is a complete desktop Linux operating system, freely available with both community and professional support.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
FTP Perl Script File Size Mismatch. mbb Shell Programming and Scripting 1 09-26-2009 12:56 PM
Mounting a USB device with a persistent name jimthompson UNIX for Advanced & Expert Users 2 08-06-2008 02:33 AM
Mounting a USB device with a predetermined name jimthompson UNIX and Linux Applications 0 08-04-2008 12:18 PM
mounting usb device manoj.solaris Linux 4 04-25-2008 11:41 AM
scsi sda device not mounting !! moxxx68 UNIX for Advanced & Expert Users 20 11-14-2004 05:46 PM

Reply
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 06-30-2009
rac_oradba rac_oradba is offline
Registered User
  
 

Join Date: Jun 2009
Posts: 1
device size mismatch after mounting

Hi,
I have a created a logical partition sda5 in ubuntu server 9.0.4.
which is
Disk /dev/sda: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00053d78

Device Boot Start End Blocks Id System
/dev/sda1 * 1 1216 9767488+ 83 Linux
/dev/sda2 1217 1702 3903795 82 Linux swap / Solaris
/dev/sda3 1703 30401 230524717+ 5 Extended
/dev/sda5 1703 30401 230524686 83 Linux

formatted the device as mkfs -t ext3 /dev/sda5
then i mounted it on to a directory which belongs to root user.

once I mounted the /dev/sda5 device on to a local directory.
I am seeing that the filesystem size is way too difference than what i have created.
/dev/sda5 10325748 1098212 8703016 12% /var/lib/vmware/vmwarehosts

Can somebody please let me know where i am going wrong here. why am i not seeing the full 230 gigs which shows in fdisk.
  #2 (permalink)  
Old 07-02-2009
otheus's Avatar
otheus otheus is offline Forum Staff  
Moderator ala Mode
  
 

Join Date: Feb 2007
Location: Innsbruck, Austria
Posts: 1,864
After re-partitioning the drive to make the extended partition, did you reboot? Unfortunately, sometimes, Linux cannot re-read the partition table and so mkfs uses the previous-known size of the partition to size the filesystem. You'll need to reboot.

Alternatively, you can tell mke2fs how big a filesystem to make with something like:
Code:
mke2fs -j -b 4096 /dev/sda5  $[ 230524686/4096 ]
The $[ ... ] expression calculates how many 4k-blocks you need to fill 230 mega-blocks.

Keep in mind, 230 Megablocks is about 210 Gigabytes (GB), not 230. You can expect 12% less than that, so about 202 GB will be free after creation.

You can get better utilization with some tweaks. Since this is going to be for your VMs, you can use a smaller ratio of inodes-blocks. Also, sparse_super should be default, but just in case....
Code:
mke2fs -O sparse_super -i 4194304 -j -b 4096 /dev/sda5  $[ 230524686/4096 ]
Sponsored Links
Reply

Bookmarks

Tags
ext3, filesystem, linux, partition

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 04:48 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language translation by Google.
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0