You are not logged in.

#1 2009-08-03 23:27:50

heimdal
Member
Registered: 2009-06-25
Posts: 27

Are custom /dev names possible? (Example /dev/foo)

Is it possible to have a custom /dev name for a device such as a hard drive or flashdrive? (To the extent of like /dev/foo or something)
I have a external hard drive that is ntfs and is too big to move the data over and change to ext4, or reiserfs, or something. (and my flash drive is a fat32 so it can interface with winblows comuters) the two of them fight over the /dev/sdb1 slot and if I edit fstab as auto type I still have the problem of having ntfs complain in e17 and I have to manually mount it with sudo but if fstab have it set to ntfs then it mounts perfectly. So my question is:

Is there a way to give my drives custom /dev names?

Offline

#2 2009-08-03 23:37:04

arkham
Member
From: Stockholm
Registered: 2008-10-26
Posts: 516
Website

Re: Are custom /dev names possible? (Example /dev/foo)

Have you looked at the /dev/disk/by-uuid/ directory?


"I'm Winston Wolfe. I solve problems."

~ Need moar games? [arch-games] ~ [aurcheck] AUR haz updates? ~

Offline

#3 2009-08-03 23:38:59

hbekel
Member
Registered: 2008-10-04
Posts: 311

Re: Are custom /dev names possible? (Example /dev/foo)

If I understand you correctly your problem is that your two external drives "fight over the /dev/sdb" device node, i.e. either one may get assigned the sdb device node depending which one gets plugged in first.

For consistent device naming/access you can either use your drive's uuid, id or path. Check out the symlinks in the subdirectories created below /dev/disk/.

Alternatively you can use udev to create consistently named symlinks when one of your drives gets plugged in (e.g. create /dev/external and /dev/flash or whatever you like). See http://wiki.archlinux.org/index.php/Udev

Offline

#4 2009-08-03 23:42:33

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: Are custom /dev names possible? (Example /dev/foo)

It's called udev, and Arch installs it by default.


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

#5 2009-08-04 04:52:47

Gen2ly
Member
From: Sevierville, TN
Registered: 2009-03-06
Posts: 1,529
Website

Re: Are custom /dev names possible? (Example /dev/foo)

Yeah you can do it, and i have before but i found it isn't really necessary, take a look at my blog if you like:

Creating Unique Device Nodes


Setting Up a Scripting Environment | Proud donor to wikipedia - link

Offline

Board footer

Powered by FluxBB