Resource and Data Sharing


Any migration from UNIX to Windows requires the two environments to share data and resources. In the simplest case, UNIX servers migrate files to Windows-based servers. At the other end of the spectrum, UNIX servers and Windows-based servers share data and resources, such as printers, during and after migration.

This section presents the options for sharing resources between the two environments, concentrating on networked file systems. By using networked file systems, users of Windows or UNIX can manipulate files as though they were stored on a local file system.

Less integrated methods exist to transport files between systems, such as File Transfer Protocol (FTP) and removable media (for example, tape). These methods are not considered here because they do not provide interoperability. However, removable media and FTP can be very useful during the migration. Tape is particularly effective for transferring volumes of data too large to feasibly transfer across a network.

Developers or application users should be able to use the files they need in their target environment (Windows or Interix) transparently ; that is, they should not need to know whether the files are on a UNIX server or a Windows-based server. However, UNIX systems and Windows-based systems use different network protocols, functionality, and naming conventions for file sharing.

In Windows-based networks, the most common file-sharing protocol is server message block (SMB), also known as the common Internet file system (CIFS). The most common network file system on UNIX systems is the network file system (NFS). NFS and SMB protocols do not interoperate .

The following sections review the file-sharing environments in UNIX and Windows and the options for providing interoperability.

UNIX Data Sharing Environment

The network file system (NFS) protocol is a UNIX-style file system that can be shared over the network. NFS uses UNIX user identification, group identification, and permissions.

NFS uses the export naming convention, in which an exported file system is referred to by the host name and the export name . For example:

 server:/usr/local/pub 

where server is the host name and /usr/local/pub is the export name.

An NFS client mounts the NFS export into its file system tree just as it mounts any other file system. To the user, the network file system looks like another directory under the root of the file system (/).

For example, a mount command might look like this:

 mount t nfs server:/usr/local/pub /pub 

These features make NFS transparent to UNIX users.

NFS is used in many ways in UNIX environments. Servers can share common data by using NFS. Desktops or workstations can streamline administration by centralizing user data on an NFS server.

Windows Data Sharing Environment

The server message block (SMB) protocol ” or the common Internet file system (CIFS) as it is now known ” was designed to integrate transparently into Windows operating systems. It uses Windows security control identical to the features found on the NTFS or FAT file system. Available networked file systems are called shares . A Universal Naming Convention (UNC) name identifies the networked file. The UNC name consists of a server name and a share name, such as \\SERVER\SHARE.

On a client, a share maps to a drive letter in the same way as a disk partition or floppy disk; for example, X:\. Drivers can be mapped in a number of ways. The most basic way is to use the command-line utility net use . For example:

 net use X: \SERVER\SHARE 

It is also possible to mount shares just as UNIX mounts them. In this case, there is no need for a drive letter reference.

File-naming conventions and other features of the networked file system are the same as for other Windows file systems.

Like UNIX, Windows uses file system sharing. Servers can share and replicate file systems. Desktop clients can store all their data on a centralized server, thus simplifying administration.

Network File System Interoperability

The Windows and UNIX networked file systems are incompatible, but there are two ways in which they can interoperate. They can be configured with the other type of networked file system, or they can use a gateway to interoperate. Both Windows and UNIX can be configured to use the NFS and SMB protocols and to provide gateways between the two protocols. Additional software is usually required.

For interoperability, network file system software must provide basic functionality:

  • It must provide connectivity between the network client and the file server

  • It must translate between environments.

  • It must provide for security mapping between the two systems. (For more information, see User Authentication and Authorization earlier in this chapter.)

  • It must convert file system features between UNIX and Windows, for example, links and file locking.

File sharing between UNIX and Windows-based systems can be implemented in many ways. Figure 6.3 provides an overview of the options. Each of the interoperability solutions can be implemented either on a UNIX platform or on a Windows platform.

click to expand
Figure 6.3: File-sharing options for UNIX and Windows

The following combinations are commonly used (shown in Figure 6.3):

  • UNIX server provides SMB file shares to Windows clients and NFS file shares to UNIX clients. (Samba)

  • UNIX server provides NFS file shares to both Windows and UNIX clients. (For example, Windows Services for UNIX: Client for NFS)

  • Windows-based server provides SMB file shares to Windows clients and NFS file shares to UNIX clients. (For example, Windows Services for UNIX: Server for NFS)

  • Windows-based server provides SMB file shares to Windows and UNIX clients. (Samba)

Samba for Data Sharing

Samba is a suite of programs that emulate Windows networking (CIFS) on other operating systems. Samba can make UNIX act as a CIFS server or client.

In addition, Samba features can ease integration of the two environments. Samba can share printers and file systems, act as a WINS server, or integrate into Windows  NT domains and Windows Active Directory.

Samba is open source software, available on UNIX and many other platforms.

Note  

Samba is not the only product that emulates Windows networking on UNIX systems, but it is widely used. For detailed information about Samba, see the Samba Web site at http://www.samba.org.

Samba as a File Server

By using Samba as a file server, UNIX file systems can be shared to Windows clients and servers as though they were hosted on a Windows platform. During a migration, users can then transparently gain access to UNIX resources from the new environment.

Samba as an NFS to CIFS Gateway

NFS exports in a development or live environment can be converted into CIFS shares by using Samba. Samba can share any UNIX file system, including NFS mounted exports. This hides the NFS and UNIX nature of file systems from users in the Windows environment. Developers and users view the network using a Windows interface.

When Samba is used for data sharing, all workstations use native authentication protocols; that is, Windows Challenge/Response for the Windows-based workstation user, and NIS for the UNIX workstation user.

Samba User and Password Integration

To integrate, Samba maps credentials from the Windows to the UNIX environment, thereby obtaining NFS file and folder access based on UID and GID credentials, the native UNIX authorization mechanism. In other words, Samba takes credentials from the Windows client, validates them with a Windows domain controller, and then looks up the user name in the passwd or NIS map file by performing an NIS passwd query. If a match is found, Samba uses the UID and GID for the UNIX user to access files on the UNIX NFS server, just as if the user were local.

The advantage of this arrangement is that the passwords on the UNIX and Windows systems do not have to be the same. Only the user name must be the same on both systems. (Samba does provide tools for synchronizing passwords between UNIX and Windows.)

All users must have UNIX accounts on the server (in the /etc/passwd file) or accounts supplied by an NIS domain server of which the Samba server is an NIS client. If a user does not have an account and guest privileges are not enabled, access is denied to data on the UNIX servers. Therefore, all users require both a Windows and a UNIX account.

NFS for Data Sharing

For network file transfers that use NFS, NFS software must be running on the Windows-based server, or an NFS gateway must exist to convert an NFS export into a Windows share.

One system must be the NFS file server and the other must be the client. Often, because it probably already runs NFS, the UNIX side becomes the server. In this case, the Windows-based computer must run an NFS client program.

If files must be shared from a Windows-based server to UNIX clients, then it is easiest to set up the Windows-based system as the file server. The Windows-based server needs to have an NFS server on the systems that need to have NFS server software running.

NFS software products, including clients and servers, are available from Microsoft and others. The next sections discuss these products.

Windows Services for UNIX

Windows Services for UNIX provides the tools needed to set up sharing between UNIX and Windows-based systems. In addition to shells and command-line tools, Windows Services for UNIX delivers a server and a client for NFS and an NFS gateway. In addition, Windows Services for UNIX delivers User Name Mapping, which allows NFS access by using the user s Windows credentials.

The most straightforward way to set up NFS sharing is to install an NFS client on each client computer that needs access to NFS shares. By using the NFS client, users have access to files saved on NFS shares just as they have access to files on Windows-based servers. The same mechanisms used to map Windows shares can be used to map NFS shares. The share can be assigned a drive letter, or the client can access the share by using an UNC name. After the share is mapped, users have normal access to the files.

Authentication and Permissions

The Windows Services for UNIX NFS system uses User Name Mapping to authenticate the user to the server, whether or not the names match on both systems. Actual name mapping makes it possible to set up different schemes for allowing access to the NFS shares.

UNIX user names are case-sensitive, and Windows user names are not. Name mapping can handle this discrepancy by mapping names with uppercase letters to the UNIX convention of all lowercase letters .

Because User Name Mapping runs as a service, it requires a server set up on the network.

When Windows Services for UNIX NFS client software is being used to provide file sharing integration, each workstation client uses its native authentication protocol: Windows Challenge/Response for the Windows-based workstation user, and NIS for the UNIX workstation user. But the Windows Services for UNIX NFS Client uses the Windows Services for UNIX User Name Mapping Server to map the authenticated Windows user (by using the user SID) to a corresponding UNIX user name. It obtains the UID and GID to use for authorization (for example, file access permissions) in an NFS request to the NFS server. The Windows Services for UNIX User Name Mapping server functionality is essentially identical to the Samba server mapping function described previously.

Windows Services for UNIX Gateway for NFS

Gateway for NFS is another Windows Services for UNIX feature. In this case, the gateway computer communicates with the client computers by using the usual Windows file-sharing protocol. This eliminates the need to install the NFS client software on each client.

However, the best environment in which to use the gateway has a limited number of NFS shares that need to be available to the Windows clients. The server makes shares available as though they were shares on the gateway computer. Each share must be mapped to an available drive letter on the gateway computer. It is possible to use more than one gateway computer, but any single gateway computer is limited to the number of available drive letters.

Hummingbird NFS

The Hummingbird NFS Maestro suite offers NFS solutions similar to those in Windows Services for UNIX. NFS Maestro includes an NFS client package, an NFS server, and an NFS gateway product. The NFS Maestro gateway also eliminates the need to install NFS client software on each client computer.

For more information, see Host Access and Network Connectivity on the Hummingbird Web site at http://www.hummingbird.com .

WRQ Reflection

WRQ Reflection products also deliver NFS functionality for Windows-based computers. WRQ Reflection NFS Client offers client functionality, and WRQ Reflection Suite for X contains the NFS client, X Windows capabilities, and connectivity to UNIX and mainframe systems.

For more information, see the WRQ Web site at http://www.wrq.com .




UNIX Application Migration Guide
Unix Application Migration Guide (Patterns & Practices)
ISBN: 0735618380
EAN: 2147483647
Year: 2003
Pages: 134

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net