Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: bad superblock AFTER a tar restore

  1. #1
    Join Date
    Apr 2010
    Location
    Rocksprings, TX
    Posts
    42

    Unhappy bad superblock AFTER a tar restore

    I'm working on an old HP machine with 11.3 on it. (YES i know but 11.3 was the latest version I could get to run on this machine and its a chairity case)!

    To make a long stort short they let some kid have the root password and he blew the system away. I keep a good incremental backup so I didn't think it would be a big deal to rebuild. Got the os on but when I restored the full backup it ate the superblock on the /home partition - that's problem 1, how do I rebuild an ext4 superblock?

    Problem 2 is how can a tar backup/restore crash a superblock in thefirst place????

    NOTE: ignore the signature block, Im running 12.1 now. Just havent updated it yet.
    SuSE 11.2 on a HP-dv7-3057nr with AMD Vision 2.2 GHZ 64bit processor. 4096 RAM and 500 Gb HDD.
    Server is an OLD Gateway e-3400 with SuSE 11.3 with a LAMP server.

  2. #2
    Join Date
    Mar 2010
    Location
    Austin - Texas
    Posts
    10,500
    Blog Entries
    48

    Smile Re: bad superblock AFTER a tar restore

    Quote Originally Posted by jim7634 View Post
    I'm working on an old HP machine with 11.3 on it. (YES i know but 11.3 was the latest version I could get to run on this machine and its a chairity case)!

    To make a long stort short they let some kid have the root password and he blew the system away. I keep a good incremental backup so I didn't think it would be a big deal to rebuild. Got the os on but when I restored the full backup it ate the superblock on the /home partition - that's problem 1, how do I rebuild an ext4 superblock?

    Problem 2 is how can a tar backup/restore crash a superblock in thefirst place????

    NOTE: ignore the signature block, Im running 12.1 now. Just havent updated it yet.
    I found a procedure for fixing a superblock problem with EXT4 here: HOWTO: Repair a broken Ext4 Superblock in Ubuntu

    The example is for Ubuntu, but I don't think it matters. You will need to do this using a LiveCD as you can't fix it when the partition is mounted. I have a script that can help create a LiveUSB if the OLD PC supports such:

    S.C.L.U. - SuSE Create Live USB - Version 1.02 - Blogs - openSUSE Forums

    Thank You,
    My Blog: https://forums.opensuse.org/blogs/jdmcdaniel3/

    Software efficiency halves every 18 months, thus compensating for Moore's Law

    Its James again from Austin, Texas

  3. #3
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    16,043

    Default Re: bad superblock AFTER a tar restore

    On your question "How can ....".

    That is what I wonder also. I would think the file system was allready corrupted in the first place. Did you create a fresh file system on that partition before you restored? I guess yes, because it is the ultimate way to be sure that it is empty before you restore, but I ask nevertheless to be sure. If not, then do create the fs anew before you use tar to restore.
    Henk van Velden

  4. #4
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    22,730

    Default Re: bad superblock AFTER a tar restore

    On 2011-12-19 04:06, jim7634 wrote:
    > Problem 2 is how can a tar backup/restore crash a superblock in
    > thefirst place????


    Chance. Maybe it was broken before, maybe it broke during writes. After
    all, ext4 is new.

    --
    Cheers / Saludos,

    Carlos E. R.
    (from 11.4 x86_64 "Celadon" at Telcontar)

  5. #5
    Join Date
    Apr 2010
    Location
    Rocksprings, TX
    Posts
    42

    Default Re: bad superblock AFTER a tar restore

    Quote Originally Posted by robin_listas View Post
    On 2011-12-19 04:06, jim7634 wrote:
    > Problem 2 is how can a tar backup/restore crash a superblock in
    > thefirst place????


    Chance. Maybe it was broken before, maybe it broke during writes. After
    all, ext4 is new.

    --
    Cheers / Saludos,

    Carlos E. R.
    (from 11.4 x86_64 "Celadon" at Telcontar)
    It's not that new.linux accepted it in 2008

    Jim
    SuSE 11.2 on a HP-dv7-3057nr with AMD Vision 2.2 GHZ 64bit processor. 4096 RAM and 500 Gb HDD.
    Server is an OLD Gateway e-3400 with SuSE 11.3 with a LAMP server.

  6. #6
    Join Date
    Apr 2010
    Location
    Rocksprings, TX
    Posts
    42

    Default Re: bad superblock AFTER a tar restore

    It's possible that the file system was corrupt before the backup but that means I don't understand all I thought I understood about TAR.

    It was my understanding that all tar did was copy the data from each file sequentially compresses it and writes it to the backup media (tape CD external HD, etc). Am I missing something? Under that senario I may get a corrupt file but it shouldn't affect the superblock.
    SuSE 11.2 on a HP-dv7-3057nr with AMD Vision 2.2 GHZ 64bit processor. 4096 RAM and 500 Gb HDD.
    Server is an OLD Gateway e-3400 with SuSE 11.3 with a LAMP server.

  7. #7
    Join Date
    Apr 2010
    Location
    Rocksprings, TX
    Posts
    42

    Default Re: bad superblock AFTER a tar restore

    Did that, it would seem that the tarball itself is the culprit. See my post below. Thanks anyway.

    Jim
    SuSE 11.2 on a HP-dv7-3057nr with AMD Vision 2.2 GHZ 64bit processor. 4096 RAM and 500 Gb HDD.
    Server is an OLD Gateway e-3400 with SuSE 11.3 with a LAMP server.

  8. #8
    Join Date
    Apr 2010
    Location
    Rocksprings, TX
    Posts
    42

    Default Re: bad superblock AFTER a tar restore

    Quote Originally Posted by hcvv View Post
    On your question "How can ....".

    That is what I wonder also. I would think the file system was allready corrupted in the first place. Did you create a fresh file system on that partition before you restored? I guess yes, because it is the ultimate way to be sure that it is empty before you restore, but I ask nevertheless to be sure. If not, then do create the fs anew before you use tar to restore.
    That was the first thing I did, and the second. It finally registered that the tarball was the culprit. See my post about what I thought I knew before I knew what I don't know. Thanks though.

    Jim
    SuSE 11.2 on a HP-dv7-3057nr with AMD Vision 2.2 GHZ 64bit processor. 4096 RAM and 500 Gb HDD.
    Server is an OLD Gateway e-3400 with SuSE 11.3 with a LAMP server.

  9. #9
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    16,043

    Default Re: bad superblock AFTER a tar restore

    No, you are not missing something. tar does just copy files, originaly to a tape (tar: Tape ARchiver), but also to a file (well, in Unix/Linux a tape is also a file, thus this is very logical). The compressing is only an extra, but does not change the principle.

    Thus when you "untar", you create the files and write their contents, just the same as every other program would create a file and write it's contents.

    Thus we have a chicken-egg problem here. When the fs was corrupt, how could tar have written anything? When the fs was OK, how could tar have corrupted it?

    But to be sure there are no misunderstandings (we believing that you did the correct tar and you "thinking" that you did the correct tar), please post the tar statement you used. After all as disk (partition), like a tape, is also a file in Unix/Linux and you could have written to the partition instead of to the file system.
    Henk van Velden

  10. #10
    Join Date
    Apr 2010
    Location
    Rocksprings, TX
    Posts
    42

    Default Re: bad superblock AFTER a tar restore

    Quote Originally Posted by hcvv View Post
    On your question "How can ....".

    That is what I wonder also. I would think the file system was allready corrupted in the first place. Did you create a fresh file system on that partition before you restored? I guess yes, because it is the ultimate way to be sure that it is empty before you restore, but I ask nevertheless to be sure. If not, then do create the fs anew before you use tar to restore.
    That was the first thing I did, and the second. It finally registered that the tarball was the culprit. See my post about what I thought I knew before I knew what I don't know. Thanks though.

    Jim
    SuSE 11.2 on a HP-dv7-3057nr with AMD Vision 2.2 GHZ 64bit processor. 4096 RAM and 500 Gb HDD.
    Server is an OLD Gateway e-3400 with SuSE 11.3 with a LAMP server.

Page 1 of 2 12 LastLast

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •