[wellylug] Blocks count discrepancy fdisk & df

Blake Watkins blakewatkins at gmail.com
Mon Sep 10 11:27:30 NZST 2007


Hi Carl,
Not sure if you've fixed this or not, but it looks as though you've
increased the partition size, but haven't resized the file system that's on
the partition. Have a look at the resize2fs command. I think what you need
is:

resize2fs -p /dev/hda3 (assuming it's an ext2/ext3 filesystem)

Which should extend the filesystem to use all the space on the partition. It
should leave all the data that's on the file system there, but make sure you
back everything up just in case things don't work.

Cheers,
Blake

On 9/8/07, Kingsley G. Morse Jr. <change at nas.com> wrote:
>
> I wonder if the "fsck" command would shed any
> light on the matter...
>
> Thanks,
> Kingsley
>
> On 09/08/07 11:33, Carl Turney wrote:
> > Hi,
> >
> > I have a weird symptom on my system.  Here are the fdisk and df reports.
>
> > Take particular note of the massive difference between hda3 total blocks
> > counts between the two, unlike for hda1 or hda2.
> >
> > fdisk says ...
> >
> > Disk /dev/hda: 80.0 GB, 80026361856 bytes
> > 255 heads, 63 sectors/track, 9729 cylinders
> > Units = cylinders of 16065 * 512 = 8225280 bytes
> >
> >    Device Boot      Start         End      Blocks   Id  System
> > /dev/hda1   *           1          13      104391   83  Linux
> > /dev/hda2              14         138     1004062+  82  Linux swap /
> Solaris
> > /dev/hda3             139        9729    77039707+  83  Linux
> >
> > df says ...
> >
> > Filesystem           1K-blocks      Used Available Use% Mounted on
> > /dev/hda3             37334192  20044920  15392800  57% /
> > /dev/hda1               101086     13044     82823  14% /boot
> > tmpfs                   257980         0    257980   0% /dev/shm
> >
> > How did I get this?  Well, I had an 80gb ide hard disk with a ~40GB
> LINUX
> > root in partition #3 and an unused ~40GB Windows in partition #4.  I
> > mirrored the #3 LINUX partition onto a normal backup hard disk (using
> > rsync - with success, as usual).  Then I deleted partition #3 and #4 and
> > created one big LINUX partition #3.  I "restored" from the backup using
> > the following tar command:
> > tar lcpf - . | ( cd /mnt/newroot; tar xpf - )
> > /mnt/newroot being the mount point for my newly created/expanded
> partition
> >
> > Naturally, I rebooted immediately after repartitioning, relocated
> physical
> > original/backup disks as necessary, etc.
> >
> > Everything works fine.  All apps and data accessible etc.  BUT I AM VERY
> > CONCERNED ABOUT THE CAUSE, POSSIBLE IMPLICATIONS, AND SOLUTION FOR THE
> > BLOCKS COUNTS DISCREPANCY.
> >
> > Thanks VERY much, anyone who can help.
> >
> > Carl Turney
> > Mobile 027 6913 080
> >
> >
> >
> >
> > --
> > Wellington Linux Users Group Mailing List: wellylug at lists.wellylug.org.nz
>
> > To Leave:  http://lists.wellylug.org.nz/mailman/listinfo/wellylug
>
>
> --
> Wellington Linux Users Group Mailing List: wellylug at lists.wellylug.org.nz
> To Leave:  http://lists.wellylug.org.nz/mailman/listinfo/wellylug
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.wellylug.org.nz/pipermail/wellylug/attachments/20070910/a49b5a7c/attachment.htm 


More information about the wellylug mailing list