@mjh2000: "I have a raid 1 mdadm setup.
I have devices sda and sdb with 2 partitions on each - sda1 and sda2
on the other drive i have sdb1 and sdb2.
Partition sda1 is the root partition and sda2 is the swap partition.
My sda failed yesterday and now i am running in sdb only.
When i put the drive sda into the system to add it back to the md0 -
the system keeps booting from it and refuses to boot from the good sdb
drive.
What can i do to stop this from happening - I have no other system to
plug this drive into to zero out the drive.
Also if I am able to get over this issue - do i have to do other
procedures to this drive? what are they ??? I think i have to do the
following:
mdadm manage /dev/md0 remove /dev/sdb1
mdadm manage /dev/md0 fail /dev/sdb1
sfdisk -d /dev/sda | sfdisk /dev/sdb
mdadm manage /dev/md0 add /dev/sdb1
I am thinking that I need to do something with grub or do some kind of
update so the server can boot of the good drive that I have working
now - but do not know what it is.
thanks
mjh
To UNSUBSCRIBE, email to <email_address> 
with a subject of "unsubscribe". Trouble? Contact <email_address>
Archive: <url>"
    @tvdebian: "<quote>
Hi, when you manage to boot with the faulty drive in, just "fail",
"remove" and "zero-superblock", then "add" it again. Off course if
the drive is damaged or faulty at a low level it may not come up or
won't survive the rebuild...
If you can work around the boot issue, maybe you can physically change
the way the disk "sdb" is plugged-in, and use the slot previously used
by "sda". This can usually be achieved in bios too by changing in the
disk ordering.
As an alternate, you could try booting on a rescue live-cd first, then
start your degraded raid, chroot to the system to get the faulty drive
back in the raid and start the rebuild, even reinstall grub from the
chroot, then reboot in the original system.
Once you are done it's a good idea to reinstall grub on both drives.
To UNSUBSCRIBE, email to <email_address> 
with a subject of "unsubscribe". Trouble? Contact <email_address>
Archive: <url>"
    @mjh2000: "The issue I am having is that if I put into the system both drives,
the system always chooses the faulty drive.
I do not even get linux system - i get a weird text prompt - i think
it is initrdfs - even if i change it in the bios.
On installing grub - can you tell me what is the procedure for that
after i get my drives to an okay state ?
thanks
mjh
On Wed, Jan 18, 2012 at 11:39 AM, <email_address>
<quote>
To UNSUBSCRIBE, email to <email_address> 
with a subject of "unsubscribe". Trouble? Contact <email_address>
Archive: <url>"
    @tvdebian: "<quote>
To get the system to start on a degraded raid array you can try passing
the following option on the "linux" line of the grub menu:
md-mod.start_dirty_degraded=1
To edit the grub menu entry type the letter "e", then make the changes
by adding the option at the end of the line that starts with "linux".
To boot use "ctrl" + "x" (keys "control" and "x" et the same time).
Once you are in the system, issue (as root) the following commands
assuming that "md0" is the array, and "sdb1" the faulty drive partition:
mdadm /dev/md0 fail /dev/sdb1
mdadm /dev/md0 remove /dev/sdb1
mdadm /dev/md0 zero-superblock /dev/sdb1
mdadm /dev/md0 add /dev/sdb1
"fail" and "remove" can be issued in the same command, but you can also
use them as shown above for clarity's sake.
Regarding grub, just use the usual magic formula (as root):
grub-install recheck no-floppy /dev/sda
repeat for "/dev/sdb", or use "hd0" and "hd1" which is grub traditional
notation for first and second drives.
To UNSUBSCRIBE, email to <email_address> 
with a subject of "unsubscribe". Trouble? Contact <email_address>
Archive: <url>"
    @mjh2000: "thanks for the reply -
1. my issue is that i am not getting to the grub menu on the good
disk, it always goes to the bad one.
I think it puts me in a intrdfsram prompt or something similar - even
if i change the bios settings.
- so editing the grub menu option - is unavailable for me.
grub-install recheck no-floppy /dev/sda
repeat for "/dev/sdb", or use "hd0" and "hd1" which is grub traditional
notation for first and second drives.
my drives are /dev/sda and my boot partition is /dev/sda1
what do i type in that scenerio after i am able to create the mirror
back to the way it was.
thanks
mjh
On Wed, Jan 18, 2012 at 12:49 PM, <email_address>
<quote>
To UNSUBSCRIBE, email to <email_address> 
with a subject of "unsubscribe". Trouble? Contact <email_address>
Archive: <url>"
    @tvdebian: "<quote>
initrd is a later stage than grub menu, grub comes second after bios,
and is in charge of loading the initrd. So if you get to the initrd
"busybox" shell it means you got past the grub menu. Otherwise what you
think is initrd really is either bios or grub.
Maybe it's time you give us some details about your setup, what kind of
computer is this, and what flavor of Debian are you running on it (grub
version would be nice too) ?
How exactly is the boot sequence occurring, what do you "see" and in
what order ?
How do you know it "chooses" the faulty drive ?
No matter which drive the system boots on, it will fail to bring up the
raid array your root partition resides on if it's flagged as degraded,
unless you pass the necessary option I gave you earlier. It is possible
to assemble the array from the busybox ("initrd") shell and resume the
init ("boot") process, but if we don't have more details, or if you
don't tell us exactly what you try and the result (error messages), we
can keep shooting in the dark for a long time.
If you can't get it to boot by itself it may be easier to boot from a
recovery live-cd, any will do as long as it has mdadm installed or
installable. From there it will be possible to start the degraded raid
array, make sure it works, "chroot" on it (means "transferring" the
live-cd shell to the target system), and then issue commands as if they
were issued from the target system. Or for a start you could simply
assemble the array, start it and mount the target system's partition,
and edit the grub menu entry to add the necessary option.
To UNSUBSCRIBE, email to <email_address> 
with a subject of "unsubscribe". Trouble? Contact <email_address>
Archive: <url>"
    @jsullivan: "<quote>
<snip>
That's strange that your BIOS won't let you select the primary drive.  I
suppose it is possible that the drives are jumpered to master and slave.
One could also try physically reversing the drives to see if perhaps the
bus scan order is the determining factor.  I'm just guessing as I am
certainly not an expert in this area - John
To UNSUBSCRIBE, email to <email_address> 
with a subject of "unsubscribe". Trouble? Contact <email_address>
Archive: <url>"
    @mjh2000: "okay..thanks for the clarification.
I think it was initrd - busybox.
my debian version is:
root@rider:~# lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 6.0.3 (squeeze)
Release:        6.0.3
Codename:       squeeze
 uname -mrs
Linux 2.6.32-5-amd64 x86_64
I fooled around with the bois and I was able to both drives to be seen
and the good partition running and the drive is syncing.
Not really sure why it was behaving this way - but thanks to plug and
play - the running system seen the bad drive and i was able to sync
it.
Now, my question to you is:
1. what do I do next ?
do i run the command - "grub-install recheck no-floppy /dev/sdc1"
(sdc1 is my good drive)
2. Do i do this command after a reboot or just after the sync is done ?
3. I get this error regarding a Floppy Error  - I have no floppy
drives - how can i remove this ?
4. Do i have to update any of the mdadm files ? or any additional grub
files ? before or after I reboot ?
thanks for your help!
mjh
On Wed, Jan 18, 2012 at 2:07 PM, <email_address>
<quote>
To UNSUBSCRIBE, email to <email_address> 
with a subject of "unsubscribe". Trouble? Contact <email_address>
Archive: <url>"
    @tvdebian: "<quote>
If the system is booting normally now, it's not mandatory. But it
wouldn't hurt to make sure grub is installed on all drives in the array.
Doesn't matter, I would say let it sync first out of pity for that poor
drive ;-) .
Yes you can, remove the "no-floppy" option, it's a precautionary
measure. I have the habit to add it when I don't know what the hardware
is, it prevents nasty grub mistakes when a floppy drive is present, and
doesn't hurt if there isn't any. Floppy is something of the past, I have
to get used to it.
Doesn't hurt do refresh your /etc/mdadm/mdadm.conf , compare it to the
output of:
mdadm misc detail brief /dev/md?*
If you change mdadm.conf, rebuild your initrd:
update-initramfs -u -k all
Nothing to do for grub aside from making sure it's installed on all
drives in the array.
It's always better to make sure everything is in order before rebooting,
after it is sometime too late...
You helped yourself on this one, happy you managed to get the system back.
To UNSUBSCRIBE, email to <email_address> 
with a subject of "unsubscribe". Trouble? Contact <email_address>
Archive: <url>"
    @mjh2000: "Sorry - just a couple of last things:
1. do i run the command - "grub-install recheck no-floppy
/dev/sdc1" and "grub-install recheck no-floppy /dev/sdd1"   ???
or do I run it on the whole drive meaning - "grub-install recheck
no-floppy /dev/sdc" and "grub-install recheck no-floppy
/dev/sdd"
Is that creating a boot sector ? what is it really doing ? do i need
to set something active in the boot partition - meaning in fdisk ?
2. update-initramfs -u -k all   -this command only update /boot dir ?
and then the mirroing copied to the other drive ??
3. Big thanks for your help!
To UNSUBSCRIBE, email to <email_address> 
with a subject of "unsubscribe". Trouble? Contact <email_address>
Archive: <url>"
    @mjh2000: "Also - is there a way in debian to realize which drive is mapped to
which linux device ??
When I go into the bios - i see disk labels or names as DSK04, DSK02
and also long string of numbers - i guess it is the serial number of
drive.
<quote>
To UNSUBSCRIBE, email to <email_address> 
with a subject of "unsubscribe". Trouble? Contact <email_address>
Archive: <url>"
    @marcausl: "This discussion opens a question I've been curious about.
IIUC, bios choses a boot device and runs the MBR code.  Assuming
that's GRUB2 MBR code, GRUB2 then loads the 1.5 code hidden before the
first partition of the same device.  Next step is to process grub.cfg.
Now, does that code contain a copy of grub.cfg?  Or
does it read it from someplace?  If the second, how does it decide
where/how to read grub.cfg.
I understand how, once it has grub.cfg, it decides what to boot.  It's
where grub.cfg comes from that I don't understand.
To UNSUBSCRIBE, email to <email_address> 
with a subject of "unsubscribe". Trouble? Contact <email_address>
Archive: <url>"
    @tvdebian: "<quote>
Whole drive, like "/dev/sdd", unless you really know what you are doing
and want to install to a partition instead (typically if you have
another os in multiboot that manages the bootloader).
Usually no for Linux, the "boot" flag is for the /boot partition where
the kernel resides.
grub2 (aka grub-pc) support special "bios_grub" partition, but that's
meant for gpt disklabel and is completely irrelevant for you.
Grub is installed in the Master Boot Record ("MBR" for short), and some
components in the free space between the MBR and the start of the first
partition. You don't have to worry about this unless something is going
seriously wrong during the grub installation process.
It update the initial ram disk (aka initrd or initramfs) that normally
resides in /boot.
Once the raid is running you don't have to worry about what's synced
anymore, everything written to the raid array is synced. At the user
level there is only one device (the raid device "md*"), only the kernel
and mdadm have to know about the physical drives.
grub deals with the drives directly, before raid is even started, that's
why you have to use the devices addresses and not the partitions.
To UNSUBSCRIBE, email to <email_address> 
with a subject of "unsubscribe". Trouble? Contact <email_address>
Archive: <url>"
    @tvdebian: "<quote>
For partition UUID:
ls -l /dev/disk/by-uuid
or
blkid /dev/sdd?
For disk ID:
ls -l /dev/disk/by-id
For partitions labels:
ls -l /dev/disk/by-label
For mdadm devices:
mdadm misc detail brief /dev/md?*  (as seen in mdadm.conf)
To UNSUBSCRIBE, email to <email_address> 
with a subject of "unsubscribe". Trouble? Contact <email_address>
Archive: <url>"
    @jmtd: "<quote>
Pretty sure at that stage it has loaded modules that let it interpret a 
selection of filesystem types, in order to fetch grub.cfg (and further
grub modules).  Therefore you need grub modules for whatever filesystem
types (and similar) are needed to get to /boot; historically, that 
excluded md (and lvm) and so /boot was typically not put inside LVM or
md RAID � more recently I believe GRUB can interpret LVM and MD devices.
To UNSUBSCRIBE, email to <email_address> 
with a subject of "unsubscribe". Trouble? Contact <email_address>
Archive: <url>"
    @jmtd: "<quote>
Boot with just the good drive; degrade the array (fail the missing 
drive); relabel your root partition (whatever is mounted at /) with a 
filesystem label you have not used before; adjust your fstab and 
reconfigure your bootloader accordingly.  You may need to regenerate 
your initramfs.
Power off, plug both drives back in; upon boot, interrupt your boot 
loader (there's some chance your system still invoked the one from the
bad drive,) and adjust the kernel command line so that root=LABEL=new-label.
That above might do the job; if not, you may also need to play in the 
GRUB CLI to access the correct /boot to load the correct initramfs.
Jon Dowland
To UNSUBSCRIBE, email to <email_address> 
with a subject of "unsubscribe". Trouble? Contact <email_address>
Archive: <url>"
    @marcausl: "Jon Dowland <email_address> writes:
<quote>
How does it decide which partition (on which disk) and what pathname
to use to find grub.cfg.  I assume one it chooses a partition it can
look at partitions, figure out what kind they are, and figure out how
to read them.
Also - if the chosen partition is raid1 does it "assemble" the array
or just use the chosen partition as if it where a degraded array.
To UNSUBSCRIBE, email to <email_address> 
with a subject of "unsubscribe". Trouble? Contact <email_address>
Archive: <url>"
    @mjh2000: "In related questions - i hope you can answer - are :
1. why do i get an error when trying to make swap partition - i get
this error below after running fdisk, creating a primary partition
/dev/sdd2 and then changing the type - with t -
As in below -
2. the /dev/sdd drive is the mirrored drive in the set - do i have to
set /dev/sdd1 active in fdisk ???
root@rider:~# mkswap /dev/sdd2
mkswap: error: swap area needs to be at least 40 KiB
Usage: mkswap [-c] [-pPAGESZ] [-L label] [-U UUID] /dev/name [blocks]
root@rider:~# fdisk -l /dev/sdd
Disk /dev/sdd: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units =3D cylinders of 16065 * 512 =3D 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0005d0fd
=A0 =A0Device Boot =A0 =A0 =A0Start =A0 =A0 =A0 =A0 End =A0 =A0 =A0Blocks =
=A0 Id =A0System
/dev/sdd1 =A0 =A0 =A0 =A0 =A0 =A0 =A0 1 =A0 =A0 =A0121091 =A0 972663426 =A0=
 fd =A0Linux raid autodetect
/dev/sdd2 =A0 =A0 =A0 =A0 =A0121092 =A0 =A0 =A0121601 =A0 =A0 4096575 =A0 8=
2 =A0Linux swap / Solaris
thanks
mjh
On Thu, Jan 19, 2012 at 12:44 PM, Marc Auslander <email_address> wrote=
:
<quote>
.org
To UNSUBSCRIBE, email to <email_address> 
with a subject of "unsubscribe". Trouble? Contact <email_address>
Archive: <url>"
    @mjh2000: "Sorry to load up on related issues in this mail, but have a big issue:
After having synced my mirrored drives in software raid -
I get the following error:
error: superfluous RAID member (2 found).
the boot drive is /dev/sdc1 but added another one to the mirror - /dev/sdd1
my questions :
1. should i put both drives in the bootup bios scan ?
2. should i set their partitions as bootable in fdisk ?
3. how do i fix this without having to zero out the drive and re-add
it to the mirror ?
<quote>
 =A0 Id =A0System
=A0 fd =A0Linux raid autodetect
 82 =A0Linux swap / Solaris
te:
n.org
To UNSUBSCRIBE, email to <email_address> 
with a subject of "unsubscribe". Trouble? Contact <email_address>
Archive: <url>"
    @tvdebian: "<quote>
What are you trying to achieve exactly ? fdisk knows nothing about mdadm
raid, here you say that /dev/sdd is part of a mirroring raid (each
partitions are I guess), and later you are working with fdisk on
/dev/sdd2. If /dev/sdd2 is part of a raid1 array you must work on the
mdadm device (/dev/md*), this is the device you need to "mkswap". There
is nothing else to do to make it work as swap (apart registering it in
mdadm.conf and fstab).
If you use fdisk on a raid member you are going to wreck your system in
no time !
I am not sure I understand what you are doing and how your raid is set.
Could you post the output of:
cat /proc/mdstat
and
parted -l
To UNSUBSCRIBE, email to <email_address> 
with a subject of "unsubscribe". Trouble? Contact <email_address>
Archive: <url>"
    @tvdebian: "<quote>
There is a good chance that the error reported is more cosmetic than
alarming. Could you give the metadata version used on the affected array
("cat /proc/mdstat" or "mdadm examine /dev/sd??" replace "??" with
affected partitions addresses, otherwise it's going to print for every
partitions).
Is that a bios setting on your mainboard ? If it is I think you can as
both drive should have a working grub first stage.
Usually not necessary, but won't hurt.
If it works you don't have to "fix" it, I encountered this error before
and thought it had been fixed as a bug in grub. Grub is detecting
metadata both on the drive and the partitions, and considers that two
sets of metadata are one too many. But it shouldn't lead to a problem,
grub will fall-back to one set.
The only nasty cases I know occur if the drives where previously used in
a raid and metadata were not cleared prior to reusing it ; if the raid
partitions have been created over an existing file-system and metadata
are misplaced ; or if a partitioned raid1 (as opposed to partitions
assembled in raid1 arrays) is wrongly detected as an unpartitioned one.
Knowing more about the way you created the raid and your setup would
help to know if you fall in one of this categories.
To UNSUBSCRIBE, email to <email_address> 
with a subject of "unsubscribe". Trouble? Contact <email_address>
Archive: <url>"
    @mjh2000: "Okay..I am telling all in this email -:)
My configuration is as such:
/dev/md0 =3D /dev/sdc1 and /dev/sdd1
/dev/md1 =3D /dev/sda1 and /dev/sb1
****My swap partitions are not part of the array or mirror  at all -
they are just regular partitions - they are:
/dev/sdc2 and /dev/sdd2.
When I boot the system with all drives in, I get the superflous error.
So the only way to boot is only to put in /dev/sdc alone and boot.
when i get to a linux prompt, I insert the second drive into the system /de=
v/sdd
To sync them, /dev/sdd has already failed, so i run
sfdisk -d /dev/sdc | sfdisk /dev/sdd
** i get an error that nothing has changed - so I run it with the
force command to get the partitions identical like:
sfdisk -d /dev/sdc | sfdisk force /dev/sdd
Once that is successful - i run mdadm manage /dev/md0 add /dev/sdd1
And the sync process starts, and when it is done yesterday, I ran this
and got these errors:
root@rider:~# grub-install recheck no-floppy /dev/sdc
error: superfluous RAID member (2 found).
error: superfluous RAID member (2 found).
error: superfluous RAID member (2 found).
error: superfluous RAID member (2 found).
error: superfluous RAID member (2 found).
Installation finished. No error reported.
root@rider:~# grub-install recheck no-floppy /dev/sdd
error: superfluous RAID member (2 found).
error: superfluous RAID member (2 found).
error: superfluous RAID member (2 found).
error: superfluous RAID member (2 found).
error: superfluous RAID member (2 found).
Installation finished. No error reported.
root@rider:~# grub-install recheck no-floppy /dev/sdc
My blkid is :
root@rider:~# blkid
/dev/md0: UUID=3D"611258bc-4ace-4779-b44d-73ba1949f7db" TYPE=3D"ext4"
/dev/sdb1: UUID=3D"98d6db12-5b96-8cb7-25d3-d6abaab9ab86" LABEL=3D"rider:1"
TYPE=3D"linux_raid_member"
/dev/sda1: UUID=3D"98d6db12-5b96-8cb7-25d3-d6abaab9ab86" LABEL=3D"rider:1"
TYPE=3D"linux_raid_member"
/dev/md1: UUID=3D"70e605e3-7dbb-412e-9b0a-c212bf9d8592" TYPE=3D"ext4"
/dev/sdc1: UUID=3D"f696d568-1f42-26e3-42f0-a70a68e284a7"
LABEL=3D"debian:0" TYPE=3D"linux_raid_member"
/dev/sdc2: UUID=3D"ba64d9c2-8e76-4545-8d64-7fc0adcc3b17" TYPE=3D"swap"
/dev/sdd1: UUID=3D"f696d568-1f42-26e3-42f0-a70a68e284a7"
LABEL=3D"debian:0" TYPE=3D"linux_raid_member"
/dev/sdd2: UUID=3D"bdacec9f-1b12-44db-8562-d572a7117790" TYPE=3D"swap"
My parted -l is:
Model: ATA ST31000340AS (scsi)
Disk /dev/sda: 1000GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number  Start   End     Size    Type     File system  Flags
 1      32.3kB  1000GB  1000GB  primary  ext3         raid
Model: ATA ST31000340AS (scsi)
Disk /dev/sdb: 1000GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number  Start   End     Size    Type     File system  Flags
 1      32.3kB  1000GB  1000GB  primary  ext3         raid
Model: ATA ST31000340AS (scsi)
Disk /dev/sdc: 1000GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number  Start   End     Size    Type     File system     Flags
 1      1049kB  996GB   996GB   primary  ext3            raid
 2      996GB   1000GB  4204MB  primary  linux-swap(v1)
Model: ATA ST31000528AS (scsi)
Disk /dev/sdd: 1000GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number  Start   End     Size    Type     File system     Flags
 1      1049kB  996GB   996GB   primary  ext4            raid
 2      996GB   1000GB  4204MB  primary  linux-swap(v1)
Warning: Unable to open /dev/fd0 read-write (Read-only file system).  /dev/=
fd0
has been opened read-only.
Error: /dev/fd0: unrecognised disk label
Model: Linux Software RAID Array (md)
Disk /dev/md0: 996GB
Sector size (logical/physical): 512B/512B
Partition Table: loop
Number  Start  End    Size   File system  Flags
 1      0.00B  996GB  996GB  ext4
Model: Linux Software RAID Array (md)
Disk /dev/md1: 1000GB
Sector size (logical/physical): 512B/512B
Partition Table: loop
Number  Start  End     Size    File system  Flags
 1      0.00B  1000GB  1000GB  ext4
And /proc/mdadm.conf is :
root@rider:~# cat /proc/mdstat
Personalities : [raid1]
md1 : active raid1 sda1[2] sdb1[1]
      976758841 blocks super 1.2 [2/2] [UU]
md0 : active raid1 sdd1[2] sdc1[1]
      972654456 blocks super 1.2 [2/2] [UU]
unused devices: <none>
When I run the status on mdadm, i get this :
root@rider:~# mdadm misc detail brief /dev/md?*
ARRAY /dev/md0 metadata=3D1.2 name=3Ddebian:0
UUID=3Df696d568:1f4226e3:42f0a70a:68e284a7
ARRAY /dev/md1 metadata=3D1.2 name=3Drider:1
UUID=3D98d6db12:5b968cb7:25d3d6ab:aab9ab86
Also my grub boot lines are :
### BEGIN /etc/grub.d/10_linux ###
menuentry 'Debian GNU/Linux, with Linux 2.6.32-5-amd64' class debian
class gnu-linux class gnu class os {
        insmod raid
        insmod mdraid
        insmod part_msdos
        insmod part_msdos
        insmod ext2
        set root=3D'(md/0)'
        search no-floppy fs-uuid set 611258bc-4ace-4779-b44d-73ba1949=
f7db
        echo    'Loading Linux 2.6.32-5-amd64 ...'
        linux   /boot/vmlinuz-2.6.32-5-amd64
root=3DUUID=3D611258bc-4ace-4779-b44d-73ba1949f7db ro text
        echo    'Loading initial ramdisk ...'
        initrd  /boot/initrd.img-2.6.32-5-amd64
}
menuentry 'Debian GNU/Linux, with Linux 2.6.32-5-amd64 (recovery
mode)' class debian class gnu-linux class gnu class os {
        insmod raid
        insmod mdraid
        insmod part_msdos
        insmod part_msdos
        insmod ext2
        set root=3D'(md/0)'
        search no-floppy fs-uuid set 611258bc-4ace-4779-b44d-73ba1949=
