Using Microsoft Windows file shares – Amazon FSx for Windows File Server

Using Microsoft Windows file shares

A Microsoft Windows file contribution is a specific booklet in your file system. It includes that folder ‘s subfolders, which you make accessible to your calculate instances with the Server Message Block ( SMB ) protocol. Your file system comes with a default option Windows file share, named share. You can create and manage american samoa many other Windows file shares as you want by using the Windows graphic drug user interface ( GUI ) instrument named Shared Folders .

Accessing file shares

To access your file shares, you use the Windows Map Network Drive functionality to map a force letter on your calculate case to your Amazon FSx file partake. The action of mapping a file share to a drive on your calculate exemplify is known as mounting a file share in Linux. This process differs depending on the type of calculate example and the manoeuver system. After your file share is mapped, your applications and users can access files and folders on your file contribution as if they are local files and folders .
Following are procedures for mapping a charge share on the different supported calculate instances.

Mapping a file share on an Amazon EC2 Windows instance

You can map a file plowshare on an EC2 Windows case by using the Windows File Explorer or the command prompt .

  1. Launch the EC2 Windows exemplify and connect it to the Microsoft Active Directory that you joined your Amazon FSx file system to. To do this, choose one of the following procedures from the AWS Directory Service Administration Guide :

    • Seamlessly join a Windows EC2 exemplify
    • manually join a Windows case
  2. Connect to your EC2 Windows example. For more information, see Connecting to your Windows exemplify in the Amazon EC2 User Guide for Windows Instances .
  3. After you ‘re connected, open File Explorer .
  4. In the seafaring paneling, open the context ( right-click ) menu for Network, and choose Map Network
    Drive
    .
  5. For Drive, choose a force letter .
  6. For Folder, figure either the file system ‘s DNS appoint or a DNS alias associated with the file system, and the share name .
    You can find the charge system ‘s DNS name and any associate DNS aliases on the Amazon FSx cabinet by choosing Windows File Server, Network &
    security
    . Or, you can find them in the response of the CreateFileSystem or DescribeFileSystems API operation. For more information about using DNS aliases, see Managing DNS aliases .

    • For a Single-AZ file system joined to an AWS Managed Microsoft Active Directory, the DNS name looks like the follow .
      fs-0123456789abcdef0.ad-domain.com
    • For a Single-AZ file system joined to a self-managed Active Directory, and any Multi-AZ file system, the DNS diagnose looks like the play along .
      amznfsxaa11bb22.ad-domain.com

    For example, to use a Single-AZ file system ‘s DNS name, enter the follow for Folder .

    \\fs-0123456789abcdef0.ad-domain.com\share

    To use a Multi-AZ file system ‘s DNS appoint, enter the follow for Folder .

    \\famznfsxaa11bb22.ad-domain.com\share

    To use a DNS alias associated with the file system, enter the following for Folder .

    \\fqdn-dns-alias\share
  7. Choose an option for Reconnect at sign-in, which indicates whether the file contribution should reconnect at sign-in, and then choose Finish .
  1. Launch the EC2 Windows case and connect it to the Microsoft Active Directory that you joined your Amazon FSx file system to. To do this, choose one of the follow procedures from the AWS Directory Service Administration Guide :

    • Seamlessly join a Windows EC2 example
    • manually join a Windows exemplify
  2. Connect to your EC2 Windows example as a user in your AWS Managed Microsoft AD directory. For more information, see Connecting to your Windows example in the Amazon EC2 User Guide for Windows Instances .
  3. After you ‘re connected, open a command prompt window .
  4. Mount the charge plowshare using a tug letter of your option, the file arrangement ‘s DNS name, and the share name. You can find the DNS name using the Amazon FSx comfort by choosing Windows File
    Server
    , Network & security. Or, you can find them in the answer of the CreateFileSystem or DescribeFileSystems API operation .

    • For a Single-AZ file organization joined to an AWS Managed Microsoft Active Directory, the DNS name looks like the stick to .
      fs-0123456789abcdef0.ad-domain.com
    • For a Single-AZ file system joined to a self-managed Active Directory, and any Multi-AZ file system, the DNS list looks like the follow .
      amznfsxaa11bb22.ad-domain.com

    The follow is an example command to mount the file partake .

    $ net use H: \\amzfsxaa11bb22.ad-domain.com\share /persistent:yes

    rather of the net use command, you can besides use a PowerShell command to mount a charge contribution .

