device size mismatch after mounting


 
Thread Tools Search this Thread
Operating Systems Linux Ubuntu device size mismatch after mounting
# 1  
Old 06-30-2009
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  
Old 07-02-2009
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 ]

Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. AIX

AIX dump device not showing accurate size

I am trying to configure dump devices on my AIX server. Running 7100-03-04-1441. My dump device needs to be about 2GB in size. My PP Size is 1024MB, so I create the device with 2 PPs. When I run lslv on the dump device, it shows the 2 PPs, and a PP Size of 1024 megabytes. However, a dumpcheck... (4 Replies)
Discussion started by: paqman
4 Replies

2. HP-UX

Failed to open tape device /dev/rmt/0mn:Device busy (errno = 16)

Hi, Unable to make tape backup, please help. /opt/ignite/bin/make_tape_recovery -a /dev/rmt/?mn -I -v -m tar -x inc_entire=vg00 * Creating local directories for configuration files and archive. ======= 04/25/16 16:28:08 IST Started /opt/ignite/bin/make_tape_recovery. (Mon... (4 Replies)
Discussion started by: anuragr
4 Replies

3. Red Hat

Unable To Activate Ethernet Network Device in RHEL 5.5 - e100 device eth0 does not seem to be presen

Hi All, Could anyone please help to resolve the below problem. I installed RHEL5.5 in my desktop.But when i try to activate the ethernet connection then it gives me the error. I spent 2 days for the above and go through with several suggestion found by googling. But no luck. ... (0 Replies)
Discussion started by: Tanmoy
0 Replies

4. Shell Programming and Scripting

FTP Perl Script File Size Mismatch.

Hello, I've written a Perl script that copies a set of files from one server to another. Prior to transferring a file the script gets the file size from the source system and compares this to the file size received in the target system. Except that the file sizes are slightly different. ... (1 Reply)
Discussion started by: mbb
1 Replies

5. UNIX for Advanced & Expert Users

Mounting a USB device with a persistent name

When I attach a USB storage device to my Solaris server, the mount point is coming up as /rmdisk/unnamed_rmdisk Is there anyway I can have this device come up as a mounted device with a predetermined mount name eg /morespace rather than unnamed_rmdisk ? (2 Replies)
Discussion started by: jimthompson
2 Replies

6. UNIX and Linux Applications

Mounting a USB device with a predetermined name

When I attach a USB storage device to my Solaris server, the mount point is coming up as /rmdisk/unnamed_rmdisk Is there anyway I can have this device come up as a mounted device with a predetermined mount name eg /morespace rather than unnamed_rmdisk ? (0 Replies)
Discussion started by: jimthompson
0 Replies

7. Linux

mounting usb device

Hi Folks, I want to know how to mount usb device (cd,dvd etc) in linux, Regards, Manoj (4 Replies)
Discussion started by: manoj.solaris
4 Replies

8. UNIX for Dummies Questions & Answers

Mounting a flash device

How do you mount a USB flash drive on Sun Blade 2000 or 2500 with solaris 8? Thanks in advance ;) (1 Reply)
Discussion started by: xeroxtechnician
1 Replies

9. UNIX for Advanced & Expert Users

scsi sda device not mounting !!

I have a small scsi memory disk device that my computer claims is a /dev/sda mount type.. and I have mounted it in the past.. but I just recently reinstalled my whole system to check out a couple of things on my database. including the scsi device and now I can't get it to mount.. i tried to mount... (20 Replies)
Discussion started by: moxxx68
20 Replies
Login or Register to Ask a Question