f7db
        echo    'Loading Linux 2.6.32-5-amd64 ...'
        linux   /boot/vmlinuz-2.6.32-5-amd64
root=3DUUID=3D611258bc-4ace-4779-b44d-73ba1949f7db ro single
        echo    'Loading initial ramdisk ...'
        initrd  /boot/initrd.img-2.6.32-5-amd64
I am currently terrified to reboot my box - any help would be appriciated=
 -
I have NOT run the command "update-initramfs -u -k all  "  and do not
know if i should.
thanks
mjh
On Tue, Jan 24, 2012 at 5:12 PM, <email_address>
<quote>
s =A0 Id =A0System
=A0 fd =A0Linux raid autodetect
=A0 82 =A0Linux swap / Solaris
.org
To UNSUBSCRIBE, email to <email_address> 
with a subject of "unsubscribe". Trouble? Contact <email_address>
Archive: <url>"
    @tvdebian: "In-line reply ;
<quote>
Any particular reason do do that ? If you want your system/applications
to carry on working if a disk fails you need the swap on raid1 too.
Why do you do that ? You are forcing the partitioning of the first disk
onto the second, this could work at raid creation time but isn't the
proper procedure to re-add a failed member to an array. You don't have
to "sync" the data and even less the disk partitioning manually prior to
re-adding it to the raid. mdadm will handle the resync.
[cut]
Why do you have file-systems on your partitions ? Only the "md" raid
devices should be formatted with a file-system, not the underlying
partitions !
I would be curious to know what "fsck" says about your md devices (fsck
/dev/md0 for example) ?
[cut]
You seem to be walking in the dark awaiting to hit the next pole ;-) .
Updating the initrd won't solve file-system or raid inconsistencies, it
would only be necessary if the content of mdadm.conf had changed.
I am starting to think that you have much lower level problems. When you
created this system, where the disks "clean", or did you use "sfdisk"
over existing formatted partitions ? Where the disks used in a raid
before ? If this is the case you should consider backing up and
recreating the raid properly.
Also, if one disk is repeatedly dropping from the raid array, consider
looking at the "smart" values, it may be dying.
To UNSUBSCRIBE, email to <email_address> 
with a subject of "unsubscribe". Trouble? Contact <email_address>
Archive: <url>"
    @tomh0665: "On Wed, Jan 25, 2012 at 5:35 PM, <email_address>
<quote>
+1
/dev/sdd
It's unorthodox but it's a replacement of zeroing the superblock with
mdadm before adding the partition back to into the array.
There are a few bugs on b.d.o that correspond to this error but none
that fit your case, AFAICT. "grub-install" does say "Installation
finished. No error reported."
You could check whether grub's OK via bootinfoscript (although the
only real test'll be a reboot...).
<url>
Flags
=A0 =A0 raid
Flags
=A0 =A0 raid
 =A0 Flags
=A0 =A0 =A0 =A0raid
 =A0 Flags
=A0 =A0 =A0 =A0raid
sdc1 is ext3 and sdd1 is ext4; somehow.
To UNSUBSCRIBE, email to <email_address> 
with a subject of "unsubscribe". Trouble? Contact <email_address>
Archive: <url>"
    @mjh2000: "<quote>
I see your point - I will create new linux raid auto partitions and
mirror it as well - thanks
/dev/sdd
I did not mean to do this - i think this is my main issue - i can not
zero out drives with mdadm.
It gives an error that i can not get past - so i use force option.
Do you recommend any other utility to zero out drives - that will make
them blank ?
I think it maybe an issue with my working drive - i think the
partitions are screwed up there - and when sfdsik copies - it does not
copy correctly.
But i did boot with knoppix and went to fdisk and deleted the
partitions - but still had issues with sfdisk.
An utilty u recommend ??
 =A0 Flags
