Isilon: How to Implement Independent Nested Quotas Using a Symlink
Summary: How to Implement Independent Nested Quotas Using a Symlink.
Instructions
Introduction
Sometimes, there is a need to allocate a portion of a quota domain to reserve it for a specific directory independently inside that quota domain.
For example, you might want to have a share with a 600GB quota and then have a subdirectory under that share with 100GB of space. So essentially all other directories in the root share could only store up to 500GB.
Essentially, you want to encapsulate an independent quota domain inside another, unrelated quota domain, so that space usage on one quota does not affect the other.
This is not possible when using the quota system and nested quotas. However, if the upper quota limits are hard then there is a workaround to set this up from a network client's perspective.
Details
The workaround creates the folders 'side-by-side' rather than one inside the other, so they can each be assigned a separate quota domain. When creating a symbolic link inside a folder that points to the other, the linked folder can appear inside the 'parent' folder to a network client. For the example described in the Introduction (have a share with a 600GB quota.), the steps needed would be as follows:
- Create your "parent" directory (for example
/ifs/data/parent) and assign it a 500GB quota.
- Create your "subdir" directory (for example
/ifs/data/subdir) and assign it a 100GB quota.
- Run the following command at the cluster command line:
ln -s /ifs/data/subdir /ifs/data/parent/subdir
This creates a symbolic link in /ifs/data/parent that connects to /ifs/data/subdir, so that it shows up as a subdirectory of parent. Server Message Block (SMB) users cannot tell the difference, but the quota system will. The parent has its 500GB cap, and the subdir has 100GB of its own space available. Network File System (NFS) sees the nature of the link on directory listings but can still traverse it as if the directory is there.
If SyncIQ traverses the parent directory, it copies the symlink file to the target along with all the other files in the parent folder;
If the subdir folder is synced and both folders are copied to the same position on the target cluster, the symlink works exactly the same. Otherwise it shows up as a broken link, with no further ill effects.
Most other system utilities treat the link as a file unless instructed to traverse symlinks (exercise caution when using this option).