Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 262981 - sys-apps/hal-0.5.12_rc1 fails to correctly probe md-raid devices.
Summary: sys-apps/hal-0.5.12_rc1 fails to correctly probe md-raid devices.
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: AMD64 Linux
: High normal with 1 vote (vote)
Assignee: Freedesktop bugs
URL:
Whiteboard:
Keywords:
Depends on: 313389
Blocks:
  Show dependency tree
 
Reported: 2009-03-19 01:23 UTC by Malcolm Lashley
Modified: 2011-09-18 09:28 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Malcolm Lashley 2009-03-19 01:23:07 UTC
Initially I found that digikam thought the volumes (/dev/md0 /dev/md1) containing my photos were offline. I tracked back thru solid, to hal - the latest version of hal is not listing the actual raid devices, only the raid members...

Comparing the output of lshal from 0.5.12 and 0.5.11-r8 shows the problem
duality tmp # grep linux_raid_member lshal* | sort -u
lshal-0.5.11-r8:  info.product = 'Volume (linux_raid_member)'  (string)
lshal-0.5.11-r8:  volume.fstype = 'linux_raid_member'  (string)
lshal-0.5.12_rc1:  info.product = 'Volume (linux_raid_member)'  (string)
lshal-0.5.12_rc1:  volume.fstype = 'linux_raid_member'  (string)

members are present in both.

But device-mapped devices are not emitted in the latest version.

duality tmp # grep md0 lshal-0.5.1*
lshal-0.5.11-r8:  block.device = '/dev/md0'  (string)
lshal-0.5.11-r8:  linux.sysfs_path = '/sys/block/md0'  (string)
lshal-0.5.11-r8:  storage.linux_raid.sysfs_path = '/sys/block/md0'  (string)
lshal-0.5.11-r8:  block.device = '/dev/md0'  (string)
lshal-0.5.11-r8:  linux.sysfs_path = '/sys/block/md0/fakevolume'  (string)

Once I reverted back to 0.5.11-r8 - digikam is happy again.

Reproducible: Always

Steps to Reproduce:
1. emerge hal-0.5.12_rc1
2. lshal, look for dm raid devices (e.g. md0)
3.

Actual Results:  
2. No raid devices seen

Expected Results:  
2. List the raid devices...

 duality tmp # emerge --info                                               
WARNING: One or more repositories have missing repo_name entries:         

        /home/mlashley/overlay/profiles/repo_name

NOTE: Each repo_name entry should be a plain text file containing a
unique name for the repository on the first line.                  
Portage 2.2_rc26 (default/linux/amd64/2008.0, gcc-4.3.3, glibc-2.9_p20081201-r2, 2.6.28-gentoo-r1 x86_64)
=================================================================                                        
System uname: Linux-2.6.28-gentoo-r1-x86_64-AMD_Athlon-tm-_64_X2_Dual_Core_Processor_4400+-with-glibc2.2.5
Timestamp of tree: Wed, 18 Mar 2009 20:30:01 +0000                                                        
distcc 3.1 x86_64-pc-linux-gnu [disabled]                                                                 
ccache version 2.4 [enabled]                                                                              
app-shells/bash:     4.0_p10-r1                                                                           
dev-java/java-config: 1.3.7-r1, 2.1.7                                                                     
dev-lang/python:     2.5.4-r2                                                                             
dev-python/pycrypto: 2.0.1-r7                                                                             
dev-util/ccache:     2.4-r8                                                                               
dev-util/cmake:      2.6.3                                                                                
sys-apps/baselayout: 2.0.0                                                                                
sys-apps/openrc:     0.4.3-r1                                                                             
sys-apps/sandbox:    1.6                                                                                  
sys-devel/autoconf:  2.13, 2.63                                                                           
sys-devel/automake:  1.4_p6, 1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.2                                    
sys-devel/binutils:  2.19.1-r1                                                                            
sys-devel/gcc-config: 1.4.1                                                                               
sys-devel/libtool:   2.2.6a                                                                               
virtual/os-headers:  2.6.28-r1                                                                            
ACCEPT_KEYWORDS="amd64 ~amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=k8 -pipe -g -ggdb"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/kde/4.2/env /usr/kde/4.2/share/config /usr/kde/4.2/shutdown /usr/share/config"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-O2 -march=k8 -pipe -g -ggdb"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache collision-protect cvs distlocks fixpackages multilib-strict nostrip parallel-fetch preserve-libs protect-owned sandbox sfperms splitdebug strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://gentoo.mirrors.easynews.com/linux/gentoo/ http://gentoo.mneisen.org/"
LDFLAGS="-Wl,-O1"
LINGUAS="en_GB"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_EXTRA_OPTS="--stats --progress"
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="/home/mlashley/overlay /usr/local/portage/layman/pro-audio /usr/local/portage/layman/toolchain /usr/local/portage/layman/perl-experimental /usr/local/portage/layman/roslin"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext X a52 aac acl aiglx alsa amd64 amr amrnb amrwb apache2 avi bash-completion berkdb bluetooth browserplugin bzip2 cdr cli cracklib crosscompile crypt cscope cups curl daap dbus dri dts dv dvb dvd dvdr dvdread encode ethereal evo examples exif f77 fam fastcgi ffmpeg firefox flac foomaticdb fortran gdbm gif gimp gimpprint glade glitz glut gphoto2 gpm gtk gtk2 hal iconv ieee1394 imagemagick imap imlib ipod ipv6 isdnlog jack java jikes joystick jpeg jpeg2k kde kdeprefix kqemu lame lesstif libwww live mad mbox midi mikmod mmx mng motif mozilla mp3 mpeg msn mudflap multilib mysql nagios-ntp nagios-ping nagios-ssh ncurses nls nptl nptlonly nsplugin nvidia offensive oggvorbis openexr opengl openmp pam pcre pda pdf pdflib perl pic png pnp pppd python qt quicktime raw rdesktop readline reflection rrdcgi rrdtool samba sdl sensord session smp snmp spell spl sqlite sse sse2 ssl svg symlink sysfs tcltk tcpd theora threads tiff truetype trusted udev uk_bleb uk_rt unicode ups usb userlocales v4l v4l2 visualization webkit wifi x264 xcb xcomposite xine xinerama xml2 xorg xosd xprint xscreensaver xvid yahoo yv12 zeroconf 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 auth_digest authn_anon authn_dbd authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir usertrack vhost_alias" APACHE2_MPMS="prefork" ELIBC="glibc" INPUT_DEVICES="keyboard mouse wacom evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001mtxorb ncurses text" LINGUAS="en_GB" LIRC_DEVICES="kworld devinput" USERLAND="GNU" VIDEO_CARDS="nv nvidia"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS
Comment 1 Tony Vroon (RETIRED) gentoo-dev 2009-03-19 11:30:03 UTC
Could I see your USE-flags (just emerge -pv output will do fine) for both HAL versions please. Could you also include instructions on how to quickly create the problematic volume type on say... an SD-card.
It seems a genuine bug, but I would like to have an easy way of reproducing it.
Comment 2 Malcolm Lashley 2009-03-21 21:02:01 UTC
[ebuild   R   ] sys-apps/hal-0.5.11-r8  USE="X crypt -acpi -apm -debug -dell -disk-partition -doc -laptop (-selinux)" 0 kB

