Hi all,
I have strange problem with my persistent names applied to iscsi disks. I have configured an udev rule to assign static iscsi disk names:
KERNEL=="sd[a-z]", SUBSYSTEM=="block", PROGRAM="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name", RESULT=="1iTGTDSK9a2c73ce654d0ca6", NAME="iscsi/sda" KERNEL=="sd[a-z][0-9]*", SUBSYSTEM=="block", PROGRAM="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name", RESULT=="1iTGTDSK9a2c73ce654d0ca6", NAME="iscsi/sda%n"
When udev starts, it seems it works:
[root@cossrv01 rules.d]# ls -la /dev/iscsi/sda brw-rw---- 1 root disk 8, 16 Mar 12 11:42 /dev/iscsi/sda
After this, I try to create a lvm volume:
[root@cossrv01 rules.d]# pvcreate /dev/iscsi/sda
... and works. But:
[root@cossrv01 rules.d]# pvdisplay --- Physical volume --- PV Name /dev/sdb VG Name cmdata PV Size 64.00 GiB / not usable 4.00 MiB Allocatable yes PE Size 4.00 MiB Total PE 16382 Free PE 12542 Allocated PE 3840 PV UUID rSuu5T-VtRl-ffDd-5Vtm-CBhS-UffO-sFgCRX
Why? Why pvdisplay doesn't shows /dev/iscsi/sda instead of /dev/sdb?? It is a big problem when multiple iscsi disks are assigned in aleatory form ... and with CentOS 5.x this procedure works out of the box ... (with RHEL6.x doesn't works neither, but it works with RHEL5.x).
Thanks.
On Tue, Mar 13, 2012 at 8:30 AM, C. L. Martinez carlopmart@gmail.com wrote:
Hi all,
I have strange problem with my persistent names applied to iscsi disks. I have configured an udev rule to assign static iscsi disk names:
KERNEL=="sd[a-z]", SUBSYSTEM=="block", PROGRAM="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name", RESULT=="1iTGTDSK9a2c73ce654d0ca6", NAME="iscsi/sda" KERNEL=="sd[a-z][0-9]*", SUBSYSTEM=="block", PROGRAM="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name", RESULT=="1iTGTDSK9a2c73ce654d0ca6", NAME="iscsi/sda%n"
When udev starts, it seems it works:
[root@cossrv01 rules.d]# ls -la /dev/iscsi/sda brw-rw---- 1 root disk 8, 16 Mar 12 11:42 /dev/iscsi/sda
After this, I try to create a lvm volume:
[root@cossrv01 rules.d]# pvcreate /dev/iscsi/sda
... and works. But:
[root@cossrv01 rules.d]# pvdisplay --- Physical volume --- PV Name /dev/sdb VG Name cmdata PV Size 64.00 GiB / not usable 4.00 MiB Allocatable yes PE Size 4.00 MiB Total PE 16382 Free PE 12542 Allocated PE 3840 PV UUID rSuu5T-VtRl-ffDd-5Vtm-CBhS-UffO-sFgCRX
Why? Why pvdisplay doesn't shows /dev/iscsi/sda instead of /dev/sdb?? It is a big problem when multiple iscsi disks are assigned in aleatory form ... and with CentOS 5.x this procedure works out of the box ... (with RHEL6.x doesn't works neither, but it works with RHEL5.x).
Thanks.
Please, any help?
On 03/13/2012 07:01 PM, John R Pierce wrote:
On 03/13/12 8:19 AM, C. L. Martinez wrote:
Please, any help?
avoid using ANY device names for SCSI class devices, they are near useless. mount the volumes via label or uUID.
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??
carlopmart wrote on 03/28/2012 09:53 AM:
On 03/28/2012 03:51 PM, Phil Schaffner wrote:
carlopmart wrote on 03/28/2012 09:27 AM:
Then, how can I obtain these uuids??
blkid
Phil
Doesn't works neither:
[root@newc6srv init.d]# blkid /dev/sdb1 [root@newc6srv init.d]
What does blkid with no arguments show? How about "fdisk -l /dev/sdb"? You previously showed that /dev/sdb was a LVM device.
Phil
On 3/28/2012 10:07 AM, Phil Schaffner wrote:
carlopmart wrote on 03/28/2012 09:53 AM:
On 03/28/2012 03:51 PM, Phil Schaffner wrote:
carlopmart wrote on 03/28/2012 09:27 AM:
Then, how can I obtain these uuids??
blkid
Phil
Doesn't works neither:
[root@newc6srv init.d]# blkid /dev/sdb1 [root@newc6srv init.d]
What does blkid with no arguments show? How about "fdisk -l /dev/sdb"? You previously showed that /dev/sdb was a LVM device.
Phil
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
/etc/grub.conf? /boot/? lost of info there with uuid stage1, stage2?
On 03/28/2012 04:15 PM, Bob Hoffman wrote:
On 3/28/2012 10:07 AM, Phil Schaffner wrote:
carlopmart wrote on 03/28/2012 09:53 AM:
On 03/28/2012 03:51 PM, Phil Schaffner wrote:
carlopmart wrote on 03/28/2012 09:27 AM:
Then, how can I obtain these uuids??
blkid
Phil
Doesn't works neither:
[root@newc6srv init.d]# blkid /dev/sdb1 [root@newc6srv init.d]
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 ...
/etc/grub.conf? /boot/? lost of info there with uuid stage1, stage2?
What has /etc/grub.conf, /boot, stage1 and stage2 to do here? I don't understand what info you are asking ...
On 03/28/2012 05:16 PM, Bob Hoffman wrote:
On 3/28/2012 11:10 AM, carlopmart wrote:
/etc/grub.conf? /boot/? lost of info there with uuid stage1, stage2?
What has /etc/grub.conf, /boot, stage1 and stage2 to do here? I don't understand what info you are asking ...
look in the grub.conf file, lists uuids of block devices
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 ....
On 3/28/2012 11:19 AM, carlopmart wrote:
On 03/28/2012 05:16 PM, Bob Hoffman wrote:
On 3/28/2012 11:10 AM, carlopmart wrote:
/etc/grub.conf? /boot/? lost of info there with uuid stage1, stage2?
What has /etc/grub.conf, /boot, stage1 and stage2 to do here? I don't understand what info you are asking ...
look in the grub.conf file, lists uuids of block devices
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
On 03/28/2012 05:22 PM, Bob Hoffman wrote:
On 3/28/2012 11:19 AM, carlopmart wrote:
On 03/28/2012 05:16 PM, Bob Hoffman wrote:
On 3/28/2012 11:10 AM, carlopmart wrote:
/etc/grub.conf? /boot/? lost of info there with uuid stage1, stage2?
What has /etc/grub.conf, /boot, stage1 and stage2 to do here? I don't understand what info you are asking ...
look in the grub.conf file, lists uuids of block devices
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,
On Wed, Mar 28, 2012 at 6:26 PM, carlopmart carlopmart@gmail.com wrote:
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???
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.
Regards, Peter
as root run blkid -dennis
On 03/28/2012 08:10 AM, carlopmart wrote:
On 03/28/2012 04:15 PM, Bob Hoffman wrote:
On 3/28/2012 10:07 AM, Phil Schaffner wrote:
carlopmart wrote on 03/28/2012 09:53 AM:
On 03/28/2012 03:51 PM, Phil Schaffner wrote:
carlopmart wrote on 03/28/2012 09:27 AM:
Then, how can I obtain these uuids??
blkid
Phil
Doesn't works neither:
[root@newc6srv init.d]# blkid /dev/sdb1 [root@newc6srv init.d]
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 ...
/etc/grub.conf? /boot/? lost of info there with uuid stage1, stage2?
What has /etc/grub.conf, /boot, stage1 and stage2 to do here? I don't understand what info you are asking ...