Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Default home directory creation process
Normal home directories in rocks work like this:
/usr/sbin/useraddcreates the home directory in
/export/home/$USER(based on the settings in /etc/default/useradd)
- rocks sync users adjusts all home directories that are listed as
- add a line to
/etc/auto.homepointing to the existing directory in
- 411 is updated, to propagate the changes in
In the default Rocks configuration,
/home/ is an automount directory. By default,
directories in an automount directory are not present until an attempt is made to access them,
at which point they are (usually NFS) mounted. This means you CANNOT create a directory in
The contents of
/home/ are under autofs control. To "see" the directory, it is not enough to do
ls /home as that only accesses the /home directory itself, not its contents. To see the contents,
Changing the default
Placing user home directories on an external NAS (Rocks 5.4 or greater)
If you want to place all your home directory on an external NAS you can do the following:
mount the NFS share onto `/export/home` on your FE leave `/export/home` as the default dir in `/etc/default/useradd` # rocks set attr Info_HomeDirSrv "my-server-name" (where my-server-name is the NAS internal hostname) # rocks set attr Info_HomeDirLoc "/home-path-on-nfs-server"
Info_HomeDirSrv and Info_HomeDirLoc will be used to compose the user line in
every time a new user is added and the rocks sync users command is run. Since Rocks 6.0 you
can use the Info_HomeDirOptions to set the mount options.
Relocate user home directories
Here's an overview of what to do to move a user's home directory:
- Relocate the user's actual directory (using tar, cpio, rsync, mv, or whatever) to the new location if it isn't already there.
- edit /etc/auto.home to point to that new location
- update 411: (cd /var/411; make)
If for some reason it is desirable to have home directories on multiple servers,
all that is necessary is to make sure all the nodes in the cluster can mount the
directories from the servers (i.e., they are exported correctly), and then
/etc/auto.home to reflect the real location of each home directory.
rocks sync users will update
/etc/auto.home for existing users.
When you delete a user, you will need to explicitly remove the user's home area map from auto.home.
One procedure for doing this is:
# USERNAME=<name of user to delete> # userdel $USERNAME # sed -i "/^$USERNAME /d" /etc/auto.home # rocks sync users
You may have to explicitly unmount the user's home directory before performing the above procedure. If you are unfamiliar with userdel please see its man page