Mounting a file share on an Amazon EC2 Mac instance

You can mount a file partake on an Amazon EC2 Mac example that is either joined to your active directory or not joined. If the example is not joined to your Active directory, be sure to update the DHCP options set for the Amazon Virtual Private Cloud ( Amazon VPC ) in which the case resides to include the DNS name servers for your active directory sphere. then relaunch the case .

Mounting a file share on an Amazon EC2 Linux instance

You can mount an FSx for Windows File Server file parcel on an Amazon EC2 Linux exemplify that is either joined to your active directory or not joined .

Note

The pursue commands pin down parameters such as SMB protocol, hoard, and read and spell buff size as examples only. Parameter choices for the Linux cifs control, adenine well as the Linux kernel version used, can impact throughput and latency for network operations between the customer and the Amazon FSx file arrangement. For more information, see cifs software documentation for the Linux environment you are using .

  1. If you do n’t already have a running EC2 Linux exemplify joined to your Microsoft Active Directory, see manually join a Linux example in the AWS Directory Service Administration Guide for the instructions to do then .
  2. Connect to your EC2 Linux case. For more information, see associate to your Linux case in the Amazon EC2 User Guide for Linux Instances .
  3. Run the follow command to install the cifs-utils software. This package is used to mount net file systems like Amazon FSx on Linux .

    $ sudo yum install cifs-utils
  4. Create the hop on point directory /mnt/fsx. This is where you will mount the Amazon FSx file system .

    $ sudo mkdir -p /mnt/fsx
  5. Authenticate with kerberos using the keep up command .

    $ kinit
  6. Mount the file share with the follow command .

    $ sudo mount -t cifs //file_system_dns_name/file_share mount_point --verbose -o vers=SMB_version,sec=krb5,cruid=ad_user,rsize=CIFSMaxBufSize,wsize=CIFSMaxBufSize,cache=none,ip=preferred-file-server-Ip

    You can find the DNS name on the Amazon FSx console by choosing Windows File Server, Network & security. Or, you can find them in the reply of CreateFileSystem or DescribeFileSystems API operation .

    • For a Single-AZ charge system joined to an AWS Managed Microsoft Active Directory, the DNS mention looks like the trace .
      fs-0123456789abcdef0.ad-domain.com
    • For a Single-AZ file system joined to a self-managed Active Directory, and any Multi-AZ file system, the DNS name looks like the take after .
      amznfsxaa11bb22.ad-domain.com

    Replace CIFSMaxBufSize with the largest measure allowed by your kernel. Run the pursuit command to get this value .

    $ modinfo cifs | grep CIFSMaxBufSize
    parm:           CIFSMaxBufSize:Network buffer size (not including header). Default: 16384 Range: 8192 to 130048 (uint)

    The output shows that the maximum buffer size is 130048 .

  7. Verify that the charge system is mounted by running the pursue command, which returns only file systems of the Common Internet File System ( CIFS ) type .

    $ mount -l -t cifs
    //fs-0123456789abcdef0/share on /mnt/fsx type cifs (rw,relatime,vers=SMB_version,sec=krb5,cache=cache_mode,username=user1@CORP.NETWORK.COM,uid=0,noforceuid,gid=0,noforcegid,addr=192.0.2.0,file_mode=0755,dir_mode=0755,soft,nounix,serverino,mapposix,rsize=1048576,wsize=1048576,echo_interval=60,actimeo=1)

The hop on command used in this operation does the following at the given points :

  • //file_system_dns_name/file_share – Specifies the DNS name and partake of the charge organization to mount .
  • mount_point – The directory on the EC2 example that you are mounting the file system to .
  • -t cifs vers=SMB_version – Specifies the type of file system as CIFS and the SMB protocol version. Amazon FSx for Windows File Server supports SMB versions 2.0 through 3.1.1 .
  • sec=krb5 – Specifies to use Kerberos translation 5 for authentication .
  • cache=cache_mode – Sets the cache mode. This option for CIFS hoard can impact performance, and you should test which settings exercise well ( and review Linux documentation ) for your kernel and workload. Options strict and none are recommended, because loose can cause data inconsistency ascribable to the lax protocol semantics .
  • cruid=ad_user – Sets the uid of the owner of the credentials cache to the AD directory administrator .
  • /mnt/fsx – Specifies the wax distributor point for the Amazon FSx file share on your EC2 exemplify .
  • rsize=CIFSMaxBufSize,wsize=CIFSMaxBufSize – Specifies the read and write buffer size as the maximum allowed by the CIFS protocol. Replace CIFSMaxBufSize with the largest prize allowed by your kernel. Determine the CIFSMaxBufSize by running the follow command .

     $ modinfo cifs | grep CIFSMaxBufSize
    parm:           CIFSMaxBufSize:Network buffer size (not including header). Default: 16384 Range: 8192 to 130048 (uint)

    The output shows that the utmost cushion size is 130048 .

  • ip=preferred-file-server-Ip – Sets the finish IP address to that of the file system ‘s preferred file waiter .
    You can retrieve the file organization ‘s preferred file server IP address as follows :

    • Using the Amazon FSx cabinet, on the Network & security pill of the File system details page .
    • In the reply of the describe-file-systems CLI instruction or the equivalent DescribeFileSystems API dominate .

The following routine mounts an Amazon FSx file share to an Amazon EC2 Linux example that is not joined to your active Directory ( AD ). For an EC2 Linux case that is not joined to your Active directory, you can only mount an FSx for Windows File Server file share by using its private IP address. You can get the file system’s private IP address using the Amazon FSx console, on the Network & security check, in Preferred File Server
IP Address
. This exercise uses NTLM authentication. To do this, you mount the charge system as a drug user that is a penis of the Microsoft Active Directory sphere that the FSx for Windows File Server file system is joined to. The credentials for the drug user report are provided in a text file that you create on your EC2 case, creds.txt. This charge contains the exploiter name, password, and sphere for the drug user .

$ cat creds.txt
username=user1
password=Password123
domain=EXAMPLE.COM

To launch and configure the Amazon Linux EC2 instance

  1. Launch an Amazon Linux EC2 case using the Amazon EC2 cabinet. For more information, see Launch an exemplify in the Amazon EC2 User Guide for Linux Instances .
  2. Connect to your Amazon Linux EC2 example. For more information, see connect to your Linux case in the Amazon EC2 User Guide for Linux Instances .
  3. Run the adopt command to install the cifs-utils box. This box is used to mount network file systems like Amazon FSx on Linux .

    $ sudo yum install cifs-utils
  4. Create the mount point /mnt/fsxx where you plan to mount the Amazon FSx file system .

    $ sudo mkdir -p /mnt/fsx
  5. Create the creds.txt credentials file in the /home/ec2-user directory, using the format shown previously .
  6. Set the creds.txt file permissions so that alone you ( the owner ) can read and write to the file by running the comply command .

    $ chmod 700 creds.txt

To mount the file system

  1. You mount a file share not joined to your active directory by using its private IP address. You can get the charge system ‘s private IP address using the Amazon FSx comfort, on the Network &
    security
    tab, in the Preferred File Server IP
    Address
    .
  2. Mount the file system using the following command :

    $ sudo mount -t cifs //file-system-IP-address/file_share /mnt/fsx --verbose -o vers=SMB_version,sec=ntlmsspi,cred=/home/ec2-user/creds.txt,rsize=CIFSMaxBufSize,wsize=CIFSMaxBufSize,cache=none

    Replace CIFSMaxBufSize with the largest rate allowed by your kernel. Run the follow command to get this value .

    $ modinfo cifs | grep CIFSMaxBufSize
    parm:           CIFSMaxBufSize:Network buffer size (not including header). Default: 16384 Range: 8192 to 130048 (uint)

    The end product shows that the maximum buff size is 130048 .

  3. Verify that the file organization is mounted by running the keep up command, which returns only CIFS file systems .

    $ mount -l -t cifs
    //file-system-IP-address/file_share on /mnt/fsx type cifs (rw,relatime,vers=SMB_version,sec=ntlmsspi,cache=cache_mode,username=user1,domain=CORP.EXAMPLE.COM,uid=0,noforceuid,gid=0,noforcegid,addr=192.0.2.0,file_mode=0755,dir_mode=0755,soft,nounix,serverino,mapposix,rsize=1048576,wsize=1048576,echo_interval=60,actimeo=1)

The mount command used in this operation does the following at the given points :

  • //file-system-IP-address/file_share – Specifies the IP address and share of the file organization to mount .
  • -t cifs vers=SMB_version – Specifies the type of file system as CIFS and the SMB protocol translation. Amazon FSx for Windows File Server supports SMB versions 2.0 through 3.1.1 .
  • sec=ntlmsspi – Specifies to use NT LAN Manager Security Support Provider Interface ( NTLMSSPI ) for authentication .
  • cache=cache_mode – Sets the cache mode. This choice for CIFS cache can impact performance, and you should test which settings workplace well ( and review Linux documentation ) for your kernel and workload. Options strict and none are recommended, because loose can cause data incompatibility ascribable to the loose protocol semantics .
  • cred=/home/ec2-user/creds.txt – Specifies where to get the exploiter credentials .
  • /mnt/fsx – Specifies the saddle horse degree for the Amazon FSx file share on your EC2 example .
  • rsize=CIFSMaxBufSize,wsize=CIFSMaxBufSize – Specifies the read and compose buffer size as the maximum allowed by the CIFS protocol. Replace CIFSMaxBufSize with the largest prize allowed by your kernel. Determine the CIFSMaxBufSize by running the be command .

    $ modinfo cifs | grep CIFSMaxBufSize
    parm:           CIFSMaxBufSize:Network buffer size (not including header). Default: 16384 Range: 8192 to 130048 (uint)

    The output shows that the utmost fender size is 130048 .

Automatically mounting file shares on an Amazon Linux EC2
instance not joined to your Active Directory

You can automatically mount your FSx for Windows File Server file plowshare whenever the Amazon EC2 Linux exemplify to which it ‘s mounted reboots. To do so, add an entry to the /etc/fstab file on the EC2 case. The /etc/fstab file contains information about file systems. The command mount -a, which runs during case inauguration, mounts the file systems listed in the /etc/fstab file .
For an Amazon Linux EC2 exemplify that is not joined to your Active directory, you can only mount an FSx for Windows File Server charge contribution by using its private IP address. You can get the file organization ‘s private IP address using the Amazon FSx console table, on the Network & security tab key, in Preferred File Server
IP Address
.
The following routine uses Microsoft NTLM authentication. You mount the file system as a exploiter that is a extremity of the Microsoft Active Directory domain to which the FSx for Windows File Server file arrangement is joined. The credentials for the exploiter account are provided in the text file creds.txt. This file contains the exploiter name, password, and domain for the drug user .

$ cat creds.txt
username=user1
password=Password123
domain=EXAMPLE.COM

To launch and configure the Amazon Linux EC2 instance

  1. Launch an Amazon Linux EC2 exemplify using the Amazon EC2 cabinet. For more information, see Launch an exemplify in the Amazon EC2 User Guide for Linux Instances .
  2. Connect to your exemplify. For more information, see get in touch to your Linux case in the Amazon EC2 User Guide for Linux Instances .
  3. Run the follow command to install the cifs-utils package. This package is used to mount network charge systems like Amazon FSx on Linux .

    $ sudo yum install cifs-utils
  4. Create the /mnt/fsx directory. This is where you will mount the Amazon FSx file system .

    $ sudo mkdir /mnt/fsx
  5. Create the creds.txt credentials file in the /home/ec2-user directory .
  6. Set the file permissions so that lone you ( the owner ) can read the charge by running the following command .

    $ sudo chmod 700 creds.txt

