You are not logged in.

#1 2008-03-15 11:18:40

MAC!EK
Member
Registered: 2005-09-27
Posts: 267

Persistend device in disk/by-path disk/by-uuid but no in disk/by-id

I have a cell phone with embedded memory and a memory slot with Memory Stick Micro (M2).
Embedded memory is 'connected' as sdb and MemoryStick as sdc.
Both of them appear in /dev/disk/by-path/ and in /dev/disk/by-uuid/.
But not in /dev/disk/by-id/ which would be most suitable for me.

$ ls -l /dev/disk/by-path/
razem 0                         
lrwxrwxrwx 1 root root  9 mar 15 11:48 pci-0000:00:1a.1-usb-0:1:2.0-scsi-0:0:0:0 -> ../../sdb
lrwxrwxrwx 1 root root 10 mar 15 11:48 pci-0000:00:1a.1-usb-0:1:2.0-scsi-0:0:0:0-part1 -> ../../sdb1
lrwxrwxrwx 1 root root  9 mar 15 11:48 pci-0000:00:1a.1-usb-0:1:2.1-scsi-0:0:0:0 -> ../../sdc
lrwxrwxrwx 1 root root 10 mar 15 11:48 pci-0000:00:1a.1-usb-0:1:2.1-scsi-0:0:0:0-part1 -> ../../sdc1
lrwxrwxrwx 1 root root  9 mar 15 11:06 pci-0000:00:1f.1-scsi-0:0:0:0 -> ../../sr0
lrwxrwxrwx 1 root root  9 mar 15 11:06 pci-0000:00:1f.2-scsi-0:0:0:0 -> ../../sda
lrwxrwxrwx 1 root root 10 mar 15 11:06 pci-0000:00:1f.2-scsi-0:0:0:0-part1 -> ../../sda1
lrwxrwxrwx 1 root root 10 mar 15 11:06 pci-0000:00:1f.2-scsi-0:0:0:0-part2 -> ../../sda2
lrwxrwxrwx 1 root root 10 mar 15 11:06 pci-0000:00:1f.2-scsi-0:0:0:0-part3 -> ../../sda3
lrwxrwxrwx 1 root root 10 mar 15 11:06 pci-0000:00:1f.2-scsi-0:0:0:0-part5 -> ../../sda5
$ ls -l /dev/disk/by-uuid/
razem 0
lrwxrwxrwx 1 root root 10 mar 15 11:06 23d20d55-e010-4680-b053-a66dad672300 -> ../../sda5
lrwxrwxrwx 1 root root 10 mar 15 11:06 26e3884c-f201-48e7-9ea1-fd65850bb5f0 -> ../../sda2
lrwxrwxrwx 1 root root 10 mar 15 11:48 47DB-B750 -> ../../sdc1
lrwxrwxrwx 1 root root 10 mar 15 11:48 47DB-B75E -> ../../sdb1
lrwxrwxrwx 1 root root 10 mar 15 11:06 be4c9325-fbd8-4fc3-813f-e02e351e57c6 -> ../../sda1
$ ls -l /dev/disk/by-id/
razem 0
lrwxrwxrwx 1 root root  9 mar 15 11:06 ata-ST9120822AS_5MA6SN5A -> ../../sda
lrwxrwxrwx 1 root root 10 mar 15 11:06 ata-ST9120822AS_5MA6SN5A-part1 -> ../../sda1
lrwxrwxrwx 1 root root 10 mar 15 11:06 ata-ST9120822AS_5MA6SN5A-part2 -> ../../sda2
lrwxrwxrwx 1 root root 10 mar 15 11:06 ata-ST9120822AS_5MA6SN5A-part3 -> ../../sda3
lrwxrwxrwx 1 root root 10 mar 15 11:06 ata-ST9120822AS_5MA6SN5A-part5 -> ../../sda5
lrwxrwxrwx 1 root root  9 mar 15 11:06 scsi-SATA_ST9120822AS_5MA6SN5A -> ../../sda
lrwxrwxrwx 1 root root 10 mar 15 11:06 scsi-SATA_ST9120822AS_5MA6SN5A-part1 -> ../../sda1
lrwxrwxrwx 1 root root 10 mar 15 11:06 scsi-SATA_ST9120822AS_5MA6SN5A-part2 -> ../../sda2
lrwxrwxrwx 1 root root 10 mar 15 11:06 scsi-SATA_ST9120822AS_5MA6SN5A-part3 -> ../../sda3
lrwxrwxrwx 1 root root 10 mar 15 11:06 scsi-SATA_ST9120822AS_5MA6SN5A-part5 -> ../../sda5
lrwxrwxrwx 1 root root  9 mar 15 11:48 usb-Sony_Eri_Memory_Stick_3590870185708570-0:0 -> ../../sdb
lrwxrwxrwx 1 root root 10 mar 15 11:48 usb-Sony_Eri_Memory_Stick_3590870185708570-0:0-part1 -> ../../sdb1

