FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 01-06-2008, 06:53 PM
"S Scharf"
 
Default mdadm problem creating device

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
 
Old 01-06-2008, 07:38 PM
"Douglas A. Tutty"
 
Default mdadm problem creating device

On Sun, Jan 06, 2008 at 02:53:57PM -0500, S Scharf 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)
>

> 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

I'm just guessing here, since I set up my raid1 when I installed Etch,
but you told it raid1 and you told it to use two devices but you only
gave it one device. What happens if you use --raid-devices=1?

Doug.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 01-06-2008, 09:51 PM
Andrew Sackville-West
 
Default mdadm problem creating device

On Sun, Jan 06, 2008 at 03:38:29PM -0500, Douglas A. Tutty wrote:
> On Sun, Jan 06, 2008 at 02:53:57PM -0500, S Scharf 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)
> >
>
> > 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
>
> I'm just guessing here, since I set up my raid1 when I installed Etch,
> but you told it raid1 and you told it to use two devices but you only
> gave it one device. What happens if you use --raid-devices=1?

OP is building a deprecated (I think that's the term) array. It seems
to be a common (I used it to build my array) way to migrate a
system. Put one of the two disk array on ide1 while your system is on
ide0. Then build the array with a disk missing. move data onto the
broken array, then add the other disk in and it will sync up. Pretty
slick trick really.

A
 
Old 01-06-2008, 11:39 PM
"Douglas A. Tutty"
 
Default mdadm problem creating device

On Sun, Jan 06, 2008 at 02:51:09PM -0800, Andrew Sackville-West wrote:
> On Sun, Jan 06, 2008 at 03:38:29PM -0500, Douglas A. Tutty wrote:
> > On Sun, Jan 06, 2008 at 02:53:57PM -0500, S Scharf 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)
> > >
> >
> > > 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
> >
> > I'm just guessing here, since I set up my raid1 when I installed Etch,
> > but you told it raid1 and you told it to use two devices but you only
> > gave it one device. What happens if you use --raid-devices=1?
>
> OP is building a deprecated (I think that's the term) array. It seems
> to be a common (I used it to build my array) way to migrate a
> system. Put one of the two disk array on ide1 while your system is on
> ide0. Then build the array with a disk missing. move data onto the
> broken array, then add the other disk in and it will sync up. Pretty
> slick trick really.

Yes, I understand that. Do you know why he's having a problem?

Doug.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 01-07-2008, 08:04 AM
martin f krafft
 
Default mdadm problem creating device

also sprach Andrew Sackville-West <andrew@farwestbilliards.com> [2008.01.06.2351 +0100]:
> OP is building a deprecated (I think that's the term) array.

degraded, actually.

--
.'`. martin f. krafft <madduck@debian.org>
: :' : proud Debian developer, author, administrator, and user
`. `'` http://people.debian.org/~madduck - http://debiansystem.info
`- Debian - when you have better things to do than fixing systems

... the ravenous bugblatter beast of traal (a mind-bogglingly stupid
animal, it assumes that if you can't see it, it can't see you --
daft as a bush, but very very ravenous);
-- douglas adams, "the hitchhiker's guide to the galaxy"
 
Old 01-07-2008, 12:53 PM
"S Scharf"
 
Default 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
 
Old 01-07-2008, 01:00 PM
martin f krafft
 
Default mdadm problem creating device

also sprach S Scharf <ss11223@gmail.com> [2008.01.07.1453 +0100]:
> The disk had an old file system on it,

mdadm should really not care and just overwrite. If you care, file
a bug with steps to reproduce. Otherwise I am glad you got it
working.

--
.'`. martin f. krafft <madduck@debian.org>
: :' : proud Debian developer, author, administrator, and user
`. `'` http://people.debian.org/~madduck - http://debiansystem.info
`- Debian - when you have better things to do than fixing systems

do micro$oft's total cost of operation calculations
include total cost of downtime?
 
Old 01-07-2008, 03:23 PM
Andrew Sackville-West
 
Default mdadm problem creating device

On Mon, Jan 07, 2008 at 10:04:15AM +0100, martin f krafft wrote:
> also sprach Andrew Sackville-West <andrew@farwestbilliards.com> [2008.01.06.2351 +0100]:
> > OP is building a deprecated (I think that's the term) array.
>
> degraded, actually.

I new it was something like that. Thanks madduck

A
 

Thread Tools




All times are GMT. The time now is 09:17 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org