can't recognize the harddisk size

Doug doug at hacks.perl.sh
Sat Apr 20 03:14:43 UTC 2013


Hello,

I try to add a new 2T SATA disk to my ubuntu system.
After the disk is installed, I run fdisk to format the whole disk as a
partion.

Command (m for help): p

Disk /dev/sda: 2000.4 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1      243201  1953512001   83  Linux
Partition 1 does not start on physical sector boundary.

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.

WARNING: Re-reading the partition table failed with error 16: Device or
resource busy.
The kernel still uses the old table. The new table will be used at
the next reboot or after you run partprobe(8) or kpartx(8)



Then I run mkfs to make the filesystem:

root at xiaopeng:~# mkfs.ext4 /dev/sda1
mke2fs 1.41.11 (14-Mar-2010)
文件系统标签=
操作系统:Linux
块大小=1024 (log=0)
分块大小=1024 (log=0)
Stride=4 blocks, Stripe width=0 blocks
128 inodes, 1024 blocks
51 blocks (4.98%) reserved for the super user
第一个数据块=1
Maximum filesystem blocks=1048576
1 block group
8192 blocks per group, 8192 fragments per group
128 inodes per group

正在写入inode表: 完成

文件系统小得无法记录日志
Writing superblocks and filesystem accounting information: 完成

This filesystem will be automatically checked every 36 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.


Finally I mount it to the system location:  mount /dev/sda1  /data2
But as you see below, the 2T harddisk's size is wrong, it shows only 1003K.

root at xiaopeng:~# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sdb1              28G  2.5G   24G  10% /
none                  3.9G  208K  3.9G   1% /dev
none                  4.0G     0  4.0G   0% /dev/shm
none                  4.0G   44K  4.0G   1% /var/run
none                  4.0G     0  4.0G   0% /var/lock
none                  4.0G     0  4.0G   0% /lib/init/rw
/dev/sdb4             243G   30G  201G  13% /data
/dev/sdb3             1.9G   35M  1.8G   2% /tmp
/dev/sda1            1003K   17K  935K   2% /data2



What's wrong with me? The system type is:

Ubuntu 10.04.4 LTS
Linux xiaopeng 2.6.32-38-server #83-Ubuntu SMP Wed Jan 4 11:26:59 UTC 2012
x86_64 GNU/Linux


I wait for your kind answers. Thanks in advance.

Regards.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20130420/8306bc5b/attachment.html>


More information about the ubuntu-users mailing list