Questo contenuto non è disponibile nella lingua selezionata.

24.3. Configuring an Exported File System for Diskless Clients


The root directory of the exported file system (used by diskless clients in the network) is shared via NFS. Configure the NFS service to export the root directory by adding it to /etc/exports. For instructions on how to do so, refer to Section 9.7.1, “The /etc/exports Configuration File”.
To accommodate completely diskless clients, the root directory should contain a complete Red Hat Enterprise Linux installation. You can synchronize this with a running system via rsync, as in:
# rsync -a -e ssh --exclude='/proc/*' --exclude='/sys/*' hostname.com:/ /exported/root/directory
Replace hostname.com with the hostname of the running system with which to synchronize via rsync. The /exported/root/directory is the path to the exported file system.
Alternatively, you can also use yum with the --installroot option to install Red Hat Enterprise Linux to a specific location. For example:
yum groupinstall Base --installroot=/exported/root/directory
The file system to be exported still needs to be configured further before it can be used by diskless clients. To do this, perform the following procedure:

Procedure 24.2. Configure file system

  1. Configure the exported file system's /etc/fstab to contain (at least) the following configuration:
    none		/tmp		tmpfs	defaults	0 0
    tmpfs		/dev/shm	tmpfs	defaults	0 0
    sysfs		/sys		sysfs	defaults	0 0
    proc		/proc		proc 	defaults	0 0
  2. Select the kernel that diskless clients should use (vmlinuz-kernel-version) and copy it to the tftp boot directory:
    # cp /boot/vmlinuz-kernel-version /var/lib/tftpboot/
    
  3. Create the initrd (i.e. initramfs-kernel-version.img) with network support:
    # dracut initramfs-kernel-version.img kernel-version
    Copy the resulting initramfs-kernel-version.img into the tftp boot directory as well.
  4. Edit the default boot configuration to use the initrd and kernel inside /var/lib/tftpboot. This configuration should instruct the diskless client's root to mount the exported file system (/exported/root/directory) as read-write. To do this, configure /var/lib/tftpboot/pxelinux.cfg/default with the following:
    default rhel6
    
    label rhel6
      kernel vmlinuz-kernel-version
      append initrd=initramfs-kernel-version.img root=nfs:server-ip:/exported/root/directory rw
    Replace server-ip with the IP address of the host machine on which the tftp and DHCP services reside.
The NFS share is now ready for exporting to diskless clients. These clients can boot over the network via PXE.
Red Hat logoGithubRedditYoutubeTwitter

Formazione

Prova, acquista e vendi

Community

Informazioni sulla documentazione di Red Hat

Aiutiamo gli utenti Red Hat a innovarsi e raggiungere i propri obiettivi con i nostri prodotti e servizi grazie a contenuti di cui possono fidarsi.

Rendiamo l’open source più inclusivo

Red Hat si impegna a sostituire il linguaggio problematico nel codice, nella documentazione e nelle proprietà web. Per maggiori dettagli, visita ilBlog di Red Hat.

Informazioni su Red Hat

Forniamo soluzioni consolidate che rendono più semplice per le aziende lavorare su piattaforme e ambienti diversi, dal datacenter centrale all'edge della rete.

© 2024 Red Hat, Inc.