Re: How to recover a damaged partition

2015-01-22 Thread Gene Heskett
On Wednesday 21 January 2015 21:53:23 Kevin O'Gorman did opine
And Gene did reply:
 I'm working with new 4TB drives, and one of them just had a bad spot in
 a fairly awkward place.
 The very first block of an ext4 partition was unreadable, and caused
 problems in booting, as well as anything else that wanted to scan
 partitions.

Warranty it now.  Thats a surface defect that, since its scanned back and 
forth across almost anytime the disk is read or written to, causing head 
damage that will in time ruin the rest of the platter surfaces.

The bad area will grow with time, and has in every instance I have 
encountered it. I am a packrat and from my first hard drive, I have a 
printout of the badsectors file descriptor from an ST238R drive.  But I 
had to keep adding to it, and when I was out of segment room in that 
filesystem (os9 level 1) I bit the bullet and replaced both the drive and 
controller with scsi stuff.  I never realized what a headache I'd had with 
lost data until I didn't have it anymore.

 I overwrote the first 4K with zeroes, deleted the partition (with
 gdisk) and created a new unformatted partition to cover the area.  Now
 that partition passes a read test, and I'm checking the other
 partitions.
 
 The damaged partition has been inactive for a while, so I'm quite sure
 I have adequate backups.  But now seems to be a time for me to learn
 -- lots of things have been going wrong, and I've been learning how to
 cope.
 
 So I wonder if there's a way to get that partition back, at least in
 part, without using my backups.
 
 Any hints, pointers, tutorials, or opinions welcome.

Warranty it, and then use your backups to restore its replacement.  You 
will be way ahead of the game in terms of the time spent messing with it, 
and the headaches recovering from its mistakes.

The fact that the drive has not substituted a spare block or 20 says it 
has probably done so already and has no more spares.  A query with 
smartctl would I suspect, confirm it.  Most drives maintain a spare sector 
area that is lots more than the 4k you are missing. For a 4Tb drive, 
probably a gigabyte in those spare reserves.

Cheers, Gene Heskett
-- 
There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order.
-Ed Howdershelt (Author)
Genes Web page http://geneslinuxbox.net:6309/gene
US V Castleman, SCOTUS, Mar 2014 is grounds for Impeaching SCOTUS


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/201501220652.08155.ghesk...@wdtv.com



Re: How to recover a damaged partition

2015-01-21 Thread Gary Dale

On 21/01/15 09:53 PM, Kevin O'Gorman wrote:
I'm working with new 4TB drives, and one of them just had a bad spot 
in a fairly awkward place.
The very first block of an ext4 partition was unreadable, and caused 
problems in booting, as well as anything else that wanted to scan 
partitions.


I overwrote the first 4K with zeroes, deleted the partition (with 
gdisk) and created a new unformatted partition to cover the area.  Now 
that partition passes a read test, and I'm checking the other partitions.


The damaged partition has been inactive for a while, so I'm quite sure 
I have adequate backups.  But now seems to be a time for me to learn 
-- lots of things have been going wrong, and I've been learning how to 
cope.


So I wonder if there's a way to get that partition back, at least in 
part, without using my backups.


Any hints, pointers, tutorials, or opinions welcome.

--
Kevin O'Gorman
#define QUESTION ((bb) || (!bb))   /* Shakespeare */

Please consider the environment before printing this email.


If you haven't reformatted the partition, use testdisk on it. Or you can 
tell fsck to use a backup superblock instead of the one you overwrote 
with zeros.



--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org

Archive: https://lists.debian.org/54c08317.4080...@torfree.net



Re: How to recover a damaged partition

