|
| vxdctl init <hostid> |
 |
16 Feb 2007 09:53:39 -0500 |
Hi,
When 'vxdctl init <hostid>' command will be used?. Please tell us the use
cases.
We do face one issue..
1) after creating a new system from some other systems image tape, the system
inherits the name on tape, say "hostA"
2) then the system is renamed to "hostX"
3) Now the veritas volboot file still contains "hostA" unless that is
changed
4) initializing disks will now create disks with hostid "hostA",
although
we really are in "hostX"
Inorder to get the new host name in all the disks, will executing 'vxdctl
init <hostid>' help?. If yes, then 'vxdctl init <hostid>' command to
be issued
between step 2 and 4?
|
| Post Reply
|
| Re: vxdctl init <hostid> |
 |
Sat, 17 Feb 2007 09:58:20 +110 |
The hostid of the machine is stored in /etc/xv/volboot
Now, when you init a disk (vxdisksetup), each disk that Volume Manager
controls gets an unique id.
Now, let us think of how you will get an unique id.
Well, if you perhaps use random numbers .... but who says that you will
never use the same random number again ??
How about the hostid ?
Well, then all disks on that machine will have the same disknames ...
Not going to work.
How about we use the time the disk was created ?
Cool idea. If we use the milli seconds as well......
But, what if we init a disk on another machine at that very same time ?
We know it will not happen on the same machine (because writing to a
disk will take more than 1 milli second). But we can still have 2
different machines create (and write) to different disks at the very
same time. So if we can add the name of the host that created the disk
at that very milli second, we should be good ...
That is why the name of the host will be added to the time of creation
(well actually seconds.mill seconds since 1970.hostname)
This is how a unique diskid (not the name that the user creates for it -
which can be changed) is created.
Does this mean that the disks can only be used on that machine ?
Not at all !!! The disk can be used on any machine.
But, how will Volume Manager know that I'm using this disk on a certain
host ?
That is where the hostid comes into it.
So, in short, the diskid gets created when the Volume Manager disk gets
created (vxdisksetup) and can not be changed. The diskid and more
specifically the hostid that forms part of the diskid does not tell you
or limit you to the host that the disk is used on.
So, don't worry about it.
Poornachandran wrote:
> Hi,
>
> When 'vxdctl init <hostid>' command will be used?. Please tell us the
use
> cases.
>
> We do face one issue..
> 1) after creating a new system from some other systems image tape, the
system
> inherits the name on tape, say "hostA"
> 2) then the system is renamed to "hostX"
> 3) Now the veritas volboot file still contains "hostA" unless
that is changed
> 4) initializing disks will now create disks with hostid "hostA",
although
> we really are in "hostX"
>
> Inorder to get the new host name in all the disks, will executing 'vxdctl
> init <hostid>' help?. If yes, then 'vxdctl init <hostid>'
command to be issued
> between step 2 and 4?
>
|
| Post Reply
|
| Re: vxdctl init <hostid> |
 |
19 Feb 2007 06:09:41 -0500 |
Thanks for the reply.
So, do you mean to say that the the hostid alone does matter; But the host
name present in the disk id and group id in the form
<seconds>.<msecs>.<host
name> does not matter with respect to hostid?
Me <me@hotmail.com> wrote:
>The hostid of the machine is stored in /etc/xv/volboot
>
>
>Now, when you init a disk (vxdisksetup), each disk that Volume Manager
>controls gets an unique id.
>
>Now, let us think of how you will get an unique id.
>
>Well, if you perhaps use random numbers .... but who says that you will
>never use the same random number again ??
>
>How about the hostid ?
>Well, then all disks on that machine will have the same disknames ...
>Not going to work.
>
>How about we use the time the disk was created ?
>Cool idea. If we use the milli seconds as well......
>
>But, what if we init a disk on another machine at that very same time ?
>We know it will not happen on the same machine (because writing to a
>disk will take more than 1 milli second). But we can still have 2
>different machines create (and write) to different disks at the very
>same time. So if we can add the name of the host that created the disk
>at that very milli second, we should be good ...
>
>That is why the name of the host will be added to the time of creation
>(well actually seconds.mill seconds since 1970.hostname)
>This is how a unique diskid (not the name that the user creates for it -
>which can be changed) is created.
>
>Does this mean that the disks can only be used on that machine ?
>Not at all !!! The disk can be used on any machine.
>
>But, how will Volume Manager know that I'm using this disk on a certain
>host ?
>
>That is where the hostid comes into it.
>
>So, in short, the diskid gets created when the Volume Manager disk gets
>created (vxdisksetup) and can not be changed. The diskid and more
>specifically the hostid that forms part of the diskid does not tell you
>or limit you to the host that the disk is used on.
>
>So, don't worry about it.
>
>
>Poornachandran wrote:
>> Hi,
>>
>> When 'vxdctl init <hostid>' command will be used?. Please tell us
the
use
>> cases.
>>
>> We do face one issue..
>> 1) after creating a new system from some other systems image tape, the
system
>> inherits the name on tape, say "hostA"
>> 2) then the system is renamed to "hostX"
>> 3) Now the veritas volboot file still contains "hostA" unless
that is
changed
>> 4) initializing disks will now create disks with hostid
"hostA", although
>> we really are in "hostX"
>>
>> Inorder to get the new host name in all the disks, will executing
'vxdctl
>> init <hostid>' help?. If yes, then 'vxdctl init <hostid>'
command to be
issued
>> between step 2 and 4?
>>
>> Thanks,
|
| Post Reply
|
| Re: vxdctl init <hostid> |
 |
Mon, 19 Feb 2007 21:08:27 +110 |
Once a disk has got a disk id, you can do with it what you want.
You can take it from 1 machine to the next without any problem.
Poornachandran wrote:
> Thanks for the reply.
>
> So, do you mean to say that the the hostid alone does matter; But the host
> name present in the disk id and group id in the form
<seconds>.<msecs>.<host
> name> does not matter with respect to hostid?
>
>
> Me <me@hotmail.com> wrote:
>
>>The hostid of the machine is stored in /etc/xv/volboot
>>
>>
>>Now, when you init a disk (vxdisksetup), each disk that Volume Manager
>>controls gets an unique id.
>>
>>Now, let us think of how you will get an unique id.
>>
>>Well, if you perhaps use random numbers .... but who says that you will
>
>
>>never use the same random number again ??
>>
>>How about the hostid ?
>>Well, then all disks on that machine will have the same disknames ...
>>Not going to work.
>>
>>How about we use the time the disk was created ?
>>Cool idea. If we use the milli seconds as well......
>>
>>But, what if we init a disk on another machine at that very same time ?
>
>
>>We know it will not happen on the same machine (because writing to a
>>disk will take more than 1 milli second). But we can still have 2
>>different machines create (and write) to different disks at the very
>>same time. So if we can add the name of the host that created the disk
>>at that very milli second, we should be good ...
>>
>>That is why the name of the host will be added to the time of creation
>>(well actually seconds.mill seconds since 1970.hostname)
>>This is how a unique diskid (not the name that the user creates for it
-
>
>
>>which can be changed) is created.
>>
>>Does this mean that the disks can only be used on that machine ?
>>Not at all !!! The disk can be used on any machine.
>>
>>But, how will Volume Manager know that I'm using this disk on a certain
>
>
>>host ?
>>
>>That is where the hostid comes into it.
>>
>>So, in short, the diskid gets created when the Volume Manager disk gets
>
>
>>created (vxdisksetup) and can not be changed. The diskid and more
>>specifically the hostid that forms part of the diskid does not tell you
>
>
>>or limit you to the host that the disk is used on.
>>
>>So, don't worry about it.
>>
>>
>>Poornachandran wrote:
>>
>>>Hi,
>>>
>>>When 'vxdctl init <hostid>' command will be used?. Please tell
us the
>
> use
>
>>>cases.
>>>
>>>We do face one issue..
>>>1) after creating a new system from some other systems image tape,
the
>
> system
>
>>>inherits the name on tape, say "hostA"
>>>2) then the system is renamed to "hostX"
>>>3) Now the veritas volboot file still contains "hostA"
unless that is
>
> changed
>
>>>4) initializing disks will now create disks with hostid
"hostA", although
>>>we really are in "hostX"
>>>
>>>Inorder to get the new host name in all the disks, will executing
'vxdctl
>>>init <hostid>' help?. If yes, then 'vxdctl init
<hostid>' command to be
>
> issued
>
>>>between step 2 and 4?
>>>
>>>Thanks,
>
|
| Post Reply
|
|
|