linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* ANNOUNCE: mdadm 2.2 - A tool for managing Soft RAID under Linux
@ 2005-12-05  6:08 Neil Brown
  2005-12-06 14:59 ` Andre Noll
  0 siblings, 1 reply; 5+ messages in thread
From: Neil Brown @ 2005-12-05  6:08 UTC (permalink / raw)
  To: linux-raid



I am pleased to announce the availability of
   mdadm version 2.2

It is available at the usual places:
   http://www.cse.unsw.edu.au/~neilb/source/mdadm/
and
   http://www.{countrycode}.kernel.org/pub/linux/utils/raid/mdadm/

mdadm is a tool for creating, managing and monitoring
device arrays using the "md" driver in Linux, also
known as Software RAID arrays.

Release 2.2 fixes a few small bugs and add as few small elements of
functionality.  Possibly the most interesting is the addition of
'README.initramfs' and 'mkinitramfs'.  Feedback on these would be
most welcome.

Changelog Entries:
    -   Assorted bug fixes
    -   Support write-intent-bitmaps on raid10
    -   Support little-endian (Rather than hostendian) bitmaps.
    -   Return correct error code from 'mdadm -S'
    -   Remove extra blank line from 'mdadm -Eb' output.
    -   Improve option parsing so that -a and -b do not have
	optional arguements: the arg is either required or not
	depending on context.
    -   Allow scanning of devices listed in /proc/partitions even
	if they don't appear in /dev.
    -   Support --assume-clean in --create mode as well as --build
    -   Add support for --monitor to report to syslog: -y or --syslog.
	Thanks to Ross Vandegrift
    -   --monitor now reports which device failed in a 'Fail' message
	   This broke with 2.6
    -   Improve chance of array starting properly after a crash.
	mdadm was insisting the event numbers were identical, but this
	isn't needed, and is a problem if the crash was while the metadata
	was being updated.
    -   Support --update==uuid
    -   Added README.initramfs and mkinitramfs to help people use an
	initram for starting md arrays at boot.


Development of mdadm is sponsored by
 SUSE Labs, Novell Inc.

NeilBrown  5th December 2005



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: ANNOUNCE: mdadm 2.2 - A tool for managing Soft RAID under Linux
  2005-12-05  6:08 ANNOUNCE: mdadm 2.2 - A tool for managing Soft RAID under Linux Neil Brown
@ 2005-12-06 14:59 ` Andre Noll
  2006-01-05  1:55   ` David M. Strang
  0 siblings, 1 reply; 5+ messages in thread
From: Andre Noll @ 2005-12-06 14:59 UTC (permalink / raw)
  To: Neil Brown

On 17:08, Neil Brown wrote:

> Release 2.2 fixes a few small bugs and add as few small elements of
> functionality.  Possibly the most interesting is the addition of
> 'README.initramfs' and 'mkinitramfs'.  Feedback on these would be
> most welcome.

From README.initramfs:

	A minimal initramfs for assembling md arrays can be created using 3
	files and one directory.  These are:

	/bin           Directory
	/bin/mdadm     statically linked mdadm binary
	/bin/busybox   statically linked busybox binary
	/bin/sh        hard link to /bin/busybox
	/init          a shell script which call mdadm appropriately.

Don't we need /dev/console as well?


About the example script:

	==============================================
	#!/bin/sh

	echo 'Auto-assembling boot md array'
	mkdir /proc
	mount -t proc proc /proc
	if [ -n "$rootuuid" ]
	then arg=--uuid=$rootuuid
	elif [ -n "$mdminor" ]
	then arg=--super-minor=$mdminor
	else arg=--super-minor=0
	fi
	echo "Using $arg"
	mdadm -Acpartitions $arg --auto=part /dev/mda
	cd /
	mount /dev/mda1 /root ||  mount /dev/mda /root
	umount /proc
	cd /root
	exec chroot . /sbin/init < /dev/console > /dev/console 2>&1
	=============================================

(a) mkdir, mount, umount won't be found. 'busybox mkdir /proc'
etc. does the job though. Or, create symlinks.

(b) Does mdadm --auto=/dev create the /dev directory?  If if does
not, the script has to create it. Otherwise, the mdadm manpage should
mention this ;)

(c) Documentation/filesystems/ramfs-rootfs-initramfs.txt recommends to
	mount --move . /
before the final chroot.

There is also a trivial typo. Patch below.

Have fun
Andre

--- mdadm-2.2/README.initramfs~	Tue Dec  6 13:57:22 2005
+++ mdadm-2.2/README.initramfs	Tue Dec  6 13:57:46 2005
@@ -84,7 +84,7 @@ Some key points are:
 
   The --auto flag is given to mdadm so that it will create /dev/md*
   files automatically.  This is needed as /dev will not contain
-  and md files, and udev will not create them (as udev only created device
+  any md files, and udev will not create them (as udev only created device
   files after the device exists, and mdadm need the device file to create
   the device).  Note that the created md files may not exist in /dev
   of the mounted root filesystem.  This needs to be deal with separately

-- 
Jesus not only saves, he also frequently makes backups

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: ANNOUNCE: mdadm 2.2 - A tool for managing Soft RAID under Linux
  2005-12-06 14:59 ` Andre Noll
@ 2006-01-05  1:55   ` David M. Strang
  2006-01-05  6:00     ` Daniel Pittman
  0 siblings, 1 reply; 5+ messages in thread
From: David M. Strang @ 2006-01-05  1:55 UTC (permalink / raw)
  To: linux-raid, Andre Noll, Neil Brown

On Dec 6, 2005, Andre Noll wrote:

> Don't we need /dev/console as well?
>
> About the example script:
>
> ==============================================
> #!/bin/sh
>
> echo 'Auto-assembling boot md array'
> mkdir /proc
> mount -t proc proc /proc
> if [ -n "$rootuuid" ]
> then arg=--uuid=$rootuuid
> elif [ -n "$mdminor" ]
> then arg=--super-minor=$mdminor
> else arg=--super-minor=0
> fi
> echo "Using $arg"
> mdadm -Acpartitions $arg --auto=part /dev/mda
> cd /
> mount /dev/mda1 /root ||  mount /dev/mda /root
> umount /proc
> cd /root
> exec chroot . /sbin/init < /dev/console > /dev/console 2>&1
> =============================================
>
> (a) mkdir, mount, umount won't be found. 'busybox mkdir /proc'
> etc. does the job though. Or, create symlinks.
>
> (b) Does mdadm --auto=/dev create the /dev directory?  If if does
> not, the script has to create it. Otherwise, the mdadm manpage should
> mention this ;)
>
> (c) Documentation/filesystems/ramfs-rootfs-initramfs.txt recommends to
> mount --move . /
> before the final chroot.
>

I'm not very initrd savvy; and I'm having a heck of a time making the 
initramfs instructions in mdadm work. Does anyone have a working example of 
them?

I'm attempting to use the following 'init' file -- based on some of the 
observations that Andre made.

#!/bin/sh

/bin/busybox echo "Auto-assembling boot md array..."
/bin/busybox mkdir /proc
/bin/busybox mount -t proc proc /proc
/bin/busybox echo "Using /dev/md_d0..."
/bin/mdadm -A /dev/md_d0  --auto=part /dev/sdb1
cd /
/bin/busybox mount /dev/md_d0p1 /root
/bin/busybox umount /proc
cd /root
exec /bin/busybox chroot . /sbin/init < /dev/console > /dev/console 2>&1

I've added a /dev directory to the init.cpio.gz as well. It seems like I may 
have some cart before the horse syndrome tho, as mdadm cannot find 
/dev/sdb1... which I'm assuming is because udev hasn't started.

Help!

-- David M. Strang 


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: ANNOUNCE: mdadm 2.2 - A tool for managing Soft RAID under Linux
  2006-01-05  1:55   ` David M. Strang
@ 2006-01-05  6:00     ` Daniel Pittman
  2006-01-05 20:40       ` David M. Strang
  0 siblings, 1 reply; 5+ messages in thread
From: Daniel Pittman @ 2006-01-05  6:00 UTC (permalink / raw)
  To: linux-raid

"David M. Strang" <dstrang@shellpower.net> writes:

[...]

> I'm not very initrd savvy; and I'm having a heck of a time making the
> initramfs instructions in mdadm work. Does anyone have a working example
> of them?

[...]

> I've added a /dev directory to the init.cpio.gz as well. It seems like I
> may have some cart before the horse syndrome tho, as mdadm cannot find
> /dev/sdb1... which I'm assuming is because udev hasn't started.

Perhaps you would be better served by starting with a fully functional
initramfs (or initrd) implementation that is in active use, then
extending (or adapting) it to do what you wanted?

Ubuntu Linux and Debian unstable have the 'initramfs-tools' package
which currently boots a number of software RAID machines for me, and
seems a fairly reasonably understandable implementation of the concept.

Regards,
        Daniel



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: ANNOUNCE: mdadm 2.2 - A tool for managing Soft RAID under Linux
  2006-01-05  6:00     ` Daniel Pittman
@ 2006-01-05 20:40       ` David M. Strang
  0 siblings, 0 replies; 5+ messages in thread
From: David M. Strang @ 2006-01-05 20:40 UTC (permalink / raw)
  To: linux-raid, Daniel Pittman

On Jan 5, 2006, Daniel Pittman wrote:
>
> Perhaps you would be better served by starting with a fully functional
> initramfs (or initrd) implementation that is in active use, then
> extending (or adapting) it to do what you wanted?
>
> Ubuntu Linux and Debian unstable have the 'initramfs-tools' package
> which currently boots a number of software RAID machines for me, and
> seems a fairly reasonably understandable implementation of the concept.
>

Thanks for the suggestions Daniel... I did take a look at Ubuntu & Debian's 
initramfs-tools... both of them actually made me a bit more lost in some 
ways; on a postive side... I did get my initramfs to finally work!

Here is the 'final' initramfs script; parts of it where gleaned from 
http://people.ubuntu.com/~jbailey/bzrtree/initramfs-tools/init

--- begin init ---

#!/bin/sh

/bin/busybox echo "Creating busybox aliases..."
/bin/busybox ln -s /bin/busybox /bin/ln
ln -s /bin/busybox /bin/[
ln -s /bin/busybox /bin/chmod
ln -s /bin/busybox /bin/chroot
ln -s /bin/busybox /bin/echo
ln -s /bin/busybox /bin/mkdir
ln -s /bin/busybox /bin/mknod
ln -s /bin/busybox /bin/mount
ln -s /bin/busybox /bin/umount
ln -s /lib64 /lib

echo "Auto-assembling boot md array..."

mkdir /sys
mkdir /proc
mkdir /tmp
mkdir -p /var/lock

mount -t sysfs none /sys
mount -t proc none /proc
/sbin/start_udev

echo "Using /dev/md_d0..."
mdadm -A /dev/md_d0  --auto=part /dev/sda1,/dev/sdb1

mount /dev/md_d0p1 /root

mkdir -p /dev/.static/dev
chmod 700 /dev/.static/
mount -n -o bind /root/dev /dev/.static/dev
mount -n -o move /dev /root/dev

umount /sys
umount /proc

exec chroot /root /sbin/init < /root/dev/console > /root/dev/console 2>&1

--- end init ---

Needless to say, it worked great.

Here is a list of files I included:

./bin
./bin/sh
./bin/mdadm
./bin/busybox
./etc
./etc/udev
./etc/udev/scripts
./etc/udev/scripts/dvb.sh
./etc/udev/scripts/ide-devfs.sh
./etc/udev/scripts/inputdev.sh
./etc/udev/scripts/scsi-devfs.sh
./etc/udev/scripts/raid-devfs.sh
./etc/udev/scripts/eventrecorder.sh
./etc/udev/rules.d
./etc/udev/rules.d/50-udev.rules
./etc/udev/udev.conf
./init
./sbin
./sbin/udev
./sbin/udevd
./sbin/start_udev
./sbin/udevsend
./sbin/udev_run_hotplugd
./sbin/udevcontrol
./sbin/udev_run_devd
./sbin/udevstart
./lib64
./lib64/ld-linux-x86-64.so.2
./lib64/ld-linux.so.2
./lib64/libc.so.6


I'm just posting these to the list for the sake of completeness; in case 
anyone else has this problem in the future.

My current challenge is... lilo hates me now. It won't update -- it 
generates the following message:

Fatal: Sorry, don't know how to handle device 0xfe01

I've tried the libdevmapper patch; with no avail. I'm not having much luck 
with grub either.

Any suggestions? I don't have any 'non-raid' bootable devices.

-- David M. Strang 


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2006-01-05 20:40 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-12-05  6:08 ANNOUNCE: mdadm 2.2 - A tool for managing Soft RAID under Linux Neil Brown
2005-12-06 14:59 ` Andre Noll
2006-01-05  1:55   ` David M. Strang
2006-01-05  6:00     ` Daniel Pittman
2006-01-05 20:40       ` David M. Strang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).