=A0 =A0 =A0 =A0raid
 =A0 Flags
=A0 =A0 =A0 =A0raid
Again - i think sfdisk copy from working drive is causing this issue.
Can i go into fdsik to fix ?
Change the labels ? i just think they are labeled incorrectly.
What smart values are u refering to ? is that a utility ?
Again - i think i need a clean utility or at least a procedure other
then zero option of mdadm to clear out the drive.
thanks
mjh
To UNSUBSCRIBE, email to <email_address> 
with a subject of "unsubscribe". Trouble? Contact <email_address>
Archive: <url>"
    @mjh2000: "<quote>
thanks for the script - will check it out
=A0Flags
=A0 =A0 raid
=A0Flags
=A0 =A0 raid
=A0 =A0 Flags
=A0 =A0 =A0 =A0raid
=A0 =A0 Flags
=A0 =A0 =A0 =A0raid
i think it is a label issue - because when i do mount - it is all ext4
To UNSUBSCRIBE, email to <email_address> 
with a subject of "unsubscribe". Trouble? Contact <email_address>
Archive: <url>"
    @tvdebian: "<quote>
It would be useful to know the exact mdadm error message when you try to
do "mdadm zero-superblock" on the failed raid member. You need to
remove ("mdadm remove") the failed member first, or work when the
array isn't started.
sfdisk doesn't "zero out" the disk, with option "-d" it merely dump the
partition table in a format that can be reused to copy over another
disk. It's completely possible to restore the target disk to it's
previous state with the correct information (ideally the output of
"sfdisk -O" , but testdisk could do the trick). Everything is on the
disk, but there is no more "map" to retrieve it.
To "zero out" a disk one could use dd to fill the disk with zeros, or
random data if security is important, badblock in write mode can do that
too.
The important part is that sfdisk has no idea of anything such as
metadata, bootloaders, file-system, even extended partitions can be
clobbered by the "-d" magic trick. It works reliably only for empty
primary partitions, preferably small, on disks with msdos disk-labels,
preferably identicals (same geometry), using the "-D" option.
So it's fragile enough that you don't want to mess with the "force"
option when sfdisk complains, it can mess things easily enough as it is
;-) .
After clearing previous raid metadata if any, I usually use parted to
create new disklabels and empty (non formatted) partitions (if not using
the whole disk) before creating a raid.
Repeat on all disks to be included in the raid with the same values.
See "help mklabel" and "help mkpart" in parted, or "man parted".
When done create the raid (with 1.2 metadata), start it, and format the
raid device with mkfs. Nothing else is needed, no flag or file-system
type changing to "fd".
Even better, clear the disks from raid metadata, create new disklabels,
and let Debian installer take care of the rest. Yes, it means
reinstalling the system, but it's by far the easiest/safest/fastest
option. Personal data can be restored from a backup quicker than one can
read parted manual !
Having file-systems on the partitions before creating the raid doesn't
help. If you want to (try to) "fix" things at this stage, run "e2fsck
-cc" on the raid device (unmounted), and then "resize2fs" . But this
will be painfully slow with 1GB disks, think more than a day...
Did you try to run "fsck" on the raid device (from a live-cd possibly) ?
Talking about disklabel or partition labels ? Creating a new disklabel
means loosing the data on it, and starting over... Partitions labels
have no relevance here, grub uses UUID's/mdUUID's.
"smart" is a self-check utility to diagnose disk health. It isn't always
100% accurate but can provide hints that a disk is about to fail. If you
want a graphical interface use "gsmartcontrol", otherwise read about
"man smartctl" (needs package "smartmontools" installed).
"smartctl -l error -l selftest -H /dev/sd?" can get you started, change
"?" with actual disk address (i.e. /dev/sdd).
To UNSUBSCRIBE, email to <email_address> 
with a subject of "unsubscribe". Trouble? Contact <email_address>
Archive: <url>"
{'source': 'USENET', 'other_information': '{"reply_count": 26, "forum_name": "linux.debian.user.20140712.mbox"}', 'file': 'data/output/usenet-linux.debian.parquet'}