[ebuild     U ] sys-apps/hal-0.5.12_rc1 [0.5.11-r8] USE="X crypt -acpi -apm -debug -dell -disk-partition -doc -laptop (-selinux)" 0 kB

And see - http://www.gentoo.org/doc/en/gentoo-x86+raid+lvm2-quickinstall.xml

Ignore the lvm stuff and follow the example for one of md1 or md3 (/boot or /root) partition. (You'll probably need to create 2 partitions on the sdcard first)
Comment 3 Gilles Dartiguelongue (RETIRED) gentoo-dev 2009-07-28 23:00:00 UTC
If hal-0.5.13 doesn't fix this I think it's high time to report this to upstream
Comment 4 Malcolm Lashley 2009-08-03 22:51:45 UTC
Not fixed in 0.5.13 - but I did find a workaround and some other info - firstly, my raid arrays are autodetected by kernel:

root@duality /usr/src/linux $ zgrep MD_AUTO /proc/config.gz
CONFIG_MD_AUTODETECT=y

If I stop and re-assemble the raid array once hald is running - the devices are properly detected:
duality ~ # lshal | grep md[01]
duality ~ # ls -l /dev/md[01]
brw-rw---- 1 root disk 9, 0 Aug  3 22:05 /dev/md0
brw-rw---- 1 root disk 9, 1 Aug  3 22:05 /dev/md1
duality ~ # mount | grep md[01]
/dev/md0 on /raid type ext3 (rw,noatime,nodiratime,user_xattr)
/dev/md1 on /space type ext3 (rw,noatime,nodiratime,user_xattr)

duality ~ # umount /dev/md1 && mdadm --manage --stop /dev/md1 && mdadm --assemble /dev/md1 && mount /dev/md1
mdadm: stopped /dev/md1
mdadm: /dev/md1 has been started with 2 drives.

duality ~ # lshal | grep md[01]
  block.device = '/dev/md1'  (string)
  linux.sysfs_path = '/sys/devices/virtual/block/md1'  (string)
  storage.linux_raid.sysfs_path = '/sys/devices/virtual/block/md1'  (string)
  block.device = '/dev/md1'  (string)
  linux.sysfs_path = '/sys/devices/virtual/block/md1/fakevolume'  (string)

ditto for md0.




Comment 5 Igor Krivenko 2009-08-20 11:38:03 UTC
The same issue here.
I have analyzed the debug output of hald (sys-apps/hal-0.5.13-r2) and have understood that the problem originates from the order in which hald processes hotplug events for block devices. It tries to add a md-device to its database first before the corresponding physical partitions, but at the same time supposes that the partitions are already there. Being unable to find the partitions by  linux.sysfs_path it rejects to add the md-device at all.

> If I stop and re-assemble the raid array once hald is running - the devices are properly detected:

Unfortunately, this workaround may be undesirable or just impossible (for root filesystem). Actually, all you need to do is to make hald process events from md-devices one more time.
It may be done, for example, by running "udevadm trigger --subsystem-match=block" from /etc/conf.d/local.start
Comment 6 Samuli Suominen (RETIRED) gentoo-dev 2011-09-18 09:28:40 UTC
sys-apps/hal was removed from tree wrt #313389, closing as OBSOLETE