by Sven Köster
What is a NAS
August 11, 2014 – The term NAS (network attached storage) is used by vendors in a broad sense. There are low class NAS systems that are not up to the job of providing professional backup quality , performance and capacity wise, but there are professional NAS systems as well that are.
Connecting to a NAS
One of the most important factors with a NAS is how it is connected to the host. It is clear that the Network attached storage is attached via the Network, but …
The ideal way for high data loads as produced by backup is via iSCSI, which is SCSI via Ethernet. Now that is not supported by all NAS systems, and it requires a so called iSCSI initiator, which is not included with Mac OS X. Also, only one host can connect to the NAS with iSCSI, for all others the NAS is then inaccessible.
ISCSI connected storage means that the host controls the file system on the NAS, so this behaves, with exception of the speed, same as a local disk on the host that it is connected to.
An alternative to iSCSI is to access the NAS via a network file system protocol, like AFP, SMB, CIFS or NFS. Read more about that below.
The second consideration when connecting to a NAS is the Network connection. The NAS shares its line with other network communication, and a backup may create high data loads. This may lead to network connection problems and/or bad reaction times on other network services during a backup. Because of that, it may be worth thinking about setting up a separate LAN segment between the NAS and the host(s) that need to access it. In its extreme case, that is a direct cable between the backup host and the NAS.
Using Network Shares
Network shares based on NFS, SMB and other network file systems have several limitations. Files “seen” through such a network protocol may thus loose some attributes. Which attributes are lost depends on the OS in use, the provided file system over the network and the underlying file system the NAS uses to store the data. If in doubt, we suggest to check what you get in your specific environment.
P5 uses standard mechanisms for file system access also on network shares, it thus cannot differentiate whether a file has no attribute or whether the network share just does not expose it …
As an example, the SMB/CIFS shares were originally developed for the Windows world and thus cannot completely represent file permissions of other operating systems.
Using a NAS in a heterogeneous Environment
Sharing files between different operating systems looks easy on a NAS, but in fact it conceals a special challenge. When looking at the details, each operating system has its own way to represent files on a file system, and these are not necessarily compatible.
The most picky OS regarding filenames is probably Windows:
-
Control characters 0x01 to 0x1F are not supported in file names.
-
The characters “ * ? < > / \ | are not supported in file names.
-
File names may not end with a period or a blank
This implies that it is no problem to write with a Mac or a Linux host files that the Windows host cannot handle. Namely files ending with a space are common on Mac but inaccessible on Windows.
Apple OS X in turn sees the world in “stereo”: OS X handles extended file attributes and other information in a separate part of the file, the resource fork as opposed to the data fork that holds the regular data. In case a file system cannot handle resource forks, OS X switches to the so-called Apple-Double format, that is: it writes two files; a regular file and one with a ._ prefix that represents the resource fork. Any other operating system however sees these as two different and independent files. Moving away or renaming one part may then result in loosing the other part of the file…
There is another common problem in heterogeneous environments, well known in the non-English speaking countries where the alphabet contains umlauts, accents or other characters that do not belong to the 7 bit ASCII code.
Such characters are represented differently by different operating systems: Windows uses the UTF-16 character set and writes a special character as two bytes. Unix and OS X use the UTF-8 character set and write three different characters instead, where the Mac uses a slightly different variant, combined UTF-8. Unfortunately, the file name can be read correctly only in case the character set is known.
P5 is intelligent in so far that it attempts to convert file names correctly between different platforms. It expects UTF-16 characters on Windows and UTF-8 characters on OS X and Linux. For a NAS, that means files written by a Mac may be misinterpreted when read from a windows machine and the other way around. To overcome that, we suggest to use a file server program that converts file names correctly between different systems (for instance Extreme-Z-IP for Windows) and not to share the same NAS partition between different operating systems.
Backup2Go Repository on a NAS
Using a NAS as Repository for Backup2Go is a very bad idea.
Any network file system has a high latency, as any operating system call to access the file must be transferred over the network and back, regardless whether concerning the actual data or only the file’s attributes.
Backup2Go intensively uses links and scans directories very often. This only works well on drives with low latency, like built in drives or direct attached storage (DAS).
Backup onto a NAS
Writing a Backup onto a NAS works well, as there are big container files to be written, so the latency does not play a role. However, care must be taken as to the maximum supported file size. SMB drives often allow 2 GB or 4 GB maximum size, so you must reconfigure the Backup setup to use many smaller container files, instead of the default larger ones.
Accessing a NAS with P5 on Windows
On Windows, network drives are mounted per user instead of system wide. Since P5 is installed as a Service and thus runs in the environment of the Local System Authority account, the user mounted network shares are not seen and must be mounted for the global use on the system first. The following KB article shows how:
https://www.archiware.com/support/index.php?/Knowledgebase/Article/View/182/0/how-to-back-up-a-network-drive-on-windows
NAS for Linux freaks
As some NAS devices use a PC architecture and run with Linux, it may be possible in that case to run P5 on the NAS itself and access it via Web browser or as a P5 client.
Archiware cannot guarantee that this is possible at all, but we have seen some successful installations. In case you want to check whether that is possible and invest some time in the NAS, we suggest to check the following details on the NAS:
-
The hardware must be x86 compatible or x64 compatible with 32 bit support.
-
The kernel version must be at least 2.6.4
-
Execute /lib/libc.so.6 and check whether you get a line starting with
“Native POSIX Threads Library …”
Please also check whether the Linux distribution is listed in section 3.6.7 of the P5 Manual. On some distributions, specific steps are required.