Announcement

Collapse
No announcement yet.

[Status: Solved] Unformatable Partition (update: dead HD)

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    [Status: Solved] Unformatable Partition (update: dead HD)

    System Specs:
    MEM: 4Gigs
    MoBo: ASUS P5E3 Deluxe
    CPU: Intel Quad Core 2 (...something or other)
    OS: Kubuntu v8.04.01
    Kernel: Linux v2.6.24-24-generic

    Problem:
    One of the partitions on one of the internal HD's (/dev/sdc5) will not format. (As reported from the CLI and from gparted).
    Note: This partition is about 100GB in size.

    History of the problem: (If you do not wish to brief yourself on how this problem came to be, then please skip to the questions located at the end of this message.)
    A few days ago the bootup process began to take an unacceptably long period of time to finish. (Something close to 15 minutes).
    Investigating of the boot process via 'CTRL+ALT+F1' revealed the following problems:
    A huge scrolling and repeating list of error's that looked something like:
    Code:
    [###.######] ata#.0#: status: {DRDY err}
    [###.######] ata#.0#: error: {UNC}
    Also, the following UUID was reported as non-existent: 568915a3-54d8-4dbe-a067-415864015697
    (Note: 'ls -l /dev/disks/*' reports that this UUID belongs to /dev/sdc5. This is also concurrent with fstab which points to this UUID to /media/st3_5)
    Errors were also reported on /dev/sdc5 during the boot process (saying something about a bad buffer block 0 or something. (Lack of comprehensiveness here is due to boot logging being crippled in the Hardy Heron release of Kubuntu.))

    Since there was no important information on this partition I decided to use the opportunity to try a few commands from the CLI for the purposes of learning and possibly recovering the partition. Here is an abbreviated version of what occurred:

    I made sure the device was not mounted:
    Code:
    cliprompt:~$ umount /dev/sdc5
    umount: /dev/sdc5 is not mounted (according to mtab)
    I double checked that it wasn't mounted:
    Code:
    cliprompt:~$ mount -l
    /dev/sda2 on / type ext3 (rw,relatime,errors=remount-ro) []
    proc on /proc type proc (rw,noexec,nosuid,nodev)
    /sys on /sys type sysfs (rw,noexec,nosuid,nodev)
    varrun on /var/run type tmpfs (rw,noexec,nosuid,nodev,mode=0755)
    varlock on /var/lock type tmpfs (rw,noexec,nosuid,nodev,mode=1777)
    udev on /dev type tmpfs (rw,mode=0755)
    devshm on /dev/shm type tmpfs (rw)
    devpts on /dev/pts type devpts (rw,gid=5,mode=620)
    lrm on /lib/modules/2.6.24-24-generic/volatile type tmpfs (rw)
    /dev/sdb1 on /media/ic3_01 type ext3 (rw,nosuid,nodev) []
    /dev/sdc6 on /media/st3_06 type ext3 (rw,nosuid,nodev) []
    /dev/sdc7 on /media/st3_07 type ext3 (rw,nosuid,nodev) []
    /dev/sdd5 on /media/wde_05 type ext3 (rw,nosuid,nodev) []
    /dev/sdd6 on /media/wde_06 type ext3 (rw,nosuid,nodev) []
    /dev/sdd7 on /media/wde_07 type ext3 (rw,nosuid,nodev) []
    /dev/sdd8 on /media/wde_08 type ext3 (rw,nosuid,nodev) []
    /dev/sde1 on /media/USBDisk0 type ext3 (rw,noexec,nosuid,nodev) []
    securityfs on /sys/kernel/security type securityfs (rw)
    rpc_pipefs on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
    binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)
    cliprompt:~$
    An attempt to check and repair the file system was made:
    Code:
    cliprompt:~$ fsck -fyvc /dev/sdc5
    fsck 1.40.8 (13-Mar-2008)
    e2fsck 1.40.8 (13-Mar-2008)
    fsck.ext2: Attempt to read block from filesystem resulted in short read while trying to open /dev/sdc5
    Could this be a zero-length partition?
    cliprompt:~$

    It was most definitely not a zero length partition, and since the boot screen reported a block error on this partition I decided to remind myself about its block sizes:
    Code:
    cliprompt:~$ mke2fs -n /dev/sdc5
    mke2fs 1.40.8 (13-Mar-2008)
    Filesystem label=
    OS type: Linux
    Block size=4096 (log=2)
    Fragment size=4096 (log=2)
    6111232 inodes, 24418784 blocks
    1220939 blocks (5.00%) reserved for the super user
    First data block=0
    Maximum filesystem blocks=0
    746 block groups
    32768 blocks per group, 32768 fragments per group
    8192 inodes per group
    Superblock backups stored on blocks:
        32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
        4096000, 7962624, 11239424, 20480000, 23887872

    Here I could see that the first superblock backup was located at 32768, so I attempted to do another file system check, but this time by providing a block size:
    Code:
    cliprompt:~$ e2fsck -fycv -b 32768 /dev/sdc5
    e2fsck 1.40.8 (13-Mar-2008)
    e2fsck: Device or resource busy while trying to open /dev/sdc5
    Filesystem mounted or opened exclusively by another program?
    Another issuing of 'umount' and 'mount -l' both showed that the device was not mounted, and the command 'lsof' showed that the filesystem was not in use by any other program. After multiple consecutive searches of google, ubuntu and kubuntu forums. I decided that this was a lost cause and that the partition needed to be reformatted.
    Since fdisk is a little tricky I decided to go with "gparted" to format the partition:
    Here is the output from that operation:
    Code:
    GParted 0.3.5
    
    Libparted 1.7.1
    
    Format /dev/sdc5 as ext3 30:52  ( ERROR )
       	
    calibrate /dev/sdc5 09:19  ( SUCCES )
       	
    path: /dev/sdc5
    start: 126
    end: 195350399
    size: 195350274 (93.15 GiB)
    set partitiontype on /dev/sdc5 09:36  ( SUCCES )
       	
    new partitiontype: ext3
    create new ext3 filesystem 00:00  ( ERROR )
       	
    mkfs.ext3 /dev/sdc5
       	
    mke2fs 1.40.8 (13-Mar-2008)
    Could not stat /dev/sdc5 --- No such file or directory
    
    The device apparently does not exist; did you specify it correctly?
    ========================================
    Note: This device does exist and is listed in gparted's GUI, it is also listed in '/dev/disks/', but it is not mentioned in my '/etc/mtab' file.
    Here is copy of this computers mtab file:
    Code:
    /dev/sda2 / ext3 rw,relatime,errors=remount-ro 0 0
    proc /proc proc rw,noexec,nosuid,nodev 0 0
    /sys /sys sysfs rw,noexec,nosuid,nodev 0 0
    varrun /var/run tmpfs rw,noexec,nosuid,nodev,mode=0755 0 0
    varlock /var/lock tmpfs rw,noexec,nosuid,nodev,mode=1777 0 0
    udev /dev tmpfs rw,mode=0755 0 0
    devshm /dev/shm tmpfs rw 0 0
    devpts /dev/pts devpts rw,gid=5,mode=620 0 0
    lrm /lib/modules/2.6.24-24-generic/volatile tmpfs rw 0 0
    /dev/sdb1 /media/ic3_01 ext3 rw,nosuid,nodev 0 0
    /dev/sdc6 /media/st3_06 ext3 rw,nosuid,nodev 0 0
    /dev/sdc7 /media/st3_07 ext3 rw,nosuid,nodev 0 0
    /dev/sdd5 /media/wde_05 ext3 rw,nosuid,nodev 0 0
    /dev/sdd6 /media/wde_06 ext3 rw,nosuid,nodev 0 0
    /dev/sdd7 /media/wde_07 ext3 rw,nosuid,nodev 0 0
    /dev/sdd8 /media/wde_08 ext3 rw,nosuid,nodev 0 0
    /dev/sde1 /media/USBDisk0 ext3 rw,noexec,nosuid,nodev 0 0
    securityfs /sys/kernel/security securityfs rw 0 0
    rpc_pipefs /var/lib/nfs/rpc_pipefs rpc_pipefs rw 0 0
    binfmt_misc /proc/sys/fs/binfmt_misc binfmt_misc rw,noexec,nosuid,nodev 0 0
    Questions:
    First: Do you have any insights as to what I might try next in order to troubleshoot this problem further?
    Second: Could the lack of a reference to '/dev/sdc5' in '/etc/mtab' be causing this problem?
    Finally: What would you do next to solve this problem or force it into a fixed and working state?

    Thank you for being patient and taking the time to read this post.

    #2
    Re: [Status: Unsolved] Unformatable Partition

    You have four internal HDs?
    Windows no longer obstructs my view.
    Using Kubuntu Linux since March 23, 2007.
    "It is a capital mistake to theorize before one has data." - Sherlock Holmes

    Comment


      #3
      Re: [Status: Unsolved] Unformatable Partition

      Originally posted by kubuntuforumsuser

      Questions:
      First: Do you have any insights as to what I might try next in order to troubleshoot this problem further?
      Not sure that this is "insight", but to be sure that the problem is NOT related to the running OS in any way, I would boot either a GParted Live or a Parted Magic (my new favorite) Live CD, and attempt once more to format the partition. Possibly (and after backing up all the data elsewhere on the drive) I would even delete the partition, then re-make it, and format it.


      Second: Could the lack of a reference to '/dev/sdc5' in '/etc/mtab' be causing this problem?
      Kinda doubt it -- I think /etc/mtab is built dynamically based on actual mounted devices, so if it fails to mount, or if you unmounted it, then I would not expect to see it in /etc/mtab.


      Finally: What would you do next to solve this problem or force it into a fixed and working state?
      I think I would proceed on an assumption that a hardware failure is in progress -- I think you need to start moving to Plan B for that hard drive. If the failure is only in the partition table, then it is possible that you could re-partition the drive and continue using it, but once a drive starts spitting "ata" errors, how do you ever trust it again?

      Hope this helps.

      Comment


        #4
        Re: [Status: Unsolved] Unformatable Partition

        Originally posted by Snowhog
        You have four internal HDs?
        Not exactly. I have 3 internal hard drives, and one external hard drive.
        Internal = 2 on the IDE cable, and one SATA drive.
        External = 1 via USB cable as a backup or swap drive.

        Originally posted by dibl
        ...I would boot either a GParted Live or a Parted Magic (my new favorite) Live CD, and attempt once more to format the partition. Possibly (and after backing up all the data elsewhere on the drive) I would even delete the partition, then re-make it, and format it.
        Thats actually the same thought I had after posting. I've just downloaded the "gparted live cd" and the "Parted Magic" live CD. However I'm not too optimistic about this working. Also your wise suggestion about the ata error's being a sign of impending doom for this hard drive doesn't sit to well with me. Specifically since it is a relatively new 400 GB disk. Although now that I think of it, it might still be under warranty.

        You have been quite helpful. Thank you for your thoughts and input.
        I will come back and post an update after using the live CD's to let you know the fate of the disk.

        Comment


          #5
          Re: [Status: Semi-Unsolved] Unformatable Partition

          Sorry to be gloomy about the hdd. Electronics are funny -- either they last 5 years, or they die in the first 30 days, it seems. Although I just recently replaced a dead motherboard that was 2 years old ... luck of the draw, I think.

          One final thought -- if it looks like that drive is not holding its format, before you send it back, you could "dd" it and see if that restores it to functionality. Here's a recent post -- just be damned sure you have the correct drive when you issue the dd command.

          http://kubuntuforums.net/forums/inde...5620#msg195620

          After you "dd" it, when you first boot Parted Magic or Gparted Live CD and look at it, it will invite you to set the partition table in MS-DOS format. That is fine, tell it "YES", and then proceed with partitioning and formatting.

          Comment


            #6
            Re: [Status: Solved] Unformatable Partition (update: dead HD)

            Update:

            I was able to recover about 50% of the files off the hard disk using "testdisk" before it failed completely. After that point, all testing software either did not recognize the existence or presence of the hard disk, OR it recognizes the drive as being present but could not make use of any of the recovery software's features.

            Run Down (Using the PartedMagic Live CD):
            GParted --> Failed to recognize the presence of the disk.
            TestDisk --> Worked but could only recover about 50% of the files that were on the disk. (After one reboot the drive no longer responded to any of testdisk's features)

            Run Down (Using the installed OS):
            e2fsck --> Acted as if the drive was not present and could not make use of any of the recovered superblocks (found by testdisk when testdisk was run using the PartedMagic Live CD).
            fdisk --> Could see that the drive existed but was unable to do anything to the filesystem and always returned errors. Subsequent uses of fdisk failed to recognize the drive as being present.

            Final verdict:
            Since the drive was failing and becoming more unrecognizable with each use of any software attempts to recover it, I deemed it unnecessary to use the 'dd' command. I must admit that after reading the man page for the 'dd' command I wasn't sure that it would be helpful in this circumstance anyway. In short, when looking at my records the drive was actually a little older than I thought it was. It was a few weeks past the end of its Warranty. So I purchased a new hard disk and my computer is back to normal today.

            Thank you again for your helpful suggestions, and for pointing me towards some interesting tools that were very useful in recovering the data.

            Comment


              #7
              Re: [Status: Solved] Unformatable Partition (update: dead HD)

              Well, hardware does die - eventually. One always hopes for the longest life possible, but ...

              Thank you for an excellent recap of the situation.
              Windows no longer obstructs my view.
              Using Kubuntu Linux since March 23, 2007.
              "It is a capital mistake to theorize before one has data." - Sherlock Holmes

              Comment

              Working...
              X