FedoraForum.org - Fedora Support Forums and Community
Results 1 to 4 of 4
  1. #1
    jimjawn Guest

    rm -rf /etc and reconfiguring software raid 5

    Please, before I get the chastising and you-should-know-better lectures, bear with me, it was a mistake and I'm sorry. I'm also a volunteer in a developing nation and really, we cannot afford backup media. I try to sqeeze ounce of computing from old crap as possible and it if works we use it.

    So, here is my dilmena in a nutshell:

    I ran rm -rf /etc instead of rm -rf etc/ (as root, yes I'm an idiot). I pressed control+C as quick as i could, but alas it was too late. I freaked out, closed my ssh session and the nighmares began. The computer on which I ran this command is actually my backup server and, has some stuff that I must to get off of it.

    Now it looks like my /etc/fstab and /etc/raidtab are gone as well as /etc/passwd and all the usually goodness. I ran the FC3 (version i'm running) repair DVD and it can't find the system image to mount it. Right now I'm using Knoppix and here is where I'm at...

    Code:
    Here is the output of fdisk -l
    
    Disk /dev/hdc: 81.9 GB, 81964302336 bytes
    16 heads, 63 sectors/track, 158816 cylinders
    Units = cylinders of 1008 * 512 = 516096 bytes
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/hdc1   *           1      158816    80043232+  fd  Linux raid autodetect
    
    Disk /dev/hdd: 81.9 GB, 81964302336 bytes
    16 heads, 63 sectors/track, 158816 cylinders
    Units = cylinders of 1008 * 512 = 516096 bytes
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/hdd1   *           1      158816    80043232+  fd  Linux raid autodetect
    
    Disk /dev/hda: 81.9 GB, 81964302336 bytes
    255 heads, 63 sectors/track, 9964 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/hda1   *           1          13      104391   83  Linux
    /dev/hda2              14          77      514080   82  Linux swap
    /dev/hda3              78        9964    79417327+  fd  Linux raid autodetect
    Now I know that the device was/is at /dev/md0 and I'm pretty sure that I had a Logical Drive configured. This is just so over my head at the moment, I don't know where to get started. I'm sort of a recent linux convert and my last year has been baptism by fire.

    What I'd like to do is mount the drive in knoppix so I can find some space to copy the backup files or fix my fedora so that it at least boots. If you can help me with this, i may convince our school principal to name his 9th child after you. Thanks fedora community.

  2. #2
    Join Date
    Nov 2004
    Location
    Netherlands
    Age
    39
    Posts
    1,426
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    First, is it possible to boot into runlevel 1, in grub press 'a' to append and append a space and a 1.
    If it is not possible, then you'll need either the rescue cd or knoppix, I'm not really familiar with the 1st, so I would recommend knoppix. If you want lvm support in knoppix, check out this link: http://lists.centos.org/pipermail/ce...er/012864.html
    Also check out these:
    http://episteme.arstechnica.com/grou...r/584002016731
    http://www.knoppix.net/wiki/LVM2

    But according to you fdisk you have raid volumes and not lvm.

    How are your partitions managed, do you have a seperate /home where all your stuff is?
    Registered Linux user number 389291

    Laptop: Nec Versa p550, Pentium M 1.86GHz, 1024MB ram, x300, 80 GB HD, bluetooth, 2915BG Wlan card
    Desktop: Amd Athlon x2 4200+, 2GB ram, Geforce 7300GT 512MB silent, 160GB HD in a nice centurion 534 case :cool:

  3. #3
    jimjawn Guest
    Thanks for the response. I have the sofware raid configured, then across the raid, I believe that I"ve got Logical Volumes configured. I've got one of about 100MB for the boot partition (which I can access in Knoppix), one of 512MB formatted as Swap and the third LV is configured with ~147GB as the '/' directory. I don't have any special directories for home or anything else in that regard.

    Its pretty much the default fedora core configuration wtih a raid 5 striped accross three 80GB disks. Those links that you sent me seem like an excellent starting point. I'm not on the machine now, I've got to physically go to it. I'll try the solutions in the links first and see how it goes.

  4. #4
    jimjawn Guest
    Finally, finally, finally!

    The problem was that one of my disk drives fell out of the raid array somehow. After reading hours and hours of outdated Software RAID documetation over at The Linux Documentation Project (http://tldp.org) I finally found this link:

    http://acd.ucar.edu/~fredrick/linux/fedoraraid/

    Specically, this code...
    [code]
    1 cat /proc/mdstat
    2 sudo mdadm --examine /dev/hde1
    3 sudo mdadm /dev/md0 -a /dev/hde2
    4 cat /proc/mdstat
    {/code]

    I managed to mount the /dev/md0 device properly and get everything working correctly again. Also, I was using a Knoppix 3 disc, not the new one, so instead I popped in a copy of Ubuntu Live and used that instead. Bitrain, thanks for the links and while they didn't exactly work out, they put right on track for solving this problem.

    Thanks so much.

Similar Threads

  1. Replies: 0
    Last Post: 9th March 2009, 04:02 PM
  2. Replies: 8
    Last Post: 4th March 2006, 06:51 AM
  3. Replies: 4
    Last Post: 16th November 2005, 01:24 PM
  4. Fake RAID and software RAID?
    By hapaboy in forum Installation, Upgrades and Live Media
    Replies: 0
    Last Post: 4th April 2005, 02:30 AM

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
  •