[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: mdadm problem creating device





On Jan 6, 2008 2:53 PM, S Scharf <ss11223@gmail.com> wrote:
I installed a new disk and am trying to create a one disk raid 1 on it
(and will add the second disk later)

(Debian testing compiled with raid built into kernel)
$ cat /proc/mdstat
Personalities : [linear] [raid1] [raid10] [multipath] [faulty] [raid6] [raid5] [raid4]
unused devices: <none>

I have two partions on /dev/sda

$sudo fdisk -l /dev/sda

Disk /dev/sda: 400.0 GB, 400088457216 bytes
255 heads, 63 sectors/track, 48641 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x8b148706

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1          30      240943+  fd  Linux raid autodetect
/dev/sda2              31         517     3911827+  82  Linux swap / Solaris
/dev/sda3             518       48641   386556030   fd  Linux raid autodetect


but when I run mdadm I get the followng:

$ sudo mdadm --create /dev/md0 --level=raid1 --raid-devices=2 /dev/sda3 missing
mdadm: /dev/sda3 is too small: 0K
mdadm: create aborted

any help wil be appreciated.

Thanks
Stuart

Thanks for the replies, but I found the problem

The disk had an old file system on it, and the error message was trying to tell me there wasn't enough
room after the file system on the partition to add the raid superblock. The problem was I was planning on
reformatting the disk after creating the raid, and the error message was too vague to fully describe what was
happening. So in the end I used dd to trash the partition and all worked well.

Stuart


Reply to: