Skip to contentSkip to conversation

Question about dmevents

DISCUSSION Wood, Brian J 3 participants 7 messages Jul 20, 2007 – Jul 24, 2007 1 message not in the archive Device mapper

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

Hi Alasdair, I also read in the definition of DM_DEV_CREATE that the uuid is optional. Since that is the case shouldn't the failure for not having a uuid in "_alloc_thread_status()" be taken out?

Thank you,

Brian Wood
Intel Corporation
Digital Enterprise Group
Manageability & Platform Software Division
[email protected]

Quoted 2 lines

-----Original Message-----
From: [email protected] [mailto:[email protected]]

On

Quoted 17 lines

Behalf Of Alasdair G Kergon
Sent: Friday, July 20, 2007 9:26 AM
To: device-mapper development
Subject: Re: [dm-devel] Question about dmevents

See http://people.redhat.com/agk/talks/FOSDEM_2005/text41.html for info about
how devices are referenced.

Alasdair
--
[email protected]

--
dm-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/dm-devel

#2 lore raw
Quoted 3 lines · Brian J

Hi Alasdair, I also read in the definition of DM_DEV_CREATE that the uuid is optional. Since that is the case shouldn't the failure for not having a uuid in "_alloc_thread_status()" be taken out?

I don't know this code, but in general userspace code should use uuid if it is present. If it isn't, it should fall back to using the name. Whether that leads to sensible behaviour in this particular case, I don't know. If it doesn't then it should be documented that uuid is a requirement.

Alasdair

Signature · 1 line
[email protected]
#3 lore raw

Maybe Jonathan Brassow could shed some light on this :)

Since the documentation says the uuid is optional should this failure check be modified to a log warning in the "_alloc_thread_status()" function?

Brian Wood
Intel Corporation
Digital Enterprise Group
Manageability & Platform Software Division
[email protected]

Quoted 2 lines

-----Original Message-----
From: [email protected] [mailto:[email protected]]

On

Quoted 8 lines

Behalf Of Alasdair G Kergon
Sent: Friday, July 20, 2007 10:14 AM
To: device-mapper development
Subject: Re: [dm-devel] Question about dmevents

Quoted 2 lines · Brian J

Hi Alasdair, I also read in the definition of DM_DEV_CREATE that the uuid is optional. Since that is the case shouldn't the failure for

not

Quoted 3 lines
Quoted 1 line

having a uuid in "_alloc_thread_status()" be taken out?

I don't know this code, but in general userspace code should use uuid

if it

Quoted 2 lines

is
present. If it isn't, it should fall back to using the name. Whether

that

Quoted 1 line

leads to sensible behaviour in this particular case, I don't know. If

it

Quoted 10 lines

doesn't then it should be documented that uuid is a requirement.

Alasdair
--
[email protected]

--
dm-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/dm-devel

#4 lore raw
In reply to Alasdair G Kergon
Quoted 9 lines · Alasdair G Kergon
Quoted 3 lines · Brian J

Hi Alasdair, I also read in the definition of DM_DEV_CREATE that the uuid is optional. Since that is the case shouldn't the failure for not having a uuid in "_alloc_thread_status()" be taken out?

I don't know this code, but in general userspace code should use uuid if it is present. If it isn't, it should fall back to using the name. Whether that leads to sensible behaviour in this particular case, I don't know. If it doesn't then it should be documented that uuid is a requirement.

Yes, the uuid here is a requirement, since it is what is used for communication between dmeventd and other userspace components. Using device names is, in my opinion, prone to races and therefore not quite suitable for dmeventd. Moreover, since the dmeventd -only- gets the uuid (from whichever other application it tries to get it), it cannot fall back to name, not knowing it.

In fact, when using theh libdevmapper-event library, the client-side code should already fail, if a device has no uuid. In practice, this means that uuid-less devices cannot be monitored, but that is probably a case that is not really important (or is it?).

I would probably prefer to just document this as requirement and keep things as they are. Comments?

Yours, Peter.

Signature · 6 lines
Peter Rockai | me()mornfall!net | prockai()redhat!com
 http://blog.mornfall.net | http://web.mornfall.net

"In My Egotistical Opinion, most people's C programs should be
 indented six feet downward and covered with dirt."
     -- Blair P. Houghton on the subject of C program indentation
#5 lore raw
Quoted 6 lines · Peter Rockai

In fact, when using theh libdevmapper-event library, the client-side code should already fail, if a device has no uuid. In practice, this means that uuid-less devices cannot be monitored, but that is probably a case that is not really important (or is it?).
I would probably prefer to just document this as requirement and keep things as they are. Comments?

That all makes sense to me.

name = user-friendly reference; can be changed at will
uuid = software-friendly reference, a constant for the life of the device

If we have existing software not setting up uuids then those programs need investigating.

Alasdair

Signature · 1 line
[email protected]
#6 lore raw
Quoted 2 lines

-----Original Message-----
From: [email protected] [mailto:[email protected]]

On

Quoted 9 lines

Behalf Of Alasdair G Kergon
Sent: Sunday, July 22, 2007 4:16 AM
To: device-mapper development
Subject: Re: [dm-devel] Question about dmevents

Quoted 3 lines · Peter Rockai

In fact, when using theh libdevmapper-event library, the client-side code should already fail, if a device has no uuid. In practice, this means that uuid-less devices cannot be monitored, but that is

probably

Quoted 5 lines
Quoted 3 lines

a case that is not really important (or is it?).
I would probably prefer to just document this as requirement and keep things as they are. Comments?

That all makes sense to me.

Agreed :)

Quoted 3 lines

name = user-friendly reference; can be changed at will uuid = software-friendly reference, a constant for the life of the

device

Quoted 2 lines

If we have existing software not setting up uuids then those programs

need

Quoted 2 lines

investigating.

I have a question though, not being too familiar with the device-mapper core code. When I load a fresh system using FC7 on a raid1 volume (for example) I never see a prompt during the installation asking if I would like to have a UUID assigned. After the install I check and there isn't one assigned by default. If I then add some disks to the system and decide to install an LVM2 mirror I do this using the command line and there is a UUID assigned by default. Is this also a bug in the installer? Or is there a way I can assign a UUID to an already existing system? In the documentation it says I would have to delete my volume group and rebuild it to assign a UUID is this correct? If so how can a fresh system get a UUID?

Thank you for all the help :)

Brian Wood
Intel Corporation
Digital Enterprise Group
Manageability & Platform Software Division
[email protected]

Quoted 8 lines

Alasdair
--
[email protected]

--
dm-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/dm-devel

#7 lore raw

Question about device-mapper/raid

Hello everyone,

Not being too familiar with the device-mapper core code I have a question. When I load a fresh system using FC7 on a raid1 volume (for example) I never see a prompt during the installation asking if I would like to have a UUID assigned. After the install I check and there isn't one assigned by default. If I then add some disks to the system and decide to install an LVM2 mirror I do this using the command line and there is a UUID assigned by default. Is this also a bug in the installer? Or is there a way I can assign a UUID to an already existing system? In the documentation it says I would have to delete my volume group and rebuild it to assign a UUID is this correct? If so how can a fresh system get a UUID?

Thank you for all the help :)

Brian Wood
Intel Corporation
Digital Enterprise Group
Manageability & Platform Software Division
[email protected]