EDIT:
when I replug the device the disk/by-uuid directory looks like this:

$ ls -l /dev/disk/by-uuid/
razem 0
lrwxrwxrwx 1 root root 10 mar 15 11:06 23d20d55-e010-4680-b053-a66dad672300 -> ../../sda5
lrwxrwxrwx 1 root root 10 mar 15 11:06 26e3884c-f201-48e7-9ea1-fd65850bb5f0 -> ../../sda2
lrwxrwxrwx 1 root root 10 mar 15 12:22 47DB-BF3C -> ../../sdc1
lrwxrwxrwx 1 root root 10 mar 15 12:22 47DB-BF64 -> ../../sdb1
lrwxrwxrwx 1 root root 10 mar 15 11:06 be4c9325-fbd8-4fc3-813f-e02e351e57c6 -> ../../sda1

Both sdb1 and sdc1 changed it's name neutral

Last edited by MAC!EK (2008-03-15 11:26:46)

Offline

#2 2008-03-15 21:45:13

kumico
Member
Registered: 2007-09-28
Posts: 224
Website

Re: Persistend device in disk/by-path disk/by-uuid but no in disk/by-id

you have to set a filesystem id on the device's filesystem

Offline

#3 2008-03-15 21:57:25

MAC!EK
Member
Registered: 2005-09-27
Posts: 267

Re: Persistend device in disk/by-path disk/by-uuid but no in disk/by-id

I don't understand. Can you describe it? Or write exactly what and how to do it?

Offline

#4 2008-03-15 22:01:19

kumico
Member
Registered: 2007-09-28
Posts: 224
Website

Re: Persistend device in disk/by-path disk/by-uuid but no in disk/by-id

Offline

#5 2008-03-15 22:09:21

MAC!EK
Member
Registered: 2005-09-27
Posts: 267

Re: Persistend device in disk/by-path disk/by-uuid but no in disk/by-id

But what for do I need a Labeled partition?
I don't even have any files in by-label directory:

$ LANG="" ls -lF /dev/disk/by-label
ls: cannot access /dev/disk/by-label: No such file or directory

Offline

#6 2008-03-15 22:20:30

kumico
Member
Registered: 2007-09-28
Posts: 224
Website

Re: Persistend device in disk/by-path disk/by-uuid but no in disk/by-id

when you insert a device, it gets a device name,. i.e sd[a,b,...][1,2,...];
this is an automatic name dependent on the order of insertion/detection.
a fs / disk label, is embeded into the partiton's filesystem, so when you insert the device, it can be detected and the device is avaialble
by that name under  /dev/disk/by-label

e.g

e2label /dev/sda13 ZeroSpace

would result in /dev/disk/by-label/ZeroSpace when the device is inserted.
so you can mount it by that name every time, instead of having to figure out where the device
-node(sda13) actually is

Offline

#7 2008-03-15 22:42:27

MAC!EK
Member
Registered: 2005-09-27
Posts: 267

Re: Persistend device in disk/by-path disk/by-uuid but no in disk/by-id

OK thx for advice smile
I'll set all my /dev/* to be mounted by LABEL= instead of by-id

I thouht that by-uuid/ should not change after repluging the device, but mayby it's something with my phone.

Offline

Board footer

Powered by FluxBB