Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
USB HDD wechselt die Laufwerkskennung...
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German)
View previous topic :: View next topic  
Author Message
kernelverbieger
n00b
n00b


Joined: 29 May 2005
Posts: 69
Location: Langenberg (Rhld.)

PostPosted: Wed Feb 22, 2006 10:38 am    Post subject: USB HDD wechselt die Laufwerkskennung... Reply with quote

Hi ho!

Ich hab ein kleines Problem mit meiner 250GB USB 2.0 Festplatte.
Und zwar wechselt die Laufwerkskennug bei der Platte, ein paar Tage lang hieß sie /dev/sdd und die Partition folglich /dev/sdd1.
Zwischenzeitlich hörte die Platte auch mal auf den Namen /dev/sdg bzw. /dev/sdg1.
Nach jedem 2. - 3. booten kann ich die Platte immerwieder suchen.:(
Nur die beiden internen SATA Platten haben immer /dev/sda und /dev/sdb.
Wobei /dev/sda physikalisch an Port 1 und /dev/sdb an Port 0 angeschlossen ist... :?

Gibt es eine Möglichkeit die externe Festplatte z.B. über eine Gerätekennung zu mounten?

Der Mountpunkt soll /mnt/wd250 sein.
Formatiert ist die Platte mit NTFS.

Es ist irgendwie nervig jedes mal die fstab anzupassen...

Hat jemand eine Idee?
Back to top
View user's profile Send private message
schmutzfinger
Veteran
Veteran


Joined: 26 Oct 2003
Posts: 1287
Location: Dresden/Germany

PostPosted: Wed Feb 22, 2006 10:45 am    Post subject: Reply with quote

Die Lösung für dein Problem heisst udev. Da kannst du Anhand der Kennung des Gerätes einen Gerätenamen festlegen. Sowas wie /dev/meineplatte.
Dieses Howto beschreibt alles von der Installation bis zur Erstellung der Regeln.
Code:

http://de.gentoo-wiki.com/Udev
Back to top
View user's profile Send private message
deejay
l33t
l33t


Joined: 24 Aug 2004
Posts: 983
Location: Hannover, Germany

PostPosted: Wed Feb 22, 2006 10:46 am    Post subject: Reply with quote

Benutzt du udev?
Kannst dir doch dann ne Udevregel schreiben, damit klappt es auf jedenfall.
_________________
Back to top
View user's profile Send private message
NightDragon
Veteran
Veteran


Joined: 21 Aug 2004
Posts: 1156
Location: Vienna (Austria)

PostPosted: Thu Feb 23, 2006 6:14 am    Post subject: Reply with quote

Kann man mit Udev eigentlich fixe namen anstelle von Symlinks anlegen?
Sprich anstelle von /dev/hdc gleich /dev/cdrom? Ich weiß zwar wie man einen devicelink automatisch anlegen lässt. aber gerade bei CD-brenner bzw. dvdbrenner ist es angenehmer wenn die Geräte einen sinnvolleren namen haben.
_________________
You are the problem too all my solutions ;)
Back to top
View user's profile Send private message
deejay
l33t
l33t


Joined: 24 Aug 2004
Posts: 983
Location: Hannover, Germany

PostPosted: Thu Feb 23, 2006 6:22 am    Post subject: Reply with quote

Das dürfte so funktionieren. Bei mir ist es so, dass wenn ich meinen USB Stick einstecke, immer das Device
/dev/usbstick erzeugt wird. Bei meiner USB-Platte wird immer ein /dev/usbplatte erzeugt.
Jedes Gerät hat eine Spezielle ModelID, bin mir jetzt nicht genau sicher, obs wirklich so heisst.
Diese ID kommt mit in die Udevregel und anhand derer wird dann das entsprechende Device erstellt.
Ne andere Variante kenne ich nicht, was es mit diesen Symlinks auf sich hat, wüsste ich jetzt auch nicht.

Gruß
deejay
_________________
Back to top
View user's profile Send private message
Roller
Tux's lil' helper
Tux's lil' helper


Joined: 22 Jan 2005
Posts: 114
Location: Esslingen/Germany

PostPosted: Thu Feb 23, 2006 8:18 am    Post subject: Reply with quote

NightDragon wrote:
Kann man mit Udev eigentlich fixe namen anstelle von Symlinks anlegen?
Sprich anstelle von /dev/hdc gleich /dev/cdrom? Ich weiß zwar wie man einen devicelink automatisch anlegen lässt. aber gerade bei CD-brenner bzw. dvdbrenner ist es angenehmer wenn die Geräte einen sinnvolleren namen haben.


Wenn du das so angibst:
Code:

BUS="scsi", SYSFS{model}="              MS", KERNEL="sd?1", NAME="MS"

dann wird statt einem Symlink der Name erstellt. D.h., du hast kein sd?1 mehr, sondern das Gerät, in meinem Fall die Partition, heißt MS.
Bei einem Floppy, CD-Rom o. ä. lässt du einefach die Partitionsnummer weg.
Back to top
View user's profile Send private message
deejay
l33t
l33t


Joined: 24 Aug 2004
Posts: 983
Location: Hannover, Germany

PostPosted: Thu Feb 23, 2006 8:26 am    Post subject: Reply with quote

Jo, so meinte ich das. Ich kann ja später mal meine Udevregeln posten.
Da gibt es auch noch irgendeinen Befehl, womit du die SYSFS{model} Bezeichnung
herausfinden kannst. Komme nur grad nicht drauf. Ist glaube irgendwas mit udevinfo oder
so ähnlich.
_________________
Back to top
View user's profile Send private message
musv
Advocate
Advocate


Joined: 01 Dec 2002
Posts: 3369
Location: de

PostPosted: Thu Feb 23, 2006 6:37 pm    Post subject: Reply with quote

Roller wrote:
Wenn du das so angibst:
Code:

BUS="scsi", SYSFS{model}="              MS", KERNEL="sd?1", NAME="MS"



dann hast du was Grundlegendes nicht verstanden.

= : Zuweisung
== : Test auf Gleichheit

D.h. obige Regel sollte dann so lauten:
Code:

BUS=="scsi", SYSFS{model}=="              MS", KERNEL=="sd?1", NAME="MS"

Ich geh jetzt davon aus, daß du nur "NAME" wirklich zuweisen willst, und anhand der restlichen Parameter das Gerät eindeutig identifizieren willst. Im Wiki steht das meines Wissens nach auch noch falsch drin.
Back to top
View user's profile Send private message
Roller
Tux's lil' helper
Tux's lil' helper


Joined: 22 Jan 2005
Posts: 114
Location: Esslingen/Germany

PostPosted: Thu Feb 23, 2006 6:48 pm    Post subject: Reply with quote

@ musv: Ich habe die Regel nach dem WIKI geschrieben, und sie funktioniert, warum auch immer. Ich probier das jetzt aber mal aus.

Edit: funktioniert beides.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum