TSF – Giải pháp IT toàn diện cho doanh nghiệp SMB | HCM

P10 - Mount SMB Shares on TrueNas

🚀 TrueNAS P10 – Mount SMB Shares on Dragonfish (Step-by-Step Guide)

Mounting remote SMB shares is a critical skill when working with NAS environments. In this tutorial, I will guide you step by step on how to Mount SMB Shares on TrueNAS Dragonfish securely and correctly.

This guide covers:

  • Creating a shared folder on Windows

  • Configuring user permissions

  • Creating secure SMB credential files

  • Mounting SMB shares via CLI

  • Auto-mount configuration after reboot

If you are using TrueNAS, Proxmox, or Dragonfish in production or lab environments, this is essential knowledge for stable network storage integration.

By the end of this guide, you will fully understand how to mount SMB storage properly and avoid common permission or connection errors.


🧠 Why Mount SMB Shares on TrueNAS?

Mounting SMB shares allows your TrueNAS system to:

✅ Access remote Windows shared folders
✅ Backup data across systems
✅ Integrate hybrid storage environments
✅ Improve storage flexibility
✅ Support enterprise workflows

Without proper mounting configuration, data synchronization and backup strategies may fail or become unstable.


🛠 Step 1 – Create Shared Folder on Windows Client

Prepare Windows 10 Client

Client IP address:

 
 
192.168.16.134
 

Turn off Windows Firewall temporarily to avoid connection blocking issues during testing.


Create Shared Folder

Create a folder named:

 
 
ShareNFS
 

Enable sharing on this folder.


Create Local User and Set Permissions

Create a local Windows user:

 
 
sale01
 

Assign password:

 
 
Abc@1234
 

Set proper share permissions and NTFS permissions to allow access.

⚠ Make sure the user has at least read/write permission.

This completes the Windows-side preparation.


🔐 Step 2 – Mount SMB Folder to TrueNAS Dragonfish

Now we move to the TrueNAS system.


Switch to Root User

 
 
su
 

Root privileges are required for mounting and credential configuration.


Create SMB Credential File

 
 
nano /root/.smbcred
 

Add the following content:

 
 
username=sale01
password=Abc@1234
domain=TSF
 

Save and exit.


Secure the Credential File

Run the following command:

 
 
chmod 600 /root/.smbcred
 

This ensures that only the root user can read the file.

🔒 This is extremely important for password security.


Mount SMB Share via SSH on Dragonfish

Create mount directory:

 
 
mkdir -p /mnt/smbbackup
 

Mount the SMB share:

 
 
mount -t cifs //192.168.16.134/ShareNFS /mnt/smbbackup -o credentials=/root/.smbcred,nounix,iocharset=utf8
 

Explanation:

  • -t cifs → Specifies CIFS/SMB filesystem

  • credentials=/root/.smbcred → Secure authentication

  • nounix → Disables Unix extensions

  • iocharset=utf8 → Ensures proper character encoding

If configured correctly, the remote SMB share will now be accessible at:

 
 
/mnt/smbbackup
 

You can test by listing files:

 
 
ls /mnt/smbbackup
 

🔄 Step 3 – Automatically Mount SMB After Reboot

Manual mounting works, but production systems require persistence.

We will configure auto-mount on boot.


Go to TrueNAS GUI

Navigate to:

 
 
System Settings → Advanced → Init/Script
 

Add the following two commands:


Command 1 – Create Mount Directory

 
 
mkdir -p /mnt/smbbackup
 

Command 2 – Mount SMB Share

 
 
mount -t cifs //192.168.16.134/ShareNFS /mnt/smbbackup -o credentials=/root/.smbcred,nounix,iocharset=utf8
 

Save configuration.

Now, every time TrueNAS reboots, the SMB share will mount automatically.


⚡ Common Errors and Troubleshooting Tips

When trying to Mount SMB Shares on TrueNAS, you may encounter:

❌ Permission denied
→ Verify Windows share permissions and NTFS permissions.

❌ Mount error(13): Permission denied
→ Double-check username, password, and domain.

❌ Network unreachable
→ Verify IP address and firewall settings.

❌ Encoding problems
→ Ensure iocharset=utf8 is included.


📈 Performance and Stability Tips

To stabilize SMB connections:

  • Use static IP addresses

  • Avoid DNS dependency if not configured

  • Keep credentials secured

  • Monitor mount status periodically

  • Consider network bonding in production

Proper configuration significantly improves performance and reduces unexpected disconnections.


🎯 Final Result

After completing this guide, you have successfully learned how to:

✅ Mount SMB Shares on TrueNAS Dragonfish
✅ Secure credentials properly
✅ Enable automatic mounting after reboot
✅ Troubleshoot common issues
✅ Optimize network storage integration

This configuration is practical for:

  • IT Helpdesk

  • System Administrators

  • Home Lab Users

  • Enterprise NAS Environments


📌 Conclusion

Understanding how to Mount SMB Shares on TrueNAS is fundamental for any IT professional working with network storage.

With just a few secure commands, you can integrate Windows shares into TrueNAS seamlessly.

This technique improves backup strategies, enhances flexibility, and supports hybrid storage architectures.

If you are working with TrueNAS, Proxmox, or Dragonfish, mastering SMB mounting is not optional — it is essential.

See also related articles

P21 – Effortless WordPress TrueNAS Setup Guide

P21 – Effortless WordPress TrueNAS Setup Guide 🚀 TrueNAS P21 – WordPress TrueNAS Apps Demo Deploy WordPress Easily (No Docker Skills Needed) Deploying WordPress on a NAS no longer requires deep Docker knowledge or complex manual configurations. With WordPress TrueNAS Apps, you can launch a fully functional WordPress instance directly...

Read More

P20 – Essential ZFS Disk Scrubbing Best Practices Guide

P20 – Essential ZFS Disk Scrubbing Best Practices Guide 🚀 TrueNAS – P20: ZFS Disk Scrubbing – Step-by-Step Configuration & Best Practices Maintaining data integrity is one of the most important responsibilities of any storage administrator. Even enterprise-grade disks can develop silent data corruption over time. This is where ZFS...

Read More

P18 – Ultimate MFA TrueNAS Security Setup Guide

P18 – Ultimate MFA TrueNAS Security Setup Guide 🚀 TrueNAS – P18: Secure TrueNAS with MFA (Google Authenticator) – Full Configuration Tutorial Security is critical for any production storage system. A strong password alone is no longer enough. If credentials are leaked, brute-forced, or reused elsewhere, your entire NAS infrastructure...

Read More