Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.os.linux.setup > #2650

Re: No success repairing my ext4 file system so far, PLEASE HELP!

From Harry <simonsharry@gmail.com>
Newsgroups comp.os.linux.setup
Subject Re: No success repairing my ext4 file system so far, PLEASE HELP!
Date 2012-04-16 02:39 -0700
Organization http://groups.google.com
Message-ID <6086077.2030.1334569167288.JavaMail.geo-discussion-forums@pbep2> (permalink)
References (13 earlier) <jmbs9n$uee$1@omega-3a.local> <74aae4b7-8045-4a9a-8574-1d8f86e51fe9@gh10g2000pbc.googlegroups.com> <jmd6hs$8q5$1@omega-3a.local> <33504745.932.1334459589543.JavaMail.geo-discussion-forums@pbcsi9> <jmfa77$v18$1@omega-3a.local>

Show all headers | View raw


On Monday, April 16, 2012 1:44:31 AM UTC+5:30, Robert Nichols wrote:
> On 04/14/2012 10:13 PM, Harry wrote:
> >
> > This is what, I believe, I did.
> [recap snipped]
> I don't see any way that anything you reported doing could cause the problem
> you are seeing, and frankly I can't come up with any likely typos in those
> commands that would do it either.  If you had mistyped the destination
> device as "sda1" or "sda2" instead of "sda", nothing would have been
> affected (neither ext2/3/4 nor LVM2 store anything in the first 512 bytes).
> If you had mistyped the blocksize as "446k" or the count as "1k", you would
> have overwritten the partition table and possibly part of the ext3 file
> system on that first partition.  You've still got what appears to be a good
> partition table, a good file system on the first partition, and an LVM2
> header at the appropriate location in the second partition.  e2fsck won't do
> any writing if it doesn't find something that looks like a valid superblock.
> Something else had to have happened, but I can't imagine what.

I'm happy to hear that.

> What is the history of that LVM2 PV?  Is it likely that the LVs were
> allocated in single extents?

Don't know. I recall just going with the Fedora 16 installation-time defaults, and only changing the sizes of the swap and root partitions.

>  As a last resort you could do a brute force
> search for a 16-bit integer 0xEF53 (little-endian, the byte order is 53 EF)
> at offset 56 (0x48) in a sector, making that a possible superblock, then
> use dmsetup to define a virtual device that begins 1024 bytes prior to that
> sector and see what e2fsck has to say about that (use the "-n" option so
> that it will open the device read-only).  Sounds like it might take a long
> time, but probably no more than you've already spent.


I think, you meant "offset 56 (0x38)".

I have launched the script listed below. It doesn't do the virtual device mapping *yet*; for now, it just looks for the signature. I will add the device mapper later.

After 43 minutes of running, I printed the progress (kill -10) and got this:
    Trying sector 948135 of 146997248  .645001  %
     ETA: 230 hours ( 9.58  days)
     
Any way to speed it up... say, by skipping regions of the device, considering interesting regions first?


----------------------------------------------------------------
#!/bin/bash
set -u

function printProgress {
    local timeCurr=
    local timeTaken=
    local eta=

    echo "Trying sector $currSector of $lastSector " $(echo "scale=6; $currSector * 100.0 / $lastSector " | bc) " %"

    timeCurr=$(date +%s) # seconds
    (( timeTaken = timeCurr - timeStart ))
    (( eta = timeTaken * (lastSector - currSector) / (currSector - startSector) / 3600 ))
    echo " ETA: $eta hours" "(" $(echo "scale=2; $eta / 24" | bc) " days)"
}

timeStart=$(date +%s)

trap "printProgress" 10

extent_count=2243
extent_size=65536
lastSector=$((extent_count * extent_size))

# Start by skipping these many sectors.
#
# Use either the first arg to this script or
# a default value of 2.
skipSectors=${1-2}
((startSector = skipSectors + 1 ))
echo "Started, by skipping $skipSectors sectors."

# ---------------------
# Main loop 
# ---------------------
while :; do
    ((currSector = skipSectors + 1 ))
    
    # Get the signature 'sig'. I have tested that this incantation
    # does indeed give the signature 53ef for a device having a
    # valid ext4 partition in the beginning.
    sig=$(dd if=/dev/sdb2 bs=512 skip=$skipSectors | 
        xxd -c 10 | head -109 | tail -1 | cut -d ' ' -f2)
        
    if [ "$sig" = "53ef" ]; then
        echo "Found an ext4 fs at sector $currSector , quitting."
        break
    fi
    
    # Did not find ext4 sig at the above location, try the next sector
    ((skipSectors += 1))
    
    if [ $skipSectors -eq $lastSector ]; then
        # No more sectors to skip.
        echo "FAILED to find an ext4 fs."
        break
    fi
