Messed up sharing - no longer works in batch file?

Status
Not open for further replies.

PhxAZCraig

Cadet
Joined
Oct 15, 2018
Messages
4
Long time Freenas user. Built a box several years ago, using Freenas 8 point something, eventually upgraded to 9.3 and left alone for a couple of years. Nothing special here - three 4TB SATA drives set up with a ZFS raid5 config and a DOS share to it. I am booting from a USB stick.

All I am doing is running a batch file every night at 2am to robocopy all my files under D:photos to Freenas. Target is q:\photos. I have a simple batch file running on my (Windows 10) PC at 2am. Here is the relevant part:

rem Q:=\\NAS3\nas_images
net use q: \\nas3\nas_images
robocopy d:\photos Q:\photos /E /XO /TIMFIX /FFT /xf d:\pagefile.sys /xd d:\database d:\nxcache d:\temp d:\temp2 d:\$recycle.bin d:\recycler "d:\System Volume Information"

This worked for several years, from Windows 7 to in-place upgrading to Windows 10. I've run the batch file on my laptop as well, when I had some vacation photos to back up.

This week I noticed how out of date it was, and I tried upgrading it to 11.2 stable. All sorts of woes ensued. (Off topic - why does a STABLE release show a bunch of components with BETA in them?)

The upgrade went very slowly, seeming to hang for a long time at 60/20% in the progress indicator. But eventually it completed (more than 30 minutes?)

I ended up at 11.3.something-with-beta-in-the name. I thought the NAS was broken, because it stalled for a long time booting up. Turns out it just got extremely slow - boot times over an hour. Once up, login to the new interface wasn't bad, but pulling up anything on the dashboard or other menus was extremely slow - dashboard takes over 15 minutes to fill out. After fiddling with things for a while, I ended up backing off to 9.3, where almost everything came back ok (in terms of speed). I then upgraded 9.3/9.10 to latest patches (for 9.10).

Now, if I use Windows GUI to map a drive, it works fine. I can browse and see all my files. But my batch file no longer works. It maps the drive, but I cannot see any files. (I can change directories though). When I try to do something like a DIR command, in a DOS window, I get a bunch of these error messages, for each file or directory in my mapped Q drive.

"The system cannot find message text for message number 0x2373 in the message file for Application."

So this is something going wrong with commands issued in a CMD prompt, but not when using File Explorer in Windows. It means my nightly batch file backup system is now broken. What do I need to do to fix this?

Craig
 

gpsguy

Active Member
Joined
Jan 22, 2012
Messages
4,472
Instead of using the server name (NAS3) in your batch file, try using the IP address instead.

If you haven’t upgraded your pool, you might want to roll back to your old version of FreeNAS. As you have now learned, you upgraded to an 11.2 beta version. Unfortunately, it’s not clear to most users, what STABLE means. Here, it’s referring to the version of FreeBSD that FreeNAS is using. Given the number of users who have run into this issue, iXsystems will channge their naming schemes for betas, after 11.2 is released.
 

PhxAZCraig

Cadet
Joined
Oct 15, 2018
Messages
4
Instead of using the server name (NAS3) in your batch file, try using the IP address instead.

If you haven’t upgraded your pool, you might want to roll back to your old version of FreeNAS. As you have now learned, you upgraded to an 11.2 beta version. Unfortunately, it’s not clear to most users, what STABLE means. Here, it’s referring to the version of FreeBSD that FreeNAS is using. Given the number of users who have run into this issue, iXsystems will channge their naming schemes for betas, after 11.2 is released.

Well, I couldn't see why using an IP address would have any effect here. After all, the drive mapping occurs just fine. It's the access once there that is a problem. I can even change directories - I just can't see or copy any file in a DOS window or with the batch file. This is the same batch file that worked for several years to the same server. It's only broken since I went to 11.2, and then back to 9.10. But I tried it anyway. Mapping occurs fine, access fails. It doesn't look like a name resolution issue to me. I have my own DNS servers here, and NAS3 resolves fine.

It's only in DOS mode that I seem to have issues.
 

garm

Wizard
Joined
Aug 19, 2017
Messages
1,556
Instead of mapping drive letters to network shares ( I hate drive letters..) try running robocopy towards the shares UNC path (eg \\NAS3\nas_images\photos)
 

PhxAZCraig

Cadet
Joined
Oct 15, 2018
Messages
4
Instead of mapping drive letters to network shares ( I hate drive letters..) try running robocopy towards the shares UNC path (eg \\NAS3\nas_images\photos)

Same as before - access is denied.

Changing from name to IP address is only going to be useful in one area - name resolution issues. This is not a name resolution issue.

I am using the same batch file that worked for years on Freenas 9.3. It no longer works, after attempting to upgrade to 11.2, downgrading to 9.3 and patching up to 9.10. I did not upgrade the ZFS file system. I did not change anything on the Windows side.

This is a permissions issue. Researching more down that path now.
 

PhxAZCraig

Cadet
Joined
Oct 15, 2018
Messages
4
OK, it's working again, and of course I'm not 100% sure just what change I made fixed it. However, it was probably creating a dataset within the volume I'm sharing (at the root) and setting permissions there. I had no dataset at all before, and it worked, so maybe that wasn't what fixed it, but I can't remember all the other little things I tried changing.
 
Status
Not open for further replies.
Top