Make Links
License: PRO+ (Professional Edition or higher)
Plugin Type: File Action
Author: Diskover Data, Inc.
Overview
The Make Links file action enables users to create hardlinks for files and directories selected in the Diskover web interface. Hardlinks provide storage-efficient alternative paths to content without duplicating any data on disk.
When you create a hardlink, both the original path and the new path point to the same underlying data blocks (inode) on the filesystem. This means you can organize and access the same content through multiple directory structures while consuming zero additional storage.
Key Features:
Zero Storage Overhead — Create alternative access paths without duplicating data
Instant Creation — No data copying required; hardlink creation is nearly instantaneous regardless of file size
Data Integrity — All paths access identical data, eliminating synchronization concerns
Independent Deletion — Removing one hardlink does not affect others; data persists until all links are removed
Recursive Directory Support — Automatically creates directory structures and hardlinks all files within
Use Cases
Media Production Teams can mirror mastering content from high-availability storage to distribution folders without duplicating terabytes of media files. A 500GB master file can be accessible from both the production and delivery paths with no additional storage cost.
Archive Administrators can create alternative organizational views of archived data while preserving the original structure. Research data archived by project can also be accessible by year for compliance reporting—the data exists once but is navigable through multiple hierarchies.
IT and Storage Teams can provide multiple paths to content for different user groups or applications. Marketing and Engineering teams might need access to the same product documentation through their own folder hierarchies without consuming duplicate storage.
Workflow Automation can stage content for processing pipelines by creating hardlinks in input directories, avoiding time-consuming copy operations. A transcoding workflow can process hardlinked files as if they were regular files, without waiting for large file transfers.
Understanding Hardlinks
Hardlinks differ from symbolic links (symlinks) in important ways. Understanding these differences helps you determine when Make Links is the right solution.
Aspect | Hardlink | Symbolic Link |
|---|---|---|
Storage | Same inode, zero additional space | Separate inode, small space for link pointer |
Data Relationship | Direct reference to data blocks | Pointer to a pathname |
Cross-Filesystem | Not supported (must be same filesystem) | Supported |
Broken Links | Cannot occur | Can break if target is moved or deleted |
Deletion Behavior | Data persists until all links removed | Target deletion breaks the link |
Application Transparency | Appears as regular file | Some applications detect symlinks |
Why Make Links Uses Hardlinks:
Make Links creates hardlinks because they provide storage efficiency with maximum resilience. Unlike symlinks, hardlinks cannot become "broken" if the original file is moved within the same filesystem. Applications treat hardlinked files identically to regular files, ensuring compatibility with any workflow.
Important Limitation: Source and destination paths must reside on the same filesystem. Hardlinks work by creating additional directory entries that point to the same inode, and inodes are filesystem-specific. If you need to link across different filesystems or mount points, you'll need to use a different approach such as symbolic links or file copies.
Requirements
Diskover Requirements
Requirement | Details |
|---|---|
Diskover Version | Current supported version |
License Tier | PRO+ (Professional Edition or higher) |
File Action Support | Must be enabled in Diskover configuration |
System Requirements
Requirement | Details |
|---|---|
Filesystem Access | Write permissions to create hardlinks at destination paths |
Same Filesystem | Source and destination must be on the same mounted filesystem |
Celery Workers | At least one worker configured with filesystem access to source and destination paths |
Installation & Setup
The Make Links file action is installed via RPM package into your Diskover environment.
1. Install the Package
dnf install diskover-file-actions-makelinks
2. Restart Services
Restart the Diskover Admin service on the Diskover Web host:
systemctl restart diskover-admin
Restart the Celery service on all Diskover Task Worker hosts:
systemctl restart celery
3. Configure the File Action
Navigate to Diskover Admin > Configuration > Plugins > File Actions > Make Links and configure the settings to match your environment's path structure (see Configuration section below).
4. Verify Setup
Log into the Diskover web interface
Navigate to an indexed location that matches your configured source path pattern
Select one or more files
Click File Actions in the toolbar
Confirm that Make Links appears in the menu
Configuration
Configuration is managed through the Diskover Admin interface at Diskover Admin > Configuration > Plugins > File Actions > Make Links.
Configuration Options
Setting | Default | Description |
|---|---|---|
|
| Display name shown in the File Actions menu |
|
| When enabled, individual files can be selected as sources |
|
| When enabled, directories can be selected as sources |
| See below | Regular expression pattern that source paths must match |
| See below | Jinja2 template for computing destination paths |
| See below | Named variables with replacement mappings |
|
| When enabled, continues processing if a destination already exists |
Understanding Path Matching
Make Links uses a three-stage process to determine where hardlinks are created:
Match — Validate the source path against the
source_path_matchregular expressionExtract — Capture named groups from the source path
Transform — Apply replacements and render the destination using the Jinja2 template
Configuration Best Practice: Design your source_path_match pattern to match as high in your directory tree as possible. This allows a single configuration to work across many subdirectories and file types, avoiding the need for multiple configurations.
Default Configuration Example
The default configuration is designed for a specific environment and must be customized to match your Diskover scan paths and organizational structure.
Default source_path_match:
^(?P<root>/Volumes)/(?P<filesystem>.*)??/(?P<subfolder>HA|DMC/Mastering)/(?P<rest>.*)$
Default destination:
{{root}}/{{filesystem}}/{{subfolder}}/
Default path_variables:
- name: subfolder
replacements:
HA: NHA/HL
DMC/Mastering: DMC/HL
This example configuration:
Matches paths under
/Volumescontaining eitherHAorDMC/MasteringfoldersCaptures the filesystem name and subfolder dynamically
Replaces
HAwithNHA/HLandDMC/MasteringwithDMC/HLin the destination
Example Path Transformation:
Source Path | Destination Path |
|---|---|
|
|
|
|
Custom Configuration Example
Here's an example for an organization with project-based storage that needs archive mirrors:
Scenario: Create hardlinks from /data/projects/ to /data/archive_mirror/ for compliance access.
source_path_match:
^(?P<root>/data)/(?P<area>projects)/(?P<path>.*)$
destination:
{{root}}/{{area}}_mirror/
path_variables:
- name: area
replacements:
projects: archive
Result:
Source Path | Destination Path |
|---|---|
|
|
|
|
Error Handling Configuration
The ignore_errors setting controls behavior when a destination path already exists:
Setting | Behavior |
|---|---|
| Skip existing files and continue processing remaining items |
| Stop and raise an error if any destination already exists |
For most use cases, leaving ignore_errors enabled is recommended. This allows you to re-run the file action on a selection that includes previously linked files without failures.
Usage Guide
Basic Workflow
Step 1: Select Files or Directories
In the Diskover web interface, navigate to the location containing the files you want to link. Use the checkboxes to select one or more files and/or directories.
[SCREENSHOT PLACEHOLDER: Diskover interface with files selected]
Step 2: Launch the File Action
Click the File Actions button in the toolbar, then select Make Links from the dropdown menu.
Step 3: Review the Confirmation Form
The Make Links confirmation form displays:
Field | Description |
|---|---|
Sources | List of selected file and directory paths (read-only) |
Assigned Worker | The Celery worker that will execute the task (read-only) |
Destination | The computed destination path based on your configuration (read-only) |
Review this information carefully to ensure the destination path is correct before proceeding.
Step 4: Submit
Click Submit to queue the hardlink creation task.
Step 5: Monitor Progress
After submission, you're redirected to the task status page which displays:
Task ID — Unique identifier for tracking
Status — PENDING, STARTED, SUCCESS, or FAILURE
Result — List of created hardlink paths upon success
Error — Error details if the task failed
Working with Directories
When you select a directory, Make Links recursively:
Creates the directory structure at the destination
Creates hardlinks for each individual file within the directory tree
This means a directory with hundreds of files will have each file individually hardlinked, while the directory structure is recreated (directories themselves cannot be hardlinked).
Tips for Efficient Workflows
Select at the highest useful level — If you need to link an entire project folder, select the folder rather than individual files to save time
Verify paths before large operations — For directories with many files, review the computed destination carefully before submitting
Check task results — If
ignore_errorsis enabled, review the result list to confirm all expected hardlinks were created
Troubleshooting
Common Issues
Issue | Cause | Solution |
|---|---|---|
"Invalid source" error | Source path doesn't match the configured | Verify your path structure matches the configured pattern, or update the configuration to match your environment |
"Files not allowed" message |
| Enable |
"Folders not allowed" message |
| Enable |
"Replacement not found" error | A captured path variable has no matching replacement defined | Add the missing replacement mapping to |
"Worker not set in session" error | No Celery worker assigned to your session | Refresh the Diskover web interface or verify workers are running |
"Invalid cross-device link" error | Source and destination are on different filesystems | Ensure both paths are on the same mounted filesystem |
Some hardlinks not created | Destination files already exist and | This is expected behavior; existing files are skipped |
Task fails on existing files |
| Remove existing destination files or enable |
Debug Logging
For detailed troubleshooting, enable verbose logging:
Diskover Admin logs:
/var/log/diskover/diskover-admin.log
Celery / Task Worker logs:
/var/log/celery/worker.log
Web Server logs (Nginx):
/var/log/nginx/error.log
Set the log level to DEBUG in your configuration for detailed output when diagnosing issues.
Verifying Filesystem Requirements
To confirm source and destination are on the same filesystem:
# Check filesystem for source path df /path/to/source # Check filesystem for destination path df /path/to/destination # Both commands should show the same filesystem/mount point
Testing Regex Patterns
To test whether your source_path_match pattern correctly matches your paths:
python3 -c "
import re
pattern = r'^(?P<root>/data)/(?P<area>projects)/(?P<path>.*)$'
path = '/data/projects/2024/report.pdf'
match = re.match(pattern, path)
if match:
print('Match successful!')
print('Captured groups:', match.groupdict())
else:
print('No match - check your pattern')
"
Support
Documentation: https://docs.diskoverdata.com
Support Portal: https://support.diskoverdata.com
Last Updated: January 2026
Diskover Data, Inc.
Comments
0 comments
Please sign in to leave a comment.