• Home
  • Help
  • Search
  • Login
  • Register
Pages: [1]
Author Topic: filsystem on 2TB drive not using full capacity  (Read 2256 times)
Jr. Member

Karma: 0
Posts: 50

View Profile
« on: January 26, 2014, 08:44:01 AM »

I have Guruplug server booting from an external SATA drive.

A while ago I upgraded the drive from 1TB to 2TB by transferring both drives to a desktop computer.  First
I created a new partition table on the 2TB drive with everything the same except /dev/sda9 which I set to
use the ending cylinder.  Then I used dd to copy the contents of the partitions to the new drive.

Wheezy boots from the new drive and everything seems OK except when I use df -h I see that /dev/sda9
is much smaller than it is supposed to be:

# df -H
Filesystem                                              Size  Used Avail Use% Mounted on
rootfs                                                  272M  153M  105M  60% /
udev                                                     11M     0   11M   0% /dev
tmpfs                                                    53M  476k   53M   1% /run
/dev/disk/by-uuid/525184d1-eb77     272M  153M  105M  60% /
tmpfs                                                   5.3M     0  5.3M   0% /run/lock
tmpfs                                                   415M     0  415M   0% /run/shm
/dev/sda1                                               239M   39M  188M  17% /boot
/dev/sda9                                               975G   34G  892G   4% /home
/dev/sda8                                               386M   11M  356M   3% /tmp
/dev/sda5                                               5.0G  1.2G  3.6G  24% /usr
/dev/sda6                                               3.0G  652M  2.2G  24% /var

But /dev/sda9 should have an extra 1TB according to this

# sfdisk -l -uM
Disk /dev/sda: 243201 cylinders, 255 heads, 63 sectors/track
Warning: extended partition does not start at a cylinder boundary.
DOS and Linux will interpret the contents differently.
Units = mebibytes of 1048576 bytes, blocks of 1024 bytes, counting from 0

   Device Boot Start   End    MiB    #blocks   Id  System
/dev/sda1   *     1    243    243     248832   83  Linux
/dev/sda2       244    510    267     273408   83  Linux
/dev/sda3       511  1907728  1907218  1952991232    5  Extended
/dev/sda4         0      -      0          0    0  Empty
/dev/sda5       512   5283   4772    4886528   83  Linux
/dev/sda6      5285   8141   2857    2925568   83  Linux
/dev/sda7      8143   9617   1475    1510400   82  Linux swap / Solaris
/dev/sda8      9619   9998    380     389120   83  Linux
/dev/sda9     10000  1907728  1897729  1943274496   83  Linux

Am I understanding this correctly?  The /dev/sda9 partition is the correct size but the
filesystem can't see the extra 1 TB?

The other problem I had was that the swap partition kept the UUID of the old drive rather
than the new drive.  I had all kinds of weird memory problems until I saw the error in

Sr. Member

Karma: 4
Posts: 443

View Profile WWW
« Reply #1 on: January 26, 2014, 07:31:07 PM »

Then I used dd to copy the contents of the partitions to the new drive.
So you copied the file system (which includes its size) into what is now a larger partition.  But the file-system is still the same size.

You need to use resize2fs to expand the file-system on /dev/sda9 now (assuming it is an ext2/ext3/et4 file-system).

Take a look at it's man page, and:


NOTE that you have already enlarged the partition - you just want to grow the file-system to use all of the space.

Also note that all of these things warn about backing up before you do anything.

Pages: [1]
Jump to: