Skip to content

Storage

John Yocum edited this page May 10, 2019 · 8 revisions

Enable Disk Quotas

NOTE: The following operations are performed on the head node or frontend. In this example, we'll enable quotas on /state.

  1. Edit /etc/fstab, and add usrquota and grpquota to the mount. Example below (the important parts are the usrjquota, grpjquota, and jqfmt):

     UUID=5a3ec9d6-32b9-4ffd-9108-8bbf4e20cb46 /state ext4 defaults,usrjquota=aquota.user,grpjquota=aquota.group,jqfmt=vfsv0 1 2
    
  2. Remount the filesystem

     mount -o remount /state
    
  3. Generate the quota files

     quotacheck -mcug /state
    
  4. Update the quota files

     quotacheck -mavug
    
  5. Activate quotas

     quotaon -a
    

Creating a new NFS Share

NOTE: The following operations are performed on the head node or frontend.

  1. Create a folder in /export

     mkdir /export/groups
    
  2. Add an entry to /etc/auto.share

     groups deohs-brain.brain.local:/export/&
    
  3. Sync auto.share with compute nodes

     rocks sync users
    
  4. Restart autofs on all compute nodes

     rocks run host "service autofs restart"
    

Creating a Group Folder

Each work group should be assigned a shared folder for storing common data and applications. For this example, we'll create a folder for the group "mesa".

  1. Create the folder

     mkdir /export/groups/mesa
    
  2. Set ownership to root, and the group

     chown root:mesa /export/groups/mesa
    
  3. Set permissions to restrict access to the group. With the default behavior of new files, to have group ownership.

     chmod 2770 /export/groups/mesa
    
  4. Finally, apply a POSIX ACL to set default permissions on files and directories.

     setfacl -d -m u::rwX,g::rwX,o::0 /export/groups/mesa