1

I have a iSCSI disk which I am mounting from several machines (exclusively, not concurrently).

On machine A, I start iscsi service open-iscsi start and the iscsi disk is discovered as /dev/sdb1. Also, the UUID gets added in /dev/disk/by-uuid/

On machine B I start iscsi service open-iscsi start and the iscsi disk is also discovered as /dev/sdb1. However, no UUID is generated (but UUID for other disks works fine)

Why would UUID work on one machine, but not on another?

I am using Debian Wheezy

UPDATE: I have discovered, that when I run partprobe the UUID suddenly appears in /dev/disk/by-uuid/. However, when I stop iscsi and start it again, the UUID is not there. Do I have to run partprobe every time?

UPDATE2: the iscsi disk is 4TB. My suspicion is that this is causing the problem (because it is larger than 2TB)

  • 2
    This is impossible to answer without knowing the operating systems and versions of the machines involved. – terdon Mar 5 '14 at 18:18
  • I am using Debian Wheezy. I have updated my question. Thanks for your comment. – Martin Vegter Mar 6 '14 at 13:48
  • So both machines are using the same version of debian? – terdon Mar 6 '14 at 13:49
  • the iSCSI initiator is running Debian, whereas the iSCSI image is hosted on a QNAP storage system – Martin Vegter Mar 7 '14 at 19:32
2

When you discover your iscsi disk try running this command :

sudo /sbin/blkid

You should get all the UUIDs of your disks.

Output:

/dev/sda1: UUID="ce55950a-2dfe-4dc4-84b9-079d4b36f3e3" TYPE="ext2" 
/dev/sda2: UUID="jmEnPF-vjb6-PrHJ-BQ4s-0jpw-YjO5-47Q7be" TYPE="LVM2_member" 
/dev/sdb1: UUID="Y82rfl-jW79-6MQn-3W5A-Kaw4-i1ma-i986HJ" TYPE="LVM2_member" 
...

What type of OS are you running ?

1

Ensure you're running the same kpartx versions on both hosts. There was a bug in the kpartx.rules file introduced in an update to wheezy. The latest version of kpartx fixed this regression.

It might be necessary to reboot (to reload the udev rules) after upgrading kpartx.

-1

Is udev working properly on your server?

udev is the device mapper in charge of the creation of those symlinks, so it can be that it is not working, or that it is not configured properly.

Is it running? (i.e. /etc/init.d/udev status)

It may be that it is not configured properly, so check if your rules are OK:

$ grep "disk/by-uuid" /lib/udev/rules.d/*
/lib/udev/rules.d/60-persistent-storage-dm.rules:ENV{ID_FS_USAGE}=="filesystem|other|crypto", ENV{ID_FS_UUID_ENC}=="?*", SYMLINK+="disk/by-uuid/$env{ID_FS_UUID_ENC}"
/lib/udev/rules.d/60-persistent-storage.rules:  SYMLINK+="disk/by-uuid/$env{ID_FS_UUID_ENC}"
(...)

Note that the actual rules might be different.

  • 5
    If this is "an actual answer" then you should explain how to establish whether udev is running, what it is and how to enable if it isn't. – X Tian Mar 6 '14 at 14:38
  • 3
    @CharlesStewart I reviewed "Is udev running in your server?" (IIRC in the LQ queue). That answer is inappropriate as an answer, it should have been a comment, and I flagged it so, do you disagree with that? Alvaro had enough rep for commenting. The answer was later expanded, my flag (which automatically inserts the text, I now removed) was declined, but the system never gives a reviewer a message to re-review an answer, nor does it retract the text it inserts. Had Alvaro used @anthon I would have know about the change and his comment – Anthon Mar 7 '14 at 13:42
  • 4
    @Alvaro - You have 200 rep, how are you not able to comment? – slm Mar 7 '14 at 13:46
  • 6
    @CharlesStewart - if you have leads or partial ideas then those are comments, this isn't up for discussion, that's just how it is. If you're unfamiliar with this then please read the help on how to answer questions. – slm Mar 7 '14 at 13:48
  • 3
    @CharlesStewart I am not sure what you disagree with as that link supports my action. The first point at "When should I use this flag" is Use this flag when an answer is being used to Ask a question. The whole answer was the sentence "Is udev running in your server?" and ends with a question mark. And you don't think it is a question, but a partial answer because of what? – Anthon Mar 7 '14 at 16:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.