11-09-2019
No, it's not only necessary in x86.
On x86 the hostid is computed at random at installation time. On SPARC the hostid is a hash of the hardware NIC address so in situations where you cannot move an EPROM (ie, newer hardware), the hostid will be different from the original box. Therefore you have to forcibly set it by injection into the kernel module.
This User Gave Thanks to hicksd8 For This Post:
10 More Discussions You Might Find Interesting
1. Filesystems, Disks and Memory
I removed an external Sun disk (with data on it) from an old 2.6 system and added the disk to another 2.6 system. The new system seems to recognize the system (verified by the format command).
When try to mount I am getting, I got the error:
mount: /dev/dsk/c1t1d0s6 is not this fstype.
I... (3 Replies)
Discussion started by: sunshine
3 Replies
2. UNIX for Dummies Questions & Answers
Hi all,
I purchased a pci controller card and a 3rd hard drive to put Linux on my machine. The card did not enable me to boot to the 3rd drive so I could not get Mandrake to install. My motherboard is a Gigabyte GA-7DXR+. Can anyone point me to a reasonable card/connector which will allow me... (2 Replies)
Discussion started by: onestepto
2 Replies
3. Solaris
Hi,
I need to do an installation where I have identical hardware at both sites and create the installation at one site and take the disk to the other site. Question: Do I need to do anything special for the OS to come up properly?
thanks. (18 Replies)
Discussion started by: VirginiaSA
18 Replies
4. Solaris
Hi,
df -h display:
# df -h
Filesystem size used avail capacity Mounted on
/dev/dsk/c1t0d0s0 9.8G 8.1G 1.7G 84% /
/proc 0K 0K 0K 0% /proc
mnttab 0K 0K 0K 0% /etc/mnttab
fd 0K 0K 0K 0% /dev/fd
swap 1.0G 152K 1.0G 1% /var/run
swap 1.1G 24M 1.0G 3% /tmp
/dev/dsk/c1t0d0s3 57G 13G 43G 24%... (4 Replies)
Discussion started by: lamoul
4 Replies
5. Solaris
Hi,
The disks of my servers are getting full and I need to move the /export/home partition on to a new set of disks. I already have 2 mirrored disks and have added 2 more and mirrored them after creating the filesystem on them.
Do I just need to edit the /etc/vfstab and point the /export/home... (1 Reply)
Discussion started by: run_time_error
1 Replies
6. Solaris
We have hardware RAID configured on Sun-Blade-T6320 and one of the disk got failed. Hence we replaced the failed disk. But the hot swapped disk not recognized by RAID. Kindly help on fixing this issue.
We have 2 LDOM configured on this server and this server running on single disk.
#... (8 Replies)
Discussion started by: rock123
8 Replies
7. Solaris
Hi All
Hope it's okay to post on this sub-forum, couldn't find a better place
I've got a 480R running solaris 8 with veritas volume manager managing all filesystems, including an encapsulated root disk (I believe the root disk is encapsulated as one of the root mirror disks has an entry under... (1 Reply)
Discussion started by: sunnyd76
1 Replies
8. UNIX for Dummies Questions & Answers
Hi,
I have server with 2 active disk, but disk 1 contain big part of os is falling,
how can i move everything to disk 2 and then remove the disk 1?
Thanks (4 Replies)
Discussion started by: prpkrk
4 Replies
9. Solaris
Hi Guys,
One of two disks in my solaris machine has failed, the name is disk0, this is SUN physical sparc machine
But I work remotely, so people working near that physical server are not that technical, so from OS command prompt can run some command to bink faulty disk at front panel of Server.... (9 Replies)
Discussion started by: manalisharmabe
9 Replies
10. Linux
Hi
We have RHEL 7.3 running from local disk and we want to move it to storage.
I am unable to find any proper procedure to do this activity. Please help. (4 Replies)
Discussion started by: powerAIX
4 Replies
LEARN ABOUT LINUX
gethostid
GETHOSTID(3) Linux Programmer's Manual GETHOSTID(3)
NAME
gethostid, sethostid - get or set the unique identifier of the current host
SYNOPSIS
#include <unistd.h>
long gethostid(void);
int sethostid(long hostid);
Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
gethostid()
_BSD_SOURCE || _XOPEN_SOURCE >= 500 || _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED
sethostid():
_BSD_SOURCE || (_XOPEN_SOURCE && _XOPEN_SOURCE < 500)
DESCRIPTION
gethostid() and sethostid() respectively get or set a unique 32-bit identifier for the current machine. The 32-bit identifier is intended
to be unique among all Unix systems in existence. This normally resembles the Internet address for the local machine, as returned by geth-
ostbyname(3), and thus usually never needs to be set.
The sethostid() call is restricted to the superuser.
RETURN VALUE
gethostid() returns the 32-bit identifier for the current host as set by sethostid().
On success, sethostid() returns 0; on error, -1 is returned, and errno is set to indicate the error.
ERRORS
sethostid() can fail with the following errors:
EACCES The caller did not have permission to write to the file used to store the host ID.
EPERM The calling process's effective user or group ID is not the same as its corresponding real ID.
CONFORMING TO
4.2BSD; these functions were dropped in 4.4BSD. SVr4 includes gethostid() but not sethostid(). POSIX.1-2001 specifies gethostid() but not
sethostid().
NOTES
In the glibc implementation, the hostid is stored in the file /etc/hostid. (In glibc versions before 2.2, the file /var/adm/hostid was
used.)
In the glibc implementation, if gethostid() cannot open the file containing the host ID, then it obtains the hostname using gethostname(2),
passes that hostname to gethostbyname_r(3) in order to obtain the host's IPv4 address, and returns a value obtained by bit-twiddling the
IPv4 address. (This value may not be unique.)
BUGS
It is impossible to ensure that the identifier is globally unique.
SEE ALSO
hostid(1), gethostbyname(3)
COLOPHON
This page is part of release 3.27 of the Linux man-pages project. A description of the project, and information about reporting bugs, can
be found at http://www.kernel.org/doc/man-pages/.
Linux 2010-09-20 GETHOSTID(3)