Re: issue with mdadm and mirroring drives
Okay..I am telling all in this email -:)
My configuration is as such:
/dev/md0 = /dev/sdc1 and /dev/sdd1
/dev/md1 = /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 /dev/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="611258bc-4ace-4779-b44d-73ba1949f7db" TYPE="ext4"
/dev/sdb1: UUID="98d6db12-5b96-8cb7-25d3-d6abaab9ab86" LABEL="rider:1"
TYPE="linux_raid_member"
/dev/sda1: UUID="98d6db12-5b96-8cb7-25d3-d6abaab9ab86" LABEL="rider:1"
TYPE="linux_raid_member"
/dev/md1: UUID="70e605e3-7dbb-412e-9b0a-c212bf9d8592" TYPE="ext4"
/dev/sdc1: UUID="f696d568-1f42-26e3-42f0-a70a68e284a7"
LABEL="debian:0" TYPE="linux_raid_member"
/dev/sdc2: UUID="ba64d9c2-8e76-4545-8d64-7fc0adcc3b17" TYPE="swap"
/dev/sdd1: UUID="f696d568-1f42-26e3-42f0-a70a68e284a7"
LABEL="debian:0" TYPE="linux_raid_member"
/dev/sdd2: UUID="bdacec9f-1b12-44db-8562-d572a7117790" TYPE="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=1.2 name=debian:0
UUID=f696d568:1f4226e3:42f0a70a:68e284a7
ARRAY /dev/md1 metadata=1.2 name=rider:1
UUID=98d6db12: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='(md/0)'
search --no-floppy --fs-uuid --set 611258bc-4ace-4779-b44d-73ba1949f7db
echo 'Loading Linux 2.6.32-5-amd64 ...'
linux /boot/vmlinuz-2.6.32-5-amd64
root=UUID=611258bc-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='(md/0)'
search --no-floppy --fs-uuid --set 611258bc-4ace-4779-b44d-73ba1949f7db
echo 'Loading Linux 2.6.32-5-amd64 ...'
linux /boot/vmlinuz-2.6.32-5-amd64
root=UUID=611258bc-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, tv.debian@googlemail.com
<tv.debian@googlemail.com> wrote:
> 24/01/2012 18:34, Joey L wrote:
>> 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 = cylinders of 16065 * 512 = 8225280 bytes
>> Sector size (logical/physical): 512 bytes / 512 bytes
>> I/O size (minimum/optimal): 512 bytes / 512 bytes
>> Disk identifier: 0x0005d0fd
>>
>>
>> Device Boot Start End Blocks Id System
>> /dev/sdd1 1 121091 972663426 fd Linux raid autodetect
>> /dev/sdd2 121092 121601 4096575 82 Linux swap / Solaris
>>
>>
>> thanks
>> mjh
>>
>
> 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 debian-user-REQUEST@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
> Archive: [🔎] 4F1F2CB4.7040308@googlemail.com">http://lists.debian.org/[🔎] 4F1F2CB4.7040308@googlemail.com
>
Reply to: