Find the answer to your Linux question:
Results 1 to 8 of 8
I did a stupid thing. I have two redhat ES 4 servers installed as virtual machines. Created one disk to share to alll servers. From server A, I created primary ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jul 2007
    Posts
    3

    How to recover filesystem?


    I did a stupid thing.
    I have two redhat ES 4 servers installed as virtual machines.
    Created one disk to share to alll servers.
    From server A, I created primary partition for whole disk and formated the partition with type ext3.
    mounted the filesystem and loaded lot of data here.
    Now Stupidity starts....
    unmounted the filesystem in server A and created primary partition for same disk on server B.
    I didn't format the partition again.
    Tried to mount the filesystem on server B and got error like:
    "bad superblock, or wrong fs type, or too many filesystems mounted"Came back to server A and tried to mount the filesystem here, got same error.
    Now I'm not able to mount this on any of 2 servers.

    Is there any remedy for this and can I re-mount the filesystem without any data loss?

    Also Where can I find step-by-step procedure to setup NFS sharing?

    Thanks a lot.

  2. #2
    Linux Engineer aliov's Avatar
    Join Date
    Dec 2006
    Location
    Geneva,Beirut
    Posts
    1,078
    If you didn't format your partition yet ,then there is a possibility to recover,i guess you used fdisk to make the partition !

    the only once solution (i know ) it's to try to figure out the first and the last sector of the partition ,or at least the first one, but the problem in this is that fdisk doesn't produce a log file ! try to remember your partition table.

    post the output of fdisk -l to see if we can help.

    Best Regards.
    Linux is not only an operating system, it's a philosophy.
    Archost.

  3. #3
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,729
    if you are sure that you didn't format partition then its easy to recover Partition Table using Testdisk. check here.
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

  4. #4
    Just Joined!
    Join Date
    Jul 2007
    Posts
    3
    Quote Originally Posted by aliov View Post
    If you didn't format your partition yet ,then there is a possibility to recover,i guess you used fdisk to make the partition !

    the only once solution (i know ) it's to try to figure out the first and the last sector of the partition ,or at least the first one, but the problem in this is that fdisk doesn't produce a log file ! try to remember your partition table.

    post the output of fdisk -l to see if we can help.

    Best Regards.
    Here is the output of fdisk -l. The problem is with /dev/sdb1

    device boot start end blocks id system
    /dev/sda1 * 1 910 7309543+ 83 Linux
    /dev/sda2 911 1101 1534207+ 82 Linux swap
    /dev/sda3 1102 15665 116985330 83 Linux
    /dev/sdb1 1 3916 31455238+ 83 Linux

  5. #5
    Linux Engineer aliov's Avatar
    Join Date
    Dec 2006
    Location
    Geneva,Beirut
    Posts
    1,078
    Quote Originally Posted by jia786 View Post

    From server A, I created primary partition for whole disk and formated the partition with type ext3.
    unmounted the filesystem in server A and created primary partition for same disk on server B.
    you said the first partition was for the whole disk,

    fdisk /dev/sdb1
    type c

    c it's to change number of cylinders,leave it one for the beginning and make it the last one for the end,write and exit.
    check you file system ,e2fsck -v /dev/sdb1 (and post all what you see)

    then try to mount it.

    Hope this helps.
    Linux is not only an operating system, it's a philosophy.
    Archost.

  6. #6
    Just Joined!
    Join Date
    Jul 2007
    Posts
    3
    Quote Originally Posted by aliov View Post
    you said the first partition was for the whole disk,

    fdisk /dev/sdb1
    type c

    c it's to change number of cylinders,leave it one for the beginning and make it the last one for the end,write and exit.
    check you file system ,e2fsck -v /dev/sdb1 (and post all what you see)

    then try to mount it.

    Hope this helps.
    Thanks Aliov... This worked and I'm able to mount it.
    Thanks all who posted a reply.

  7. #7
    Linux Newbie danvds3's Avatar
    Join Date
    Apr 2007
    Location
    UK
    Posts
    113
    If you ever decide to partition, resize, format or change the filesystem, I reccomend you download GParted (Live CD). It's basically an extremely basic Linux OS with GParted installed, so that nothing is slowing the performance down.

    GParted Live CD Download
    Never tell people how to do things. Tell them what to do and they will surprise you with their ingenuity.
    George S. Patton

  8. #8
    Linux Engineer aliov's Avatar
    Join Date
    Dec 2006
    Location
    Geneva,Beirut
    Posts
    1,078
    Quote Originally Posted by jia786 View Post
    Thanks Aliov... This worked and I'm able to mount it.
    Thanks all who posted a reply.
    Oh, very good news, you must know that i was little bit scarred ,since i don't want to destroy your data (i don't like to play with the partition table) . but i've done this one times before, and it was safe.


    Best Regards.
    Linux is not only an operating system, it's a philosophy.
    Archost.

Posting Permissions

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