udev works ok in CentOS 6.x??

Home » CentOS » udev works ok in CentOS 6.x??
CentOS 12 Comments

Sorry to re-open this thread, but how can I obtain this uuid?? For example. With one disk, uuid is showed:

[root@newc6srv by-uuid]# ls -la /dev/disk/by-uuid/
total 0
drwxr-xr-x 2 root root 80 Mar 28 13:19 .
drwxr-xr-x 4 root root 80 Mar 28 13:19 ..
lrwxrwxrwx 1 root root 10 Mar 28 13:19
0faf5e22-ff30-4ab8-a9ac-733c593eec40 -> ../../sda1
lrwxrwxrwx 1 root root 10 Mar 28 13:19
37501499-c52d-4a84-9ec8-778adf511ebd -> ../../sda2

but when I add two disks, uuid isn’t showed:

root@newc6srv by-uuid]# ls -la /dev/disk/by-uuid/
total 0
drwxr-xr-x 2 root root 80 Mar 28 13:19 .
drwxr-xr-x 4 root root 80 Mar 28 13:19 ..
lrwxrwxrwx 1 root root 10 Mar 28 13:19
0faf5e22-ff30-4ab8-a9ac-733c593eec40 -> ../../sda1
lrwxrwxrwx 1 root root 10 Mar 28 13:19
37501499-c52d-4a84-9ec8-778adf511ebd -> ../../sda2

[root@newc6srv by-uuid]# ls -la /dev/sd*
brw-rw---- 1 root disk 8, 0 Mar 28 13:19 /dev/sda
brw-rw---- 1 root disk 8, 1 Mar 28 13:19 /dev/sda1
brw-rw---- 1 root disk 8, 2 Mar 28 13:19 /dev/sda2
brw-rw---- 1 root disk 8, 16 Mar 28 13:19 /dev/sdb
brw-rw---- 1 root disk 8, 17 Mar 28 13:19 /dev/sdb1
brw-rw---- 1 root disk 8, 32 Mar 28 13:19 /dev/sdc
brw-rw---- 1 root disk 8, 33 Mar 28 13:19 /dev/sdc1

and dmesg:

sd 2:0:0:0: [sda] Assuming drive cache: write through sda:
sd 3:0:0:0: [sdb] 536870912 512-byte logical blocks: (274 GB/256 GiB)
sd 3:0:0:0: [sdb] Write Protect is off
sd 3:0:0:0: [sdb] Mode Sense: 61 00 00 00
sd 3:0:0:0: [sdb] Cache data unavailable
sd 3:0:0:0: [sdb] Assuming drive cache: write through
sd 3:0:0:0: [sdb] Cache data unavailable
sd 3:0:0:0: [sdb] Assuming drive cache: write through sdb: sda1 sda2
sd 2:0:0:0: [sda] Cache data unavailable
sd 2:0:0:0: [sda] Assuming drive cache: write through
sd 2:0:0:0: [sda] Attached SCSI disk
sd 4:0:0:0: [sdc] 536870912 512-byte logical blocks: (274 GB/256 GiB)
sd 4:0:0:0: [sdc] Write Protect is off
sd 4:0:0:0: [sdc] Mode Sense: 61 00 00 00
sd 4:0:0:0: [sdc] Cache data unavailable
sd 4:0:0:0: [sdc] Assuming drive cache: write through
sd 4:0:0:0: [sdc] Cache data unavailable
sd 4:0:0:0: [sdc] Assuming drive cache: write through sdc: sdb1
sd 3:0:0:0: [sdb] Cache data unavailable
sd 3:0:0:0: [sdb] Assuming drive cache: write through
sd 3:0:0:0: [sdb] Attached SCSI disk sdc1
sd 4:0:0:0: [sdc] Cache data unavailable
sd 4:0:0:0: [sdc] Assuming drive cache: write through
sd 4:0:0:0: [sdc] Attached SCSI disk

Then, how can I obtain these uuids??

