Re: partition extends past end of disk

From: Stefan Patric (tootek2_at_yahoo.com)
Date: 09/02/03


Date: Mon, 01 Sep 2003 18:19:07 -0700

Stuart D. Gathman on Sunday 31 August 2003 22:10 wrote:

> While attempting to upgrade to RH7.3, I discovered that my root
> partition extends past the end of the disk, as verified by:
>
> # /sbin/sfdisk -V /dev/hda
> Warning: partition 3 extends past end of disk
> # /sbin/sfdisk -l /dev/hda
>
> Disk /dev/hda: 2431 cylinders, 255 heads, 63 sectors/track
> Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting
> from 0
>
> Device Boot Start End #cyls #blocks Id System
> /dev/hda1 0+ 6 7- 56196 6 FAT16
> /dev/hda2 * 7 10 4 32130 83 Linux
> /dev/hda3 11 2433 2423 19462747+ 85 Linux extended
> /dev/hda4 0 - 0 0 0 Empty
> /dev/hda5 11+ 43 33- 265041 82 Linux swap
> /dev/hda6 44+ 2433 2390- 19197643+ 83 Linux
>
> The system has been running fine (RH7.2), but I assume it might mess
> up when the filesystem gets nearly full.
>
> How can I fix this? I have a Super Rescue CD - but what utility
> will fix
> this? I have a tape backup, and will certainly make a fresh backup
> before beginning, but would prefer not to have to restore the backup
> (it
> is TR-5 and takes several hours). How can I check how many blocks
> the
> filesystem is using? The df command only reports the data portion.
> I think parted is supposed to resize filesystems, but it uses a
> confusing
> megabyte unit for sizes. How do I tell it to resize to the real end
> of
> the disk? How did the mess happen in the first place?

Try using resize2fs, which is designed to resize -- reduce or expand
-- the ext2 or ext3 filesystems. It DOESN'T change the size of the
partition, only the size of the filesystem on it. Use fdisk or
parted to resize the partition after using resize2fs. man resize2fs
for details.

Also, where did /dev/hda4 come from? It starts at the beginning of
the hard drive, same as /dev/hda1, but is of zero size. Try deleting
it with fdisk.

-- 
Stefan Patric
tootek2@yahoo.com


Relevant Pages

  • Weird harddisk behaviour
    ... A couple of weeks ago my 400Gb SATA disk crashed. ... Partition Table for /dev/sda ... # Type Sector Sector Offset Length Filesystem Type Flag ... Superblock backups stored on blocks: ...
    (Linux-Kernel)
  • Re: [opensuse] rsync questions - backups - again !
    ... occurred and you'd end up with an inconsistent filesystem. ... the backup may become corrupt enough to be unusable. ... One theoretically possible method would be, if you have a raid 1 system, to stop one side, then clone the stopped side to another disk, then reactivate the stopped side. ... Another theoretical possibility would be the contrary: the system would freeze the source partition sourcing the dd, recording somewhere else the changes done by other programs; ie, the changes would not be written on the intended partition, but on another "recent changes" partition. ...
    (SuSE)
  • Re: HTFS Filesystem
    ... This is/was a root disk so I ... since I took the default swap and boot partition sizes, ... division table divvy would still wipe out my data. ... > filesystem parameters named FSIZE and ISIZE. ...
    (comp.unix.sco.misc)
  • Re: Corrupted superblock
    ... As a result I've ignored LVM. ... a disk or disk partition is known as a Physical Volume ... An LV can hold a filesystem, swapspace, ...
    (uk.comp.os.linux)
  • Re: Booting - Enterprise Volume Management System
    ... blocksize of your filesystem and calculate the new size based on those units. ... physical disk partition. ... You manipulate a virtual partition and don't ... Software raid will always be slower than LVM ...
    (Ubuntu)