Let Windows Store System Images on NAS

Got a feature request? Great! Post your ideas here!
redreptionil
Posts: 18
youtube meble na wymiar Warszawa
Joined: Fri Jun 05, 2015 8:45 am

Let Windows Store System Images on NAS

Post by redreptionil »

I've got a AS5002T. When I try to tell Windows 10 (but I've seen posts about this happening going back to Windows 7) to store a System Image Backup to the NAS, it says:

"The backup failed.

There was a failure in preparing the backup image of one of the volumes in the backup set. (0x807800C5)

Additional Information:
The mounted backup volume is inaccessible. Please retry the operation. (0x8078004F)."

From my research, it seems the solution might be to add the following to the smb.conf file:

"strict allocate = yes"

According to:

https://www.samba.org/samba/docs/man/ma ... onf.5.html

"When this is set to yes the server will change from UNIX behavior of not committing real disk storage blocks when a file is extended to the Windows behavior of actually forcing the disk system to allocate real storage blocks when a file is created or extended to be a given size. In UNIX terminology this means that Samba will stop creating sparse files."

It goes on to say that with EXT4 file systems (which is what my AS5002T formatted my drive as), this shouldn't be a problem. However, making that change is beyond me (and, probably beyond most normal people). So, could you please add an option somewhere in the Control Center where we could just check a box to set this option?

Just for giggles, here's what I've found that I'd have to do to change that one line: enable ssh login in ADM, use ssh to login, change the directory and edit the file with vi. None of which means anything to me.

Looking at the Services app under Terminal, it looks like SSH has been defaulted on and only [root] and [admin] can use it (which is odd, since I keep seeing stuff about disabling logging on via root - but, I digress since what I know of Linux can only be expressed with negative numbers). According to:

https://amigotechnotes.wordpress.com/20 ... ble-files/

when I login:

"When use ssh to login, use ssh root@[IP] or some files won’t be executable or editable. The web admin must be login with port 8000 by default."

So, I assume it would be something like "ssh root@xxx.xxx.xxx.xxx:8000" (but that might be too easy).

According to that last reference, smb.conf is at /volume0/usr/builtin/etc/samba/smb.conf. So, I assume I'd:

"cd /volume0/usr/builtin/etc/samba"

and then:

"vi smb.conf"

Then, according to:

http://www.cs.colostate.edu/helpdocs/vi.html

I'd go to the last line of the file with:

:$<Return> or G

Hit "I" to insert text, type in "strict allocate = yes", and then hit [ESC] to stop inserting text. Then I'd save and exit with:

:x<Return>

Beats me how or if I would logoff the SSH session.
User avatar
orion
Posts: 3485
Joined: Wed May 29, 2013 11:09 am

Re: Let Windows Store System Images on NAS

Post by orion »

Bravo! You just touched the target.
I don't know what happened about the backup failure. I did not try System Image Backup in Windows.

You can type "ZZ" (two big Z) to save and exit vi. You can type "exit" in ssh to exit the shell. After you edited smb.conf, I think you should re-start the smb service under ADM web page -> Services -> Windows -> CIFS. Disable it, apply, enable it, apply again. Good luck.
User avatar
Kapitein Haak
Posts: 333
Joined: Tue Oct 15, 2013 2:40 pm
Location: Stranded on the Dutch coast.

Re: Let Windows Store System Images on NAS

Post by Kapitein Haak »

Hello DaveLessnau,

You could then logoff the SSH session. You would still need to go to services and diable / enable the Windows (Samba/CIFS) service. Restarting the service would allow the change to become active. Alternatively you could restart your NAS.
There is another way:
1. Logon to ADM, go to services, Terminal. Enable SSH and SFTP
2. Download WinScp http://winscp.net/, create a session with winscp to your NAS (default on port 22) and logon as root (same password as admin)
3. Now browse to the correct folder (/volume0/usr/builtin/etc/samba) located just above the files on the right side, rightclick smb.conf and edit the file (I think under the [Global] section), save the file
4. Dis- and enable the Windows service
5. Check the result
6. Disable SSH access and close the apps if you're satisfied

Let us know the result.

Best regards,
Kapitein Haak.
"What would the world be like without Captain Hook?"
---
"Homo sapiens non urinat in ventum" (A wise man doesn't piss into the wind), only in Amsterdam:
https://www.google.nl/maps/@52.36289,4. ... 312!8i6656
redreptionil
Posts: 18
Joined: Fri Jun 05, 2015 8:45 am

Re: Let Windows Store System Images on NAS

Post by redreptionil »

Well, I used Kapitein Haak's suggestion of winscp since it made the whole thing a lot easier. I restarted Samba under Services | Windows, but Windows System Image Backup still refused to store it's files on the server. Rebooted the server and all the computers here and it still doesn't work. I've double-checked that strict allocate = yes is still under the Global section of smb.conf.

I don't understand why it's not working. All over the web, I see people fixing this issue the very same way.

EDIT 1: It look like this might be a Windows 10 issue. I just tried the System Image Backup on a Windows 8.1 computer and it seems to be working fine.

EDIT 2: I also found another copy of smb.conf in etc.default (I assume that's the base version the OS uses on first setting things up). I added the strict allocate = yes there, too. No change.
redreptionil
Posts: 18
Joined: Fri Jun 05, 2015 8:45 am

Re: Let Windows Store System Images on NAS

Post by redreptionil »

Perhaps it's a Samba/SMB version problem? As best I can see, it looks like Windows 10 Build 10130 is using SMB 3.1.1. Anyone have any idea what version of Samba (and what SMB version it supports) is on the AS5002T?

EDIT:
  • In Windows 10 PowerShell, typing "dir \\localhost\c$" followed by "Get-SmbConnection -ServerName localhost" shows SMB 3.1.1
    In Windows 8 PowerShell, typing "dir \\localhost\c$" followed by "Get-SmbConnection -ServerName localhost" shows SMB 3.0.2
    Running smbstatus on the NAS shows Samba version 4.0.19
According to:

https://en.wikipedia.org/wiki/Samba_(software)

Support for SMB 3 didn't happen until Samba version 4.1. So, I suppose Windows 10's use of 3.1.1 could be the issue. But, I don't understand why Windows 8.1 (using SMB 3.0.2 works).So, Windows 10's use of 3.1.1 could be the issue.

So, if any of the stuff I'm finding is true, I'd like to modify my initial feature request of an easy-to-use "strict allocate = yes" checkbox to include an update to a later version of Samba (something that will support whatever Microsoft is doing in these new OSes with SMB).