RE: Booting degraded software raid1 with failed /dev/sda

2013-08-06 Thread Tad Bak

Bob Proulx [b...@proulx.com] wrote:

> I personally think it is easier to use the debian-installer in rescue
> mode to recover in this situation.  I have written about hte process
> here often.  Here is one recent posting of mine on the topic.
[...]

Thanks Bob! Yes, that looks easier. I have saved your e-mail in my tips & 
tricks folder, in case I need it again in the future.

Regards,
  Tad


--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/e2cb61cacd6ecc46a6fbd0296822a23755521...@hirt.ad.uws.edu.au



Re: Booting degraded software raid1 with failed /dev/sda

2013-08-05 Thread Bob Proulx
Tad Bak wrote:
> I have Debian Wheezy 64bit installed on a machine with 2 SATA
> drives. On the hard drives I have two software RAID1 partitions, md0
> and md1. The bigger md1 uses LVM and has separate volumes for swap,
> /tmp, /var, /opt, /usr, and /home. Everything was working fine,

A typical configuration.

> until one day the sda disc crashed and the system was not bootable
> anymore. This is how I have learned that by default Debian installs
> grub only on /dev/sda in RAID1 configuration. Despite the fact that
> /dev/sdb was still fine, I had no working system, as I couldn't boot
> it. After two days of Google search I have found a solution, which
> might be of interest to somebody in similar situation.

That is a common situation that seems to be discussed here every month
or so.  A recurring topic.  Sorry to hear that you have had this
trouble too.

> Solution.
> First, I downloaded the debian-live-7.0.0-amd64-rescue.iso, it fits
> on one CDROM. I could boot from it into a live system. To get a root
> privileges I set root pasword: "sudo passwd root" and then su to
> root. Because BIOS already reported first HD error, cfdisk was

I personally think it is easier to use the debian-installer in rescue
mode to recover in this situation.  I have written about hte process
here often.  Here is one recent posting of mine on the topic.

  http://lists.debian.org/debian-user/2013/06/msg00770.html

But perhaps this one is better.

  https://lists.debian.org/debian-user/2013/01/msg00218.html

I recommend using one of the smaller debian-installer images such as
the netinst image.  It is small to download and can be burned to cdrom
or copied to a usb disk and booted.

> showing me only one HD, /dev/sda (before crash it was
> /dev/sdb). However, RAID1 was still alive, "cat /proc/mdstat"
> reported two degraded partitions, md126 and md127, the first one was
> my former md0 and the second the former md1. As I didn't have LVM on
> md0 I could mount it directly: "mount /md126 /mnt". Volumes on md1
> were also fine, lvscan listed all of them. I have mounted one by
> one: "mount /dev/vol/usr /mnt/usr", "mount /dev/vol/var /mnt/var",
> mount /dev/vol/tmp /mnt/tmp".

It is this point that I think makes the debian-installer easier to
use.  It has a helper dialog for assembling raid and lvm.  Simply
activate automatic raid assembly.  Then activate lvm.  Then select the
root partition.  After that and chrooting into the system you can do
'mount -a' to mount all of the additional partitions all at once.  And
then you can repair your system.

> Fixing grub was a matter of the command: "grub-install /dev/sda",
> which didn't report any errors. Ctrl-D returned me to the live
> system, from which I have rebooted. Fingers crossed -- after some
> delay caused by errors generated by the failed HD (which is still
> inside the computer) I was finally greeted by login screen. My
> system is running fine now with the degraded RAID array, waiting for
> the arrival of a new drive.

Glad to hear that you were able to recover okay!  Software RAID1
worked and even though you had a failure none of your data was lost.
Now don't delay and replace that bad disk!  And check that your backup
is still working and current because RAID is no substitute for backup.

Bob


signature.asc
Description: Digital signature


RE: Booting degraded software raid1 with failed /dev/sda

2013-08-05 Thread Tad Bak
Rob,

I have tried that (super grub boot disk) first, but I couldn't fix my problem. 
It’s very likely that I was doing something wrong, as I have started more 
serious RTFM only after that first failed attempt :-). Then the Debian live CD 
route worked for me.

Thanks,
  Tad

From: Rob Owens [row...@ptd.net]
Sent: Tuesday, 6 August 2013 00:42
To: debian-user@lists.debian.org
Cc: debian-user@lists.debian.org
Subject: Re: Booting degraded software raid1 with failed /dev/sda