2015-01-21 Thread David Wright
Quoting Kevin O'Gorman (kogor...@gmail.com):
 I'm working with new 4TB drives, and one of them just had a bad spot in a
 fairly awkward place.
 The very first block of an ext4 partition was unreadable, and caused problems
 in booting, as well as anything else that wanted to scan partitions.
 
 I overwrote the first 4K with zeroes, deleted the partition (with gdisk) and
 created a new unformatted partition to cover the area.  Now that partition
 passes a read test, and I'm checking the other partitions.
 
 The damaged partition has been inactive for a while, so I'm quite sure I have
 adequate backups.  But now seems to be a time for me to learn -- lots of 
 things
 have been going wrong, and I've been learning how to cope.
 
 So I wonder if there's a way to get that partition back, at least in part,
 without using my backups.

Having had a similar problem where the first few blocks of a partition
wouldn't read, I used dd to ascertain what I could and couldn't read,
and then:

Create a blank start of a file:

dd bs=512 if=/dev/zero of=/ylarge/image-of-hdd4-skipping-16 count=16

Add the undamaged part of the partition:

dd bs=512 if=/dev/hdd4 of=/ylarge/image-of-hdd4-skipping-16 skip=16 seek=16

See if it can be mended:

e2fsck -n -f /ylarge/image-of-hdd4-skipping-16

If so, mend it:

e2fsck -f /ylarge/image-of-hdd4-skipping-16

Mount it:

mount -t ext3 -o ro,loop=/dev/loop0 /ylarge/image-of-hdd4-skipping-16 /mnt

Copy off all the files.

hdd4 was the failed partition. /ylarge was a filesystem big enough to
hold an image of hdd4. Note however that hdd4 was ext3, not ext4. I
don't know whether that affects things. Good luck.

Cheers,
David.


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/20150122045521.ga17...@alum.home



Re: How to recover a damaged partition

2015-01-21 Thread Joseph Loo

On 01/21/2015 06:53 PM, Kevin O'Gorman wrote:

I'm working with new 4TB drives, and one of them just had a bad spot in
a fairly awkward place.
The very first block of an ext4 partition was unreadable, and caused
problems in booting, as well as anything else that wanted to scan
partitions.

I overwrote the first 4K with zeroes, deleted the partition (with gdisk)
and created a new unformatted partition to cover the area.  Now that
partition passes a read test, and I'm checking the other partitions.

The damaged partition has been inactive for a while, so I'm quite sure I
have adequate backups.  But now seems to be a time for me to learn --
lots of things have been going wrong, and I've been learning how to cope.

So I wonder if there's a way to get that partition back, at least in
part, without using my backups.

Any hints, pointers, tutorials, or opinions welcome.

--
Kevin O'Gorman
#define QUESTION ((bb) || (!bb))   /* Shakespeare */

Please consider the environment before printing this email.


Have you tried doing a badblocks on the partition. This will try reading 
and writing data to the partition to check the disk drive. I generally 
do this on my drive before deploying. It tends to remove the bad blocks.


You can also try grc's Spinrite (cost money) at grc.com

--
Joseph Loo
j...@acm.org


--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org

Archive: https://lists.debian.org/54c06e22.4080...@aqcm.org



How to recover a damaged partition

2015-01-21 Thread Kevin O'Gorman
I'm working with new 4TB drives, and one of them just had a bad spot in a
fairly awkward place.
The very first block of an ext4 partition was unreadable, and caused
problems in booting, as well as anything else that wanted to scan
partitions.

I overwrote the first 4K with zeroes, deleted the partition (with gdisk)
and created a new unformatted partition to cover the area.  Now that
partition passes a read test, and I'm checking the other partitions.

The damaged partition has been inactive for a while, so I'm quite sure I
have adequate backups.  But now seems to be a time for me to learn -- lots
of things have been going wrong, and I've been learning how to cope.

So I wonder if there's a way to get that partition back, at least in part,
without using my backups.

Any hints, pointers, tutorials, or opinions welcome.

-- 
Kevin O'Gorman
#define QUESTION ((bb) || (!bb))   /* Shakespeare */

Please consider the environment before printing this email.