done
----------------------------------------------------------------

Back to comp.os.linux.setup | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

No success repairing my ext4 file system so far, PLEASE HELP! Harry <simonsharry@gmail.com> - 2012-04-12 03:29 -0700
  Re: No success repairing my ext4 file system so far, PLEASE HELP! Richard Kettlewell <rjk@greenend.org.uk> - 2012-04-12 11:46 +0100
    Re: No success repairing my ext4 file system so far, PLEASE HELP! Harry <simonsharry@gmail.com> - 2012-04-12 04:08 -0700
      Re: No success repairing my ext4 file system so far, PLEASE HELP! Richard Kettlewell <rjk@greenend.org.uk> - 2012-04-12 12:36 +0100
        Re: No success repairing my ext4 file system so far, PLEASE HELP! Harry <simonsharry@gmail.com> - 2012-04-12 05:25 -0700
          Re: No success repairing my ext4 file system so far, PLEASE HELP! Richard Kettlewell <rjk@greenend.org.uk> - 2012-04-12 13:49 +0100
            Re: No success repairing my ext4 file system so far, PLEASE HELP! Harry <simonsharry@gmail.com> - 2012-04-12 06:09 -0700
              Re: No success repairing my ext4 file system so far, PLEASE HELP! Richard Kettlewell <rjk@greenend.org.uk> - 2012-04-12 19:18 +0100
                Re: No success repairing my ext4 file system so far, PLEASE HELP! Harry <simonsharry@gmail.com> - 2012-04-12 11:49 -0700
              Re: No success repairing my ext4 file system so far, PLEASE HELP! Doug Freyburger <dfreybur@yahoo.com> - 2012-04-12 18:27 +0000
              Re: No success repairing my ext4 file system so far, PLEASE HELP! Doug Freyburger <dfreybur@yahoo.com> - 2012-04-12 18:51 +0000
                Re: No success repairing my ext4 file system so far, PLEASE HELP! Harry <simonsharry@gmail.com> - 2012-04-12 12:12 -0700
                Re: No success repairing my ext4 file system so far, PLEASE HELP! "David W. Hodgins" <dwhodgins@nomail.afraid.org> - 2012-04-12 17:15 -0400
                Re: No success repairing my ext4 file system so far, PLEASE HELP! Harry <simonsharry@gmail.com> - 2012-04-12 20:30 -0700
                Re: No success repairing my ext4 file system so far, PLEASE HELP! Harry <simonsharry@gmail.com> - 2012-04-13 06:58 -0700
                Re: No success repairing my ext4 file system so far, PLEASE HELP! Harry <simonsharry@gmail.com> - 2012-04-13 07:13 -0700
                Re: No success repairing my ext4 file system so far, PLEASE HELP! Robert Nichols <SEE_SIGNATURE@localhost.localdomain.invalid> - 2012-04-13 19:29 -0500
                Re: No success repairing my ext4 file system so far, PLEASE HELP! Harry <simonsharry@gmail.com> - 2012-04-13 21:27 -0700
                Re: No success repairing my ext4 file system so far, PLEASE HELP! Robert Nichols <SEE_SIGNATURE@localhost.localdomain.invalid> - 2012-04-14 07:58 -0500
                Re: No success repairing my ext4 file system so far, PLEASE HELP! Harry <simonsharry@gmail.com> - 2012-04-14 06:35 -0700
                Re: No success repairing my ext4 file system so far, PLEASE HELP! Robert Nichols <SEE_SIGNATURE@localhost.localdomain.invalid> - 2012-04-14 19:59 -0500
                Re: No success repairing my ext4 file system so far, PLEASE HELP! Harry <simonsharry@gmail.com> - 2012-04-14 19:58 -0700
                Re: No success repairing my ext4 file system so far, PLEASE HELP! Harry <simonsharry@gmail.com> - 2012-04-14 20:13 -0700
                Re: No success repairing my ext4 file system so far, PLEASE HELP! Robert Nichols <SEE_SIGNATURE@localhost.localdomain.invalid> - 2012-04-15 15:14 -0500
                Re: No success repairing my ext4 file system so far, PLEASE HELP! Harry <simonsharry@gmail.com> - 2012-04-16 02:39 -0700
                Re: No success repairing my ext4 file system so far, PLEASE HELP! Robert Nichols <SEE_SIGNATURE@localhost.localdomain.invalid> - 2012-04-16 08:50 -0500
                Re: No success repairing my ext4 file system so far, PLEASE HELP! Harry <simonsharry@gmail.com> - 2012-04-16 08:02 -0700
                Re: No success repairing my ext4 file system so far, PLEASE HELP! Harry <simonsharry@gmail.com> - 2012-04-16 10:39 -0700
                Re: No success repairing my ext4 file system so far, PLEASE HELP! Harry <simonsharry@gmail.com> - 2012-04-16 11:08 -0700
                Re: No success repairing my ext4 file system so far, PLEASE HELP! Robert Nichols <SEE_SIGNATURE@localhost.localdomain.invalid> - 2012-04-16 15:58 -0500
                Re: No success repairing my ext4 file system so far, PLEASE HELP! Harry <simonsharry@gmail.com> - 2012-04-16 23:02 -0700
                Re: No success repairing my ext4 file system so far, PLEASE HELP! Robert Nichols <SEE_SIGNATURE@localhost.localdomain.invalid> - 2012-04-17 10:58 -0500
                Re: No success repairing my ext4 file system so far, PLEASE HELP! Harry <simonsharry@gmail.com> - 2012-04-18 21:53 -0700
                Re: No success repairing my ext4 file system so far, PLEASE HELP! Doug Freyburger <dfreybur@yahoo.com> - 2012-04-19 16:45 +0000
                Re: No success repairing my ext4 file system so far, PLEASE HELP! Harry <simonsharry@gmail.com> - 2012-04-19 18:34 -0700
                Re: No success repairing my ext4 file system so far, PLEASE HELP! Doug Freyburger <dfreybur@yahoo.com> - 2012-04-20 17:19 +0000
                Re: No success repairing my ext4 file system so far, PLEASE HELP! Harry <simonsharry@gmail.com> - 2012-04-21 20:37 -0700
                Re: No success repairing my ext4 file system so far, PLEASE HELP! Doug Freyburger <dfreybur@yahoo.com> - 2012-04-25 16:01 +0000
                Re: No success repairing my ext4 file system so far, PLEASE HELP! Harry <simonsharry@gmail.com> - 2012-04-28 16:32 -0700
                Re: No success repairing my ext4 file system so far, PLEASE HELP! Doug Freyburger <dfreybur@yahoo.com> - 2012-04-16 19:15 +0000
                Re: No success repairing my ext4 file system so far, PLEASE HELP! Harry <simonsharry@gmail.com> - 2012-04-16 21:20 -0700
                Re: No success repairing my ext4 file system so far, PLEASE HELP! Harry <simonsharry@gmail.com> - 2012-04-13 21:40 -0700
                Re: No success repairing my ext4 file system so far, PLEASE HELP! Harry <simonsharry@gmail.com> - 2012-04-13 21:56 -0700
                Re: No success repairing my ext4 file system so far, PLEASE HELP! Doug Freyburger <dfreybur@yahoo.com> - 2012-04-16 18:47 +0000
                Re: No success repairing my ext4 file system so far, PLEASE HELP! Harry <simonsharry@gmail.com> - 2012-04-16 20:19 -0700
                Re: No success repairing my ext4 file system so far, PLEASE HELP! unruh <unruh@invalid.ca> - 2012-04-13 15:22 +0000
                Re: No success repairing my ext4 file system so far, PLEASE HELP! J G Miller <miller@yoyo.ORG> - 2012-04-13 17:13 +0000
                Re: No success repairing my ext4 file system so far, PLEASE HELP! Harry <simonsharry@gmail.com> - 2012-04-13 21:58 -0700
          Re: No success repairing my ext4 file system so far, PLEASE HELP! unruh <unruh@invalid.ca> - 2012-04-12 15:50 +0000
            Re: No success repairing my ext4 file system so far, PLEASE HELP! The Natural Philosopher <tnp@invalid.invalid> - 2012-04-12 21:37 +0100
      Re: No success repairing my ext4 file system so far, PLEASE HELP! unruh <unruh@invalid.ca> - 2012-04-12 15:46 +0000
        Re: No success repairing my ext4 file system so far, PLEASE HELP! Harry <simonsharry@gmail.com> - 2012-04-12 09:35 -0700
          Re: No success repairing my ext4 file system so far, PLEASE HELP! unruh <unruh@invalid.ca> - 2012-04-12 18:57 +0000
  Re: No success repairing my ext4 file system so far, PLEASE HELP! Doug Freyburger <dfreybur@yahoo.com> - 2012-04-12 15:59 +0000
    Re: No success repairing my ext4 file system so far, PLEASE HELP! unruh <unruh@invalid.ca> - 2012-04-12 16:39 +0000
      Re: No success repairing my ext4 file system so far, PLEASE HELP! Harry <simonsharry@gmail.com> - 2012-04-12 09:53 -0700
        Re: No success repairing my ext4 file system so far, PLEASE HELP! unruh <unruh@invalid.ca> - 2012-04-12 19:03 +0000
    Re: No success repairing my ext4 file system so far, PLEASE HELP! Harry <simonsharry@gmail.com> - 2012-04-12 09:48 -0700
      Re: No success repairing my ext4 file system so far, PLEASE HELP! unruh <unruh@invalid.ca> - 2012-04-12 19:07 +0000
    Re: No success repairing my ext4 file system so far, PLEASE HELP! Richard Kettlewell <rjk@greenend.org.uk> - 2012-04-12 18:43 +0100
      Re: No success repairing my ext4 file system so far, PLEASE HELP! Harry <simonsharry@gmail.com> - 2012-04-12 10:55 -0700
      Re: No success repairing my ext4 file system so far, PLEASE HELP! Doug Freyburger <dfreybur@yahoo.com> - 2012-04-12 18:07 +0000
        Re: No success repairing my ext4 file system so far, PLEASE HELP! Richard Kettlewell <rjk@greenend.org.uk> - 2012-04-12 19:20 +0100
          Re: No success repairing my ext4 file system so far, PLEASE HELP! unruh <unruh@invalid.ca> - 2012-04-12 19:11 +0000
            Re: No success repairing my ext4 file system so far, PLEASE HELP! Richard Kettlewell <rjk@greenend.org.uk> - 2012-04-12 20:39 +0100
              Re: No success repairing my ext4 file system so far, PLEASE HELP! Doug Freyburger <dfreybur@yahoo.com> - 2012-04-13 16:50 +0000
                Re: No success repairing my ext4 file system so far, PLEASE HELP! Harry <simonsharry@gmail.com> - 2012-04-13 21:24 -0700
                Re: No success repairing my ext4 file system so far, PLEASE HELP! Doug Freyburger <dfreybur@yahoo.com> - 2012-04-16 19:04 +0000
                Re: No success repairing my ext4 file system so far, PLEASE HELP! Harry <simonsharry@gmail.com> - 2012-04-16 21:44 -0700
                Re: No success repairing my ext4 file system so far, PLEASE HELP! unruh <unruh@invalid.ca> - 2012-04-17 17:18 +0000
                Re: No success repairing my ext4 file system so far, PLEASE HELP! Harry <simonsharry@gmail.com> - 2012-04-17 18:41 -0700
      Re: No success repairing my ext4 file system so far, PLEASE HELP! unruh <unruh@invalid.ca> - 2012-04-12 19:09 +0000
    Re: No success repairing my ext4 file system so far, PLEASE HELP! Harry <simonsharry@gmail.com> - 2012-04-12 10:46 -0700
      Re: No success repairing my ext4 file system so far, PLEASE HELP! unruh <unruh@invalid.ca> - 2012-04-12 19:13 +0000
        Re: No success repairing my ext4 file system so far, PLEASE HELP! Harry <simonsharry@gmail.com> - 2012-04-12 12:21 -0700
          Re: No success repairing my ext4 file system so far, PLEASE HELP! unruh <unruh@invalid.ca> - 2012-04-12 20:12 +0000
  Re: No success repairing my ext4 file system so far, PLEASE HELP! g.fink@gmx.net (Gernot Fink) - 2012-04-12 18:20 +0000
  Re: No success repairing my ext4 file system so far, PLEASE HELP! The Natural Philosopher <tnp@invalid.invalid> - 2012-04-12 21:35 +0100
  Re: No success repairing my ext4 file system so far, PLEASE HELP! Harry <simonsharry@gmail.com> - 2012-04-19 06:43 -0700
    Re: No success repairing my ext4 file system so far, PLEASE HELP! Bob <SEE_SIGNATURE@localhost.localdomain.invalid> - 2012-04-19 11:29 -0500
      Re: No success repairing my ext4 file system so far, PLEASE HELP! Harry <simonsharry@gmail.com> - 2012-04-19 18:50 -0700

csiph-web