- Original Message -
> From: "Tad Bak" 
>
> Background.
> I have Debian Wheezy 64bit installed on a machine with 2 SATA drives.
> On the hard drives I have two software RAID1 partitions, md0 and
> md1. The bigger md1 uses LVM and has separate volumes for swap,
> /tmp, /var, /opt, /usr, and /home. Everything was working fine,
> until one day the sda disc crashed and the system was not bootable
> anymore. This is how I have learned that by default Debian installs
> grub only on /dev/sda in RAID1 configuration. Despite the fact that
> /dev/sdb was still fine, I had no working system, as I couldn't boot
> it. After two days of Google search I have found a solution, which
> might be of interest to somebody in similar situation.
>
Would super grub boot disk have worked for you?  I have used it plenty of times 
to boot a system w/ a messed up grub, but I don't know if I've ever tried it on 
a system that used software RAID 1.

-Rob



--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/e2cb61cacd6ecc46a6fbd0296822a23755521...@hirt.ad.uws.edu.au



Re: Booting degraded software raid1 with failed /dev/sda

2013-08-05 Thread Rob Owens
- Original Message -
> From: "Tad Bak" 
> 
> Background.
> I have Debian Wheezy 64bit installed on a machine with 2 SATA drives.
> On the hard drives I have two software RAID1 partitions, md0 and
> md1. The bigger md1 uses LVM and has separate volumes for swap,
> /tmp, /var, /opt, /usr, and /home. Everything was working fine,
> until one day the sda disc crashed and the system was not bootable
> anymore. This is how I have learned that by default Debian installs
> grub only on /dev/sda in RAID1 configuration. Despite the fact that
> /dev/sdb was still fine, I had no working system, as I couldn't boot
> it. After two days of Google search I have found a solution, which
> might be of interest to somebody in similar situation.
> 
Would super grub boot disk have worked for you?  I have used it plenty of times 
to boot a system w/ a messed up grub, but I don't know if I've ever tried it on 
a system that used software RAID 1.  

-Rob


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/1715114947.63688002.1375713720777.javamail.r...@ptd.net



Booting degraded software raid1 with failed /dev/sda

2013-08-04 Thread Tad Bak
Background.
I have Debian Wheezy 64bit installed on a machine with 2 SATA drives. On the 
hard drives I have two software RAID1 partitions, md0 and md1. The bigger md1 
uses LVM and has separate volumes for swap, /tmp, /var, /opt, /usr, and /home. 
Everything was working fine, until one day the sda disc crashed and the system 
was not bootable anymore. This is how I have learned that by default Debian 
installs grub only on /dev/sda in RAID1 configuration. Despite the fact that 
/dev/sdb was still fine, I had no working system, as I couldn't boot it. After 
two days of Google search I have found a solution, which might be of interest 
to somebody in similar situation.

Solution.
First, I downloaded the debian-live-7.0.0-amd64-rescue.iso, it fits on one 
CDROM. I could boot from it into a live system. To get a root privileges I set 
root pasword: "sudo passwd root" and then su to root. Because BIOS already 
reported first HD error, cfdisk was showing me only one HD, /dev/sda (before 
crash it was /dev/sdb). However, RAID1 was still alive, "cat /proc/mdstat" 
reported two degraded partitions, md126 and md127, the first one was my former 
md0 and the second the former md1. As I didn't have LVM on md0 I could mount it 
directly: "mount /md126 /mnt". Volumes on md1 were also fine, lvscan listed all 
of them. I have mounted one by one: "mount /dev/vol/usr /mnt/usr", "mount 
/dev/vol/var /mnt/var", mount /dev/vol/tmp /mnt/tmp". Then, in preparation for 
chrooted environment I also mounted proc and dev: "mount -t proc none 
/mnt/proc" and /mount -o bind /dev /mnt/dev". After that "chroot /mnt" and I 
was in my installed system. Fixing grub was a matter of the command: 
"grub-install /dev/sda", which didn't report any errors. Ctrl-D returned me to 
the live system, from which I have rebooted. Fingers crossed -- after some 
delay caused by errors generated by the failed HD (which is still inside the 
computer) I was finally greeted by login screen. My system is running fine now 
with the degraded RAID array, waiting for the arrival of a new drive.

Cheers,
  Tad




--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/e2cb61cacd6ecc46a6fbd0296822a23755520...@hirt.ad.uws.edu.au