mdev problems

Christian Dumhart christian.dumhart at gmx.at
Wed Feb 4 09:54:26 UTC 2009


Hi,

I make the first tests with mdev and have problems with it.

####################
follow mdev.conf:
sd[a-z].[1-9]* root:disk 660 */usr/sbin/mnt $MDEV
####################

####################
follow mnt script:
#!/bin/sh

echo "HIER in mnt.sh"
usb_name="usb_storage_$1"


MNT_DIR="/mnt/$usb_name"

#debug
#echo "action: $ACTION / mdev: $MDEV / devpath: $DEVPATH / subsystem: $SUBSYSTEM / mntdir: $MNT_DIR" >> /tmp/hotplug.log

# check mount / unmount
if [ "$ACTION" = "remove" ]; then
   # unmount
   /bin/umount -lf /dev/$1
   /bin/rmdir "/mnt/$usb_name"
else
   # mount
        if [ ! -d "/mnt/$usb_name" ]; then
      /bin/mkdir "/mnt/$usb_name"
        fi
        /bin/mount /dev/$1 "/mnt/$usb_name"
fi
####################

now the system (hotplug?) or mdev is call the script twice!?
####################
/ # mdev -s
HIER in mnt.sh
mount: mounting /dev/sdb1 on /mnt/usb_storage_sdb1 failed: Device or resource busy
HIER in mnt.sh
mount: mounting /dev/sdb1 on /mnt/usb_storage_sdb1 failed: Device or resource busy
/ #
####################

The error that the device is bussy is ok because mdev is called before I've type manuale the mdev -s command.

Have anybode a tipp what it can be?

I've seen that maybe the /dev/sdxn is created twice, could it be???
####################
follow printout (I've attachted a USB-storage device and typed mdev -s while the message from the new found device is printed on the screen)

 [42950258.610000] usb 1-1: new high speed USB device using zoran-ehci and address 3
[42950258.760000] usb 1-1: configuration #1 chosen from 1 choice
[42950258.770000] scsi1 : SCSI emulation for USB Mass Storage devices
[42950258.780000] usb 1-1: New USB device found, idVendor=090c, idProduct=1000
[42950258.790000] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[42950258.800000] usb 1-1: Product: Flash Voyager
[42950258.800000] usb 1-1: Manufacturer: Corsair
[42950258.810000] usb 1-1: SerialNumber: A700000000025676

/ # mdev -s
[42950263.810000] scsi 1:0:0:0: Direct-Access     Corsair  Flash Voyager    1100 PQ: 0 ANSI: 0 CCS
[42950263.820000] sd 1:0:0:0: [sdb] 7864320 512-byte hardware sectors (4027 MB)
[42950263.830000] sd 1:0:0:0: [sdb] Write Protect is off
[42950263.840000] sd 1:0:0:0: [sdb] Assuming drive cache: write through
[42950263.850000] sd 1:0:0:0: [sdb] 7864320 512-byte hardware sectors (4027 MB)
[42950263.860000] sd 1:0:0:0: [sdb] Write Protect is off
[42950263.860000] sd 1:0:0:0: [sdb] Assuming drive cache: write through
[42950263.870000]  sdb: sdb1
[42950263.920000] sd 1:0:0:0: [sdb] Attached SCSI removable disk
[42950263.920000] sd 1:0:0:0: Attached scsi generic sg0 type 0
HIER in mnt.sh
/ #

####################

In this case mnt.sh is only called once! Very strange for me.

Thanks for your efforts,

Cheers
Christian
-- 
Psssst! Schon vom neuen GMX MultiMessenger gehört? Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger01


More information about the busybox mailing list