| /freebsd/sys/contrib/openzfs/man/man8/ |
| H A D | zgenhostid.8 | 20 .Nd generate host ID into /etc/hostid 25 .Op Ar hostid 29 .Pa /etc/hostid 32 .Ar hostid 46 .Pa /etc/hostid . 47 .It Ar hostid 49 .Pa /etc/hostid . 64 .Pa /etc/hostid 68 .It Generate a random hostid and store it 70 .It Record the libc-generated hostid in Pa /etc/hostid [all …]
|
| /freebsd/sys/contrib/openzfs/lib/libspl/os/linux/ |
| H A D | gethostid.c | 27 unsigned long hostid; in get_spl_hostid() local 31 * Allow the hostid to be subverted for testing. in get_spl_hostid() 37 f = fopen("/proc/sys/kernel/spl/hostid", "re"); in get_spl_hostid() 41 if (fscanf(f, "%lx", &hostid) != 1) in get_spl_hostid() 42 hostid = 0; in get_spl_hostid() 46 return (hostid); in get_spl_hostid() 52 unsigned long hostid = get_spl_hostid(); in get_system_hostid() local 57 * depending on the libc and /etc/hostid presence, in get_system_hostid() 61 if (hostid == 0) { in get_system_hostid() 62 int fd = open("/etc/hostid", O_RDONLY | O_CLOEXEC); in get_system_hostid() [all …]
|
| /freebsd/sys/contrib/openzfs/tests/zfs-tests/tests/functional/mmp/ |
| H A D | mmp_hostid.ksh | 19 # Verify the hostid file can reside on a ZFS dataset. 23 # 2. Create an 'etc' dataset containing a valid hostid file 25 # 4. Verify multihost cannot be enabled until the /etc/hostid is linked 49 log_assert "Verify hostid file can reside on a ZFS dataset" 58 # 2. Create an 'etc' dataset containing a valid hostid file; caching is 59 # disabled on the dataset to force the hostid to be read from disk. 63 log_must mv $HOSTID_FILE $mntpnt_etc/hostid 70 # 4. Verify multihost cannot be enabled until the /etc/hostid is linked 71 log_note "Verify multihost cannot be enabled until the /etc/hostid is linked" 74 log_must ln -s $mntpnt_etc/hostid [all...] |
| H A D | mmp_exported_import.ksh | 25 # 4. Verify multihost=off and hostid zero allowed (no activity check) 28 # 7. Verify multihost=on and hostid zero fails (no activity check) 69 # 4. Verify multihost=off and hostid zero allowed (no activity check) 70 log_note "Verify multihost=off and hostid zero allowed (no activity check)" 98 # 7. Verify multihost=on and hostid zero fails (no activity check) 99 log_note "Verify multihost=on and hostid zero fails (no activity check)" 104 MMP_IMPORTED_MSG="Set a unique system hostid"
|
| H A D | mmp_inactive_import.ksh | 25 # 4. Verify multihost=off and hostid allowed (no activity check) 29 # 8. Verify multihost=on and hostid zero fails (no activity check) 70 # 4. Verify multihost=off and hostid zero allowed (no activity check) 71 log_note "Verify multihost=off and hostid zero allowed (no activity check)" 100 # 8. Verify multihost=on and hostid zero fails (no activity check) 101 log_note "Verify multihost=on and hostid zero fails (no activity check)" 103 MMP_IMPORTED_MSG="Set a unique system hostid"
|
| H A D | mmp_active_import.ksh | 20 # with one hostid be importable by a host with a different hostid. 98 # - hostid=0: - configuration error 99 # - hostid=matches - safe to import the pool 100 # - hostid=different - previously imported on a different system 104 MMP_IMPORTED_MSG="Set a unique system hostid"
|
| H A D | mmp.kshlib | 64 typeset hostid=$1 68 # musl libc's gethostid() ignores /etc/hostid; verify the file directly. 69 if [[ $(hostid) != "$hostid" ]]; then 73 [[ "$written" = "$hostid" ]] 147 log_note "Starting zhack in the background as hostid $HOSTID1" 182 function mmp_pool_set_hostid # pool hostid 185 typeset hostid=$2 188 log_must mmp_set_hostid $hostid 204 # mmp_result: 6 (ENXIO) no activity check was run hostid no [all...] |
| /freebsd/sys/contrib/openzfs/contrib/dracut/90zfs/ |
| H A D | parse-zfs.sh.in | 10 info "ZFS: Using hostid from command line: ${spl_hostid}" 12 elif [ -f "/etc/hostid" ] ; then 13 info "ZFS: Using hostid from /etc/hostid: $(hostid)" 15 warn "ZFS: No hostid found on kernel command line or /etc/hostid."
|
| H A D | module-setup.sh.in | 31 hostid \ 70 # Synchronize initramfs and system hostid 71 if ! inst_simple -H @sysconfdir@/hostid; then 72 if HOSTID="$(hostid 2>/dev/null)" && [[ "${HOSTID}" != "00000000" ]]; then 73 zgenhostid -o "${initdir}@sysconfdir@/hostid" "${HOSTID}" 74 mark_hostonly @sysconfdir@/hostid
|
| /freebsd/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zpool_import/ |
| H A D | zpool_import_hostid_changed.ksh | 25 # the local hostid doesn't match the on-disk hostid. 28 # 1. Set a hostid. 31 # 4. Change the hostid. 45 # 1. Set a hostid. 54 # 4. Change the hostid. 60 log_pass "zpool import can import cleanly exported pool when hostid changes."
|
| H A D | zpool_import_hostid_changed_cachefile.ksh | 25 # without force even if the local hostid doesn't match the on-disk hostid. 28 # 1. Set a hostid. 32 # 5. Change the hostid. 47 # 1. Set a hostid. 59 # 5. Change the hostid. 66 "when hostid changes."
|
| H A D | zpool_import_hostid_changed_unclean_export.ksh | 25 # the local hostid doesn't match the on-disk hostid. 28 # 1. Set a hostid. 34 # 4. Change the hostid. 49 # 1. Set a hostid. 60 # 4. Change the hostid. 70 "and hostid changed."
|
| H A D | zpool_import_hostid_changed_cachefile_unclean_export.ksh | 25 # without force if the local hostid doesn't match the on-disk hostid. 28 # 1. Set a hostid. 34 # 5. Change the hostid. 50 # 1. Set a hostid. 64 # 5. Change the hostid. 74 "exported and hostid changes."
|
| /freebsd/libexec/rc/rc.d/ |
| H A D | hostid | 29 # PROVIDE: hostid 35 name="hostid" 46 # Generate hostid based on hostuuid - take first four bytes from md5(uuid). 50 # Set both kern.hostuuid and kern.hostid. 54 startmsg "Setting hostid: ${id}." 55 ${SYSCTL} kern.hostid=${id} >/dev/null 122 warn "hostid: unable to figure out a UUID from DMI data, generating a new one" 156 # No hostid file, generate UUID.
|
| /freebsd/sys/contrib/openzfs/module/os/linux/spl/ |
| H A D | spl-generic.c | 59 MODULE_PARM_DESC(spl_hostid, "The system hostid."); 362 * Read the unique system identifier from the /etc/hostid file. 364 * The behavior of /usr/bin/hostid on Linux systems with the 367 * 1. Generate the value if the /etc/hostid file does not exist 368 * or if the /etc/hostid file is less than four bytes in size. 370 * 2. If the /etc/hostid file is at least 4 bytes, then return 381 * coreutils: src/hostid.c 385 * The /etc/hostid file on Solaris is a text file that often reads: 391 * hostid of 4f442023 because the default comment constitutes 398 MODULE_PARM_DESC(spl_hostid_path, "The system hostid file (/etc/hostid)"); [all …]
|
| /freebsd/sys/contrib/openzfs/cmd/ |
| H A D | zgenhostid.c | 65 " -f\t\t force hostid file write\n" in usage() 67 " -o <filename>\t write hostid to this file\n\n" in usage() 68 "If hostid file is not present, store a hostid in it.\n" in usage() 81 const char *path = "/etc/hostid"; in main() 135 * Generate if not provided by user. The hostid identifies in main() 165 uint32_t hostid = input_i; in main() local 166 int written = fwrite(&hostid, 1, 4, fp); in main()
|
| /freebsd/sys/contrib/openzfs/lib/libspl/os/freebsd/ |
| H A D | gethostid.c | 29 * Allow the hostid to be subverted for testing. A value which in get_system_hostid() 31 * system hostid is used instead. in get_system_hostid() 35 unsigned long hostid = strtoull(env, NULL, 0); in get_system_hostid() local 36 if (hostid != 0) in get_system_hostid() 37 return (hostid & HOSTID_MASK); in get_system_hostid()
|
| /freebsd/tools/tools/nvmf/nvmfd/ |
| H A D | io.c | 34 char hostid[16]; member 49 u_long hostid; in init_io() local 68 /* Generate a serial number from the kern.hostid node. */ in init_io() 69 len = sizeof(hostid); in init_io() 70 if (sysctlbyname("kern.hostid", &hostid, &len, NULL, 0) == -1) in init_io() 71 err(1, "sysctl: kern.hostid"); in init_io() 73 nvmf_controller_serial(serial, sizeof(serial), hostid); in init_io() 500 memcpy(ioc->hostid, data->hostid, sizeof(ioc->hostid)); in connect_admin_qpair() 542 if (memcmp(io_controller->hostid, data->hostid, in connect_io_qpair() 543 sizeof(data->hostid)) != 0) { in connect_io_qpair() [all …]
|
| /freebsd/contrib/llvm-project/llvm/lib/Support/ |
| H A D | LockFileManager.cpp | 82 static std::error_code getHostID(SmallVectorImpl<char> &HostID) { in getHostID() argument 83 HostID.clear(); in getHostID() 95 HostID.append(UUIDRef.begin(), UUIDRef.end()); in getHostID() 103 HostID.append(HostNameRef.begin(), HostNameRef.end()); in getHostID() 107 HostID.append(Dummy.begin(), Dummy.end()); in getHostID() 113 bool LockFileManager::processStillExecuting(StringRef HostID, int PID) { in processStillExecuting() argument 120 if (StoredHostID == HostID && getsid(PID) == -1 && errno == ESRCH) in processStillExecuting() 195 SmallString<256> HostID; in tryLock() local 196 if (auto EC = getHostID(HostID)) in tryLock() 200 Out << HostID << ' ' << sys::Process::getProcessId(); in tryLock()
|
| /freebsd/share/man/man9/ |
| H A D | ether_gen_addr.9 | 51 attempts to generate a stable MAC address using the hostid of the jail that 55 During early boot, the hostid may not be set on machines that haven't yet 57 .Pa /etc/hostid , 63 the hostid has not been populated.
|
| /freebsd/sys/cddl/compat/opensolaris/sys/ |
| H A D | zone.h | 59 * Safely get the hostid of the specified zone (defaults to machine's hostid 60 * if the specified zone doesn't emulate a hostid). Passing NULL retrieves 61 * the global zone's (i.e., physical system's) hostid.
|
| /freebsd/sbin/hastd/ |
| H A D | parse.y | 732 unsigned long hostid; variable 767 * Check if it matches hostid. 769 bufsize = sizeof(hostid); 770 if (sysctlbyname("kern.hostid", &hostid, &bufsize, NULL, 0) < 0) { 771 pjdlog_errno(LOG_ERR, "sysctlbyname(kern.hostid) failed"); 774 (void)snprintf(buf, sizeof(buf), "hostid%lu", hostid); 802 unsigned long hostid; in node_names() local 833 bufsize = sizeof(hostid); in node_names() 834 if (sysctlbyname("kern.hostid", &hostid, &bufsize, NULL, 0) < 0) { in node_names() 835 pjdlog_errno(LOG_ERR, "sysctlbyname(kern.hostid) failed"); in node_names() [all …]
|
| /freebsd/share/doc/psd/05.sysman/ |
| H A D | 1.1.t | 38 sethostid(hostid) 39 long hostid; 41 hostid = gethostid(); 42 result long hostid; 65 in a multi-host environment, the (hostid, process id) pairs are
|
| /freebsd/sys/contrib/openzfs/include/os/linux/spl/sys/ |
| H A D | systeminfo.h | 30 /* hostid string */ 33 #define HW_HOSTID_PATH "/etc/hostid" /* binary configuration file */ 34 #define HW_HOSTID_MASK 0xFFFFFFFF /* significant hostid bits */
|
| /freebsd/sys/contrib/openzfs/include/os/freebsd/spl/sys/ |
| H A D | zone.h | 63 * Safely get the hostid of the specified zone (defaults to machine's hostid 64 * if the specified zone doesn't emulate a hostid). Passing NULL retrieves 65 * the global zone's (i.e., physical system's) hostid.
|