Hi, Prunk Dump wrote on 2014-06-16 09:36:14 +0200 [Best way to add a nfs4 mount to fstab ?]: > Excuse my simple question but my Fai clients need to have a nfs mount > in their /etc/fstab > > ... > myhomeserver.domain.com:/userhome /home nfs4 > sec=krb5,async,ac 0 0 > ... > > What is the best way to add this line to fstab ? Is this possible > directly with setup-storage ?
setup-storage is about generating a layout for the local storage media, not about configuring the system. Do you need the mount during installation? Most probably not. The usual way would be something like scripts/SOMECLASS/10-add-home-mount: #!/bin/sh ainsl -s $target/etc/fstab 'myhomeserver.domain.com:/userhome /home nfs4 sec=krb5,async,ac 0 0' # --- cut here --- If you actually *do* need the mount during installation, you're probably doing something wrong ;-) (because you're either modifying a system you're not currently installing, or retrieving data from somewhere it doesn't belong. Furthermore, you're adding an unwanted dependency: no installation of the client without access to the home server. You'd need to mount the directory in a script or hook, depending on when you need it. At what point in time you add it to fstab doesn't really matter, except that you might not want to keep the information redundantly in two places, i.e. you probably want to add it whenever you do the mount. Regards, Holger