To automatically mount the file system

  1. You automatically mount a file parcel not joined to your active directory by using its individual IP address. You can get the file system ‘s secret IP address from the Amazon FSx console, in the Network
    & security
    yellow journalism, the Preferred File Server IP
    Address
    .
  2. To automatically mount the file share using its private IP savoir-faire, add the comply credit line to the /etc/fstab file .

    //file-system-IP-address/file_share /mnt/fsx cifs vers=SMB_version,sec=ntlmsspi,cred=/home/ec2-user/creds.txt,rsize=CIFSMaxBufSize,wsize=CIFSMaxBufSize,cache=none

    Replace CIFSMaxBufSize with the largest measure allowed by your kernel. Run the keep up command to get this respect .

    $ modinfo cifs | grep CIFSMaxBufSize
    parm:           CIFSMaxBufSize:Network buffer size (not including header). Default: 16384 Range: 8192 to 130048 (uint)

    The output shows that the maximum buffer size is 130048 .

  3. Test the fstab entry by using the mount command with the ‘fake ‘ choice in conjunction with the ‘all ‘ and ‘verbose ‘ options .

    $ sudo mount -fav
    home/ec2-user/fsx      : successfully mounted
  4. To mount the file parcel, reboot the Amazon EC2 exemplify .
  5. When the example is available again, verify that the charge arrangement is mounted by running the keep up command .

    $ sudo mount -l -t cifs
    //file-system-IP-address/file_share on /mnt/fsx type cifs (rw,relatime,vers=SMB_version,sec=ntlmsspi,cache=cache_code,username=user1,domain=CORP.EXAMPLE.COM,uid=0,noforceuid,gid=0,noforcegid,addr=192.0.20.0,file_mode=0755,dir_mode=0755,soft,nounix,serverino,mapposix,rsize=1048576,wsize=1048576,echo_interval=60,actimeo=1)

    The occupation added to the /etc/fstab file in this procedure does the following at the given points :

    • //file-system-IP-address/file_share – Specifies the IP address and parcel of the Amazon FSx file system you ‘re mounting .
    • /mnt/fsx – Specifies the mountain charge for the Amazon FSx file system on your EC2 example .
    • cifs vers=SMB_version – Specifies the type of file system as CIFS and the SMB protocol version. Amazon FSx for Windows File Server supports SMB versions 2.0 through 3.1.1 .
    • sec=ntlmsspi – Specifies using NT LAN Manager Security Support Provider Interface to facilitate NTLM challenge-response authentication .
    • cache=cache_mode – Sets the cache mode. This option for CIFS cache can impact performance, and you should test which settings study good ( and review Linux documentation ) for your kernel and workload. Options strict and none are recommended, because loose can cause data incompatibility due to the at large protocol semantics .
    • cred=/home/ec2-user/creds.txt – Specifies where to get the drug user credentials.

    • _netdev – Tells the operational organization that the file system resides on a device that requires net entree. Using this option prevents the example from mounting the file system until the network service is enabled on the node .
    • 0 – Indicates that the charge system should be backed up by dump, if it ‘s a nonzero value. For Amazon FSx, this prize should be 0 .
    • 0 – Specifies the club in which fsck checks file systems at boot. For Amazon FSx file systems, this value should be 0 to indicate that fsck should n’t run at startup .
beginning : https://thefartiste.com
Category : Tech

About admin

I am the owner of the website thefartiste.com, my purpose is to bring all the most useful information to users.

Check Also

articlewriting1

Manage participants in a zoom meeting webinar

Call the people who attend the meet as follows Alternate host host Who scheduled the …

Leave a Reply

Your email address will not be published.