Trying to use mount_smbfs between two TrueNAS devices, does not work.

manusamoa

Dabbler
Joined
Jul 23, 2019
Messages
15
I have 2 TrueNAS servers running 13.0-U1.1 I am trying to mount a directory from one to another. I used smbclient on the one with the directory and go the following:
smbclient -L spixey -U-"root"
Passord for [WORKGROUP\root]:

Sharename Type Comment
------------- ------- ---------------
IPC$ IPC IPC Service (TrueNAS Server)
Spixey Disk
SMB1 disabled -- no workgroup available

and when I try to mount on the newer on with:

mount_smbfs -I 192.168.3.14 //root@192.168.3.14/mnt/Spixey /mnt/Spixey
Password: <enter password>
mount_smbfs: unable to open connection: syserr = RPC struct is bad

I am fairly new to Linux, so not sure what I am doing wrong. Any help would be appreciated.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
I am fairly new to Linux, so not sure what I am doing wrong.
First, mistaking TrueNAS for Linux; CORE is based on FreeBSD, not Linux. Second, trying to use your NAS as a client for a file server--it really isn't designed to do that. But if you for some reason need to, it'd be much better and easier to share the directory in question via NFS and mount it that way.
 

manusamoa

Dabbler
Joined
Jul 23, 2019
Messages
15
First, mistaking TrueNAS for Linux; CORE is based on FreeBSD, not Linux. Second, trying to use your NAS as a client for a file server--it really isn't designed to do that. But if you for some reason need to, it'd be much better and easier to share the directory in question via NFS and mount it that way.
Thank You danb35, I do have the directory shared using NFS and can access them from my PC fine. What I am trying to do is transfer TB of information from one NAS server to the other without using my Windows box. Just getting it transferred one way so I could reconfigure my older NAS took almost a week. I do not want to wait that long again unless I have to. I thought using mount_smbfs would be faster.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
I thought using mount_smbfs would be faster.
Why would you expect transferring the data between the two using SMB would be faster than transferring it between the two using NFS? I'd expect them to go at roughly the same speed. But if you're wanting to transfer a significant amount of data from one NAS to the other, replication might be a better way to do it--and you can do that all from the GUI.
 

manusamoa

Dabbler
Joined
Jul 23, 2019
Messages
15
danb35, as I said I am very new to this. I would love to learn more and I am unfamiliar with the GUI. Can you direct me to where I could this to the GUI? One reason I do not want to use windows is because I usually shut them down every night but the NAS run constantly.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
I do not want to use windows
Who said anything about using Windows? I'm suggesting you share a directory on one NAS using NFS, and mount that on the other NAS. Windows has nothing to do with it.
I am unfamiliar with the GUI. Can you direct me to where I could this to the GUI?
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399

Basically, it depends on the direction of replication.
Sending TrueNAS serverReceiving TrueNAS server
1. Configure automatic snapshots of the dataset being replicated. See https://www.truenas.com/docs/core/uireference/tasks/periodicsnapshottasks/1. Configure SSH service
  • Note, if you're going to use root to replicate, disable 2FA on the receiving server
  • Configure the SSH service under Services->SSH to allow root to login
2. Verify you can manually SSH from the sending to the receiving server using SSH keys2. Verify you can manually SSH from the sending to the receiving server using SSH keys
  • Copy the sending server's root SSH public key to the receiving server's /root/.ssh/authorized_keys file.
  • Make sure /root/.ssh/authorized_keys has permissions 600
3. Create the replication task
  • Specify the source dataset
  • Specify the remote destination receiving dataset.
  • Reference your periodic snapshot task
  • Configure the destination replica to not be read-only
4. Run the replication task4. Monitor the destination dataset
 

manusamoa

Dabbler
Joined
Jul 23, 2019
Messages
15

Basically, it depends on the direction of replication.
Sending TrueNAS serverReceiving TrueNAS server
1. Configure automatic snapshots of the dataset being replicated. See https://www.truenas.com/docs/core/uireference/tasks/periodicsnapshottasks/1. Configure SSH service
  • Note, if you're going to use root to replicate, disable 2FA on the receiving server
  • Configure the SSH service under Services->SSH to allow root to login
2. Verify you can manually SSH from the sending to the receiving server using SSH keys2. Verify you can manually SSH from the sending to the receiving server using SSH keys
  • Copy the sending server's root SSH public key to the receiving server's /root/.ssh/authorized_keys file.
  • Make sure /root/.ssh/authorized_keys has permissions 600
3. Create the replication task
  • Specify the source dataset
  • Specify the remote destination receiving dataset.
  • Reference your periodic snapshot task
  • Configure the destination replica to not be read-only
4. Run the replication task4. Monitor the destination dataset
Thank You Samuel, I will research this and give a try. It looks like a good learning experience for me.
 
Top