Mount Setting (option)
In many experimental setups, tasks are often distributed across multiple servers, such as:
- DAQ Server: Handles the DAQ process.
- File Server: Stores experimental data.
- Analysis Server: Performs data analysis.
To simplify workflows, NFS (Network File System) can be used to allow the analysis server to access data directly from the file server without duplicating files. Additionally, external storage devices can be mounted for offline analysis to store data or generated ROOT files.
Configuring the File Server for NFS
Step 1: Install NFS Server Utilities
Step 2: Configure Shared Directories in /etc/exports
- Edit the
/etc/exportsfile:
- Add an entry for the directory to share:
- Replace
/path/to/shared/datawith the directory you want to share. -
Replace
<client_ip>with the IP address or subnet (e.g.,192.168.1.*). -
Common options in
/etc/exports| Option | Description | |-----------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------| |rw| Allows read and write access. | |ro(default) | Allows read-only access. | |sync(default) | Commits changes to disk before notifying the client. This ensures data integrity but may slightly reduce speed. | |async| Allows the server to reply to requests before changes are committed to disk. This improves speed but risks data corruption in case of failure. | |subtree_check(default) | Ensures proper permissions for subdirectories but may reduce performance. | |no_subtree_check| Disables subtree checks for better performance but reduces strict access control. | |wdelay(default) | Delays disk writes to combine operations for better performance. Improves performance but increases the risk of data loss during failures. | |no_wdelay| Disables delays for immediate write operations, reducing risk of data loss but potentially decreasing performance. | |hide| Prevents overlapping mounts from being visible to clients. Enhances security by hiding overlapping mounts. | |nohide| Allows visibility of overlapping mounts. Useful for nested exports but can lead to confusion. | |root_squash(default) | Maps the root user of the client to a non-privileged user on the server. Improves security by preventing root-level changes. | |no_root_squash| Allows the root user of the client to have root-level access on the server. This is not recommended unless absolutely necessary. | |all_squash| Maps all client users to a single anonymous user on the server. Useful for shared directories with limited permissions. | -
Save and exit the editor.
Step 3: Apply Changes and Start NFS Server
Configuring the Analysis Server for Mounting
1. Mounting a Shared Directory via NFS
Step 1: Install NFS Utilities:
Step 2: Create a Mount Point:
Step 3: Configure Persistent Mounting:
Add:
Step 4: Apply and Verify:
2. Mounting External Storage (e.g., USB or HDD)
Step 1: Identify the Device:
- Look for the device name (e.g.,
/dev/sdb1) in the output.
Step 2: Create a Mount Point:
Step 3: Configure Persistent Mounting:
Add:
- Replace
/dev/sdb1with the actual device name. - Replace
ext4with the correct filesystem type (e.g.,ext4,xfs,vfat).
Step 4: Apply and Verify:
Troubleshooting
-
File Server Issues:
-
Ensure the NFS service is running on the file server:
- Verify the export list:
-
Analysis Server Issues:
-
Check the NFS mount status:
-
Verify network connectivity between the analysis server and file server.
-
External Storage Issues:
-
Unmount safety:
- Formatting uninitialized Storage:
- Use UUIDs for reliable mounting to avoid issues with device naming (e.g.,
/dev/sdb1):
Add to /etc/fstab: