[PlanetCCRMA] Lacie Firewire drive on Planet CCRMA
Andres Cabrera
acabrera at teleset.com.co
Mon Oct 18 14:02:01 PDT 2004
Fernando,
the script did the trick! I have my firewire drive now!!
Thanks very much!
How can I make the script be called at startup or when the drive is plugged?
Andres
Fernando Pablo Lopez-Lezcano wrote:
> On Mon, 2004-10-18 at 09:46, Andres Cabrera wrote:
>
>>Thanks Fernando,
>>I'm actually trying to use my Lacie firewire hard drive, the internal
>>cdrom is working fine.
>>Sorry for not being clear...
>
>
> I don't know why I though it was a cdrom. Too early, no coffee, sloppy
> reading :-)
>
>
>>Fernando Pablo Lopez-Lezcano wrote:
>>
>>>On Mon, 2004-10-18 at 08:00, Andres Cabrera wrote:
>>>
>>>
>>>>Hi all,
>>>>I've been unable to use my Lacie firewire drive in FC1 Planet CCRMA. The
>>>>drive works under knoppix kernel 2.4, so it should also work on the
>>>>planet. Here's what I've found different:
>>>>On knoppix, there's no /proc/bus/ieee1394 directory.
>>>>On FC1 that directory contains the file "devices" which says:
>>>>Node[1-00:1023] GUID[00d04b380e097569]:
>>>> Vendor ID: `LaCie Group SA ' [0x00d04b]
>>>> Capabilities: 0x0083c0
>>>> Bus Options:
>>>> IRMC(0) CMC(0) ISC(0) BMC(0) PMC(0) GEN(0)
>>>> LSPD(0) MAX_REC(64) CYC_CLK_ACC(255)
>>>> Unit Directory 0:
>>>> Vendor/Model ID: LaCie Group SA [00d04b] / LaCie 1394 Disk drive
>>>>LUN 0 [000000]
>>>> Software Specifier ID: 00609e
>>>> Software Version: 010483
>>>> Driver: SBP2 Driver
>>>> Length (in quads): 8
>>>>
>>>>The file /proc/scsi/scsi on knoppix includes(apart from the cdrom):
>>>>Host: scsi1 Channel: 00 Id: 00 Lun: 00
>>>> Vendor: WDC WD16 Model: 00BB-00DAA3 Rev: 75.1
>>>> Type: Direct-Access ANSI SCSI revision: 06
>>>>On FC1 it only includes the cdrom, when the fw drive should be there as
>>>>well.
>>>>
>>>>Also on FC1 there is a directory (which is not there on knoppix) called
>>>>/proc/scsi/sbp2_1 which contains the file "1" which contains:
>>>>
>>>>Host scsi1 : SBP-2 IEEE-1394 (ohci1394)
>>>>
>>>>Module options :
>>>> max_speed : S800
>>>> max_sectors : 255
>>>> serialize_io : no
>>>> exclusive_login : yes
>>>>
>>>>Attached devices : none
>>>>
>>>>I've already added the following to fstab:
>>>>/dev/sda2 /mnt/fw1 ntfs noauto,users,exec,ro,umask=000,uid=root 0 0
>>>>/dev/sda3 /mnt/fw2 vfat noauto,users,exec,umask=000,uid=root 0 0
>>>>/dev/sda5 /mnt/fw3 ntfs noauto,users,exec,ro,umask=000,uid=root 0 0
>>>>Which were generated by knoppix, and work there.
>>>>Then trying:
>>>>mount /dev/sda2
>>>>gives:
>>>>mount: /dev/sda is not a valid block device
>
>
> Hmmm, it looks like it is being recognized at the low driver level. What
> happens if you run the rescan-scsi-bus.sh script? (or try rebooting with
> the disk attached). I'm attaching the script to this email....
>
> -- Fernando
>
>
>
> ------------------------------------------------------------------------
>
> #!/bin/bash
> # Skript to rescan SCSI bus, using the
> # scsi add-single-device mechanism
> # (w) 98/03/19 Kurt Garloff <kurt at garloff.de> (c) GNU GPL
>
> # Return hosts. /proc/scsi/HOSTADAPTER/? must exist
> findhosts ()
> {
> hosts=
> for name in /proc/scsi/*/?; do
> name=${name#/proc/scsi/}
> if test ! $name = scsi
> then hosts="$hosts ${name#*/}"
> echo "Host adapter ${name#*/} (${name%/*}) found."
> fi
> done
> }
>
> # Test if SCSI device $host $channen $id $lun exists
> # Outputs description from /proc/scsi/scsi, returns new
> testexist ()
> {
> grepstr="scsi$host Channel: 0$channel Id: 0*$id Lun: 0$lun"
> new=`cat /proc/scsi/scsi|grep -e"$grepstr"`
> if test ! -z "$new"
> then cat /proc/scsi/scsi|grep -e"$grepstr"
> cat /proc/scsi/scsi|grep -A2 -e"$grepstr"|tail -2|pr -o4 -l1
> fi
> }
>
> # Perform search (scan $host)
> dosearch ()
> {
> for channel in $channelsearch; do
> for id in $idsearch; do
> for lun in $lunsearch; do
> new=
> devnr="$host $channel $id $lun"
> echo "Scanning for device $devnr ..."
> printf "OLD: "
> testexist
> if test ! -z "$remove" -a ! -z "$new"
> then echo "scsi remove-single-device $devnr" >/proc/scsi/scsi
> echo "scsi add-single-device $devnr" >/proc/scsi/scsi
> printf "\r\x1b[A\x1b[A\x1b[AOLD: "
> testexist
> if test -z "$new"; then printf "\rDEL: \r\n\n\n\n"; let rmvd+=1; fi
> fi
> if test -z "$new"
> then printf "\rNEW: "
> echo "scsi add-single-device $devnr" >/proc/scsi/scsi
> testexist
> if test -z "$new"; then printf "\r\x1b[A"; else let found+=1; fi
> fi
> done
> done
> done
> }
>
>
> # main
> if test @$1 = @--help -o @$1 = @-h
> then
> echo "Usage: rescan-scsi-bus.sh [-l] [-w] [-c] [host [host ...]]"
> echo " -l activates scanning for LUNs 0 .. 7 [default: 0]"
> echo " -w enables scanning for device IDs 0 .. 15 [def.: 0 .. 7]"
> echo " -r enables removing of devices [default: disabled]"
> echo " -c enables scanning of channels 0 1 [default: 0]"
> echo " If hosts are given, only these are scanned [default: all]"
> exit 0
> fi
>
> # defaults
> lunsearch="0"
> idsearch="0 1 2 3 4 5 6 7"
> channelsearch="0"
> remove=""
>
> # Scan options
> opt="$1"
> while test ! -z "$opt" -a -z "${opt##-*}"; do
> opt=${opt#-}
> case "$opt" in
> l) lunsearch="0 1 2 3 4 5 6 7" ;;
> w) idsearch="0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15" ;;
> c) channelsearch="0 1" ;;
> r) remove=1 ;;
> *) echo "Unknown option -$opt !" ;;
> esac
> shift
> opt="$1"
> done
>
> # Hosts given ?
> if test @$1 = @; then findhosts; else hosts=$*; fi
>
> declare -i found=0
> declare -i rmvd=0
> for host in $hosts; do dosearch; done
> echo "$found new device(s) found. "
> echo "$rmvd device(s) removed. "
More information about the PlanetCCRMA
mailing list