12 thoughts on - udev works ok in CentOS 6.x??

  • carlopmart wrote on 03/28/2012 09:53 AM:

    What does blkid with no arguments show? How about “fdisk -l /dev/sdb”?
    You previously showed that /dev/sdb was a LVM device.

    Phil

  • Yes, it is correct. See:

    [root@newc6srv rc2.d]# fdisk -l /dev/sdb

    Disk /dev/sdb: 274.9 GB, 274877906944 bytes
    171 heads, 32 sectors/track, 98112 cylinders
    Units = cylinders of 5472 * 512 = 2801664 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk identifier: 0x0006c633

    Device Boot Start End Blocks Id System
    /dev/sdb1 1 98113 268434432 8e Linux LVM
    [root@newc6srv rc2.d]# fdisk -l /dev/sdc

    Disk /dev/sdc: 274.9 GB, 274877906944 bytes
    171 heads, 32 sectors/track, 98112 cylinders
    Units = cylinders of 5472 * 512 = 2801664 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk identifier: 0x00098fde

    Device Boot Start End Blocks Id System
    /dev/sdc1 1 98113 268434432 8e Linux LVM

    blkid without arguments doesn’t shows nothing. And using:

    [root@newc6srv rc2.d]# blkid -c /dev/null /dev/sdb*
    [root@newc6srv rc2.d]#

    nothing neither …

    What has /etc/grub.conf, /boot, stage1 and stage2 to do here? I don’t
    understand what info you are asking …

  • grub.conf only shows uuid for root device. This host has three scsi
    disks: sda, sdb and sdc. sda is where is installed and uuid is showed
    and correct:

    [root@newc6srv lvm]# ls -la /dev/disk/by-uuid/
    total 0
    drwxr-xr-x 2 root root 80 Mar 28 13:19 .
    drwxr-xr-x 4 root root 80 Mar 28 13:19 ..
    lrwxrwxrwx 1 root root 10 Mar 28 13:19
    0faf5e22-ff30-4ab8-a9ac-733c593eec40 -> ../../sda1
    lrwxrwxrwx 1 root root 10 Mar 28 13:19
    37501499-c52d-4a84-9ec8-778adf511ebd -> ../../sda2

    But I have added two disks: sdb and sdc. is with these disks where uuid
    doesn’t works ….

  • ls -l /dev/disk/by-uuid

    lrwxrwxrwx 1 root root 10 Mar 23 00:08 2e55cc65-9c70-4081-9209-070aa4698e18 -> ../../dm-1
    lrwxrwxrwx 1 root root 10 Mar 23 00:08 2f76b8e6-c86b-455d-bf56-d54c7c5bd084 -> ../../sda1
    lrwxrwxrwx 1 root root 10 Mar 23 00:08 36992f08-801c-4a88-a3b8-080ab0cc0988 -> ../../sdb1
    lrwxrwxrwx 1 root root 10 Mar 23 00:08 a712997a-bdbc-4dd6-bdc3-2288d5f8d474 -> ../../dm-0
    lrwxrwxrwx 1 root root 9 Mar 23 00:08 b68b49aa-24d5-455c-ac9d-fc5dd93386fa -> ../../md0

  • That’s what I like to see, but it doesn’t works for me ….
    /dev/disk/by-uuid only has uuid for sda and not for sdb and sdc…

    Do I need to configure something under udev or scsi_id to rescan scsi
    disks at host startup or something similar???

  • Hi,

    I had a similar problem with a new usb disk under centos5: the disk
    (sdb) was not listed under /dev/disk/by-uuid. I had to create the
    symlink there manually:

    [root@xen by-uuid]# udevinfo -q all -n sdb
    P: /block/sdb
    N: sdb
    S: disk/by-id/usb-WD_Ext_HDD_1021_574343305330343332373736

    [root@xen by-uuid]# ln -s ../../sdb1
    usb-WD_Ext_HDD_1021_574343305330343332373736

    After that everything worked fine. I have no idea if what I did was
    somehow wrong and what will happen after next reboot, but the server
    has been running just fine for months after that operation.

LEAVE A COMMENT