Re: issue with mdadm and mirroring drives
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
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: