# LVM, MDADM Udev errors

## grooveman

Hello.

I'm getting a few errors when I startup and shutdown from udev.  I don't know why they started or where they came from.  They started probably like 4-5 months ago, but school was kicking my butt, so I didn't have time to look into it.

At boot, I get this message:

```
mdadm: No arrays found in the config file or automatically
```

It doesn't seem to affect boot, but it is there... not sure if it is indicative of any real problems or just a minor config err.

The bigger problem is at shutdown, I get this:

```
Node /dev/mapper/vg-vms was not removed by udev.  Falling back to direct removal.

The link /dev/vg/vms should have been removed by udev but it is still present Falling back to direct link removal. [!!}

Shutting Down volume groups

Can't deactivate volume group "vg" with 1 open logical volumes [!!]

Finished shutting down the Logical Volume Manager

Shutting down RAID devices (mdadm) ...

mdadm: stopped /dev/md2

mdadm stopped /dev/md1

mdadm failed to stop array /dev/md3: Device or resource busy

perhaps a running process, mounted filesystem or active volume group?  [!!]
```

I had hoped that it was just a minor portage inconsistency or bug that would fix itself, but after a few months, and a few world updates, it never went away.

Here is my info:

emerge --info udev

```

Portage 2.1.9.25 (default/linux/amd64/10.0/desktop, gcc-4.4.4, glibc-2.11.2-r3, 2.6.34-gentoo-r6 x86_64)

=================================================================

                        System Settings

=================================================================

System uname: Linux-2.6.34-gentoo-r6-x86_64-AMD_Phenom-tm-_II_X4_B45_Processor-with-gentoo-1.12.14

Timestamp of tree: Wed, 19 Jan 2011 03:00:21 +0000

distcc 3.1 x86_64-pc-linux-gnu [enabled]

ccache version 2.4 [enabled]

app-shells/bash:     4.1_p7

dev-java/java-config: 2.1.11-r1

dev-lang/python:     2.6.6-r1, 3.1.2-r4

dev-util/ccache:     2.4-r9

dev-util/cmake:      2.8.1-r2

sys-apps/baselayout: 1.12.14-r1

sys-apps/sandbox:    2.4

sys-devel/autoconf:  2.13, 2.65-r1

sys-devel/automake:  1.8.5-r3, 1.9.6-r3, 1.10.3, 1.11.1

sys-devel/binutils:  2.20.1-r1

sys-devel/gcc:       4.3.4, 4.4.4-r2

sys-devel/gcc-config: 1.4.1

sys-devel/libtool:   2.2.10

sys-devel/make:      3.81-r2

virtual/os-headers:  2.6.30-r1 (sys-kernel/linux-headers)

ACCEPT_KEYWORDS="amd64"

ACCEPT_LICENSE="* @EULA"

CBUILD="x86_64-pc-linux-gnu"

CFLAGS="-march=amdfam10 -O2 -pipe"

CHOST="x86_64-pc-linux-gnu"

CONFIG_PROTECT="/etc /usr/share/config /var/lib/hsqldb"

CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"

CXXFLAGS="-march=amdfam10 -O2 -pipe"

DISTDIR="/usr/portage/distfiles"

FEATURES="assume-digests binpkg-logs buildpkg ccache distcc distlocks fixlafiles fixpackages news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"

GENTOO_MIRRORS="http://distfiles.gentoo.org"

LDFLAGS="-Wl,-O1 -Wl,--as-needed"

LINGUAS="en_US en"

MAKEOPTS="-j7"

PKGDIR="/usr/portage/packages"

PORTAGE_CONFIGROOT="/"

PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"

PORTAGE_TMPDIR="/var/tmp"

PORTDIR="/usr/portage"

PORTDIR_OVERLAY="/usr/local/portage"

SYNC="rsync://rsync.gentoo.org/gentoo-portage"

USE="3dnow X a52 aac acl acpi alsa amd64 amr apic apm avi berkdb branding bzip2 cairo cddb cdr cli consolekit cracklib crypt cups cxx dbus dga distcc divx dri dts dv dvd dvdr dvdread emboss encode exif fam fbcon ffmpeg firefox flac flash fortran fuse gdbm gdu gif gimp gimp-2.2 gimpprint gmplayer gphoto2 gpm gtk gtk2 hal iconv id3 irc java jpeg kde lcms ldap lib32 libnotify libusb mad mikmod mmx mng modules motif mp3 mp4 mpeg msn mtp mudflap multilib ncurses nls nptl nptlonly nsplugin nspluginwrapper nvidia ogg oggvorbis opengl openmp oscar oss pam pango pcre pdf perl png policykit ppds pppd pulseaudio python qt3support qt4 quicktime raw readline realmedia samba sdl session skype spell sse sse2 ssl startup-notification svg sysfs tcpd tetex tiff truetype udev unicode usb v4l v4l2 vorbis wmv x264 xcb xml xorg xsane xscreensaver xulrunner xv xvid xvmc yahoo zip zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en_US en" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="radeon vesa" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" 

Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

=================================================================

                        Package Settings

=================================================================

sys-fs/udev-151-r4 was built with the following:

USE="extras (multilib) -devfs-compat -old-hd-rules (-selinux) -test"

```

fstab entries

```
/dev/md1                /boot           ext3            noatime         1 2

/dev/mapper/vg-slash    /               ext3            noatime         0 1

/dev/md2                none            swap            sw              0 0

#/dev/mapper/vg-home    /home           ext3            noatime         0 3

/dev/mapper/vg-vms      /vms            ext3            noatime         0 4

```

grub.conf

```

title=Gentoo

root (hd0,0)

kernel /boot/kernel udev domdadm dolvm real_root=/dev/vg/slash root=/dev/ram0 video=uvesab:mtrr:1,ywrap,1024x768-16x85 vga=791

initrd /initramfs

```

lvm.conf (comments and blank lines removed, this was the gentoo default, I didn't configure this...)

```
devices {

    dir = "/dev"

    scan = [ "/dev" ]

    preferred_names = [ ]

    filter = [ "r|/dev/nbd.*|", "a/.*/" ]

    cache_dir = "/etc/lvm/cache"

    cache_file_prefix = ""

    write_cache_state = 1

    sysfs_scan = 1

    md_component_detection = 1

    md_chunk_alignment = 1

    data_alignment_detection = 1

    data_alignment = 0

    data_alignment_offset_detection = 1

    ignore_suspended_devices = 0

    require_restorefile_with_uuid = 1

}

log {

    verbose = 0

    syslog = 1

    overwrite = 0

    level = 0

    indent = 1

    command_names = 0

    prefix = "  "

}

backup {

    backup = 1

    backup_dir = "/etc/lvm/backup"

    archive = 1

    archive_dir = "/etc/lvm/archive"

    retain_min = 10

    retain_days = 30

}

shell {

    history_size = 100

}

global {

    umask = 077

    test = 0

    units = "h"

    si_unit_consistency = 1

    activation = 1

    fallback_to_lvm1 = 0

    proc = "/proc"

    locking_type = 1

    wait_for_locks = 1

    fallback_to_clustered_locking = 1

    fallback_to_local_locking = 1

    locking_dir = "/var/lock/lvm"

    prioritise_write_locks = 1

    abort_on_internal_errors = 0

}

activation {

    udev_sync = 1

    udev_rules = 1

    missing_stripe_filler = "error"

    reserved_stack = 256

    reserved_memory = 8192

    process_priority = -18

    mirror_region_size = 512

    readahead = "auto"

    mirror_log_fault_policy = "allocate"

    mirror_image_fault_policy = "remove"

    use_mlockall = 0

    monitoring = 1

    polling_interval = 15

}

metadata {

}

dmeventd {

    mirror_library = "libdevmapper-event-lvm2mirror.so"

    snapshot_library = "libdevmapper-event-lvm2snapshot.so"

}

```

Thanks for the help!

G

----------

## richard.scott

the message:

```
mdadm: No arrays found in the config file or automatically
```

is currently a feature and not a problem.

Rich

----------

## grooveman

Hmm... It is giving me two red exclamations at boot.  Which implies there is a problem, when I don't think there is.

My raid is detected just fine earlier in the boot sequence (as it must, as the boot partition is on the raid).

I know you are alluding to something here, but I don't know what.  How do I make those red exclamations go away?  It seems this step in the boot sequence is not necessary.

And, of course, the bigger problem is the shutdown.  I don't understand why I'm getting that mess... I never used to, until I updated...

----------

## richard.scott

see here:

https://bugs.gentoo.org/show_bug.cgi?id=295397

----------

