Udostępnij przez


Tutorial: Transfer data with Azure Data Box Gateway

Wprowadzenie

This article describes how to add and connect to shares on your Data Box Gateway. After you've added the shares, the device can transfer data to Azure.

Wykonanie tej procedury może zająć około 10 minut.

Z tego samouczka dowiesz się, jak wykonywać następujące działania:

  • Dodaj udział
  • Połącz, aby udostępniać

Wymagania wstępne

Before you add shares to your Data Box Gateway, make sure that:

Dodaj udział

To create a share do the following procedure:

  1. In the Azure portal, select your Data Box Gateway resource and then go to Overview. Urządzenie powinno być w trybie online. Wybierz pozycję + Dodaj udział na pasku poleceń urządzenia.

    Dodaj udział

  2. In Add Share, do the following procedure:

    1. Provide a unique name for your share. The share names can only have lowercase letters, numbers, and hyphens. The share name must have between 3 and 63 characters long and begin with a letter or a number. Each hyphen must be preceded and followed by a non-hyphen character.

    2. Wybierz Typ dla udostępnienia. The type can be SMB or NFS, with SMB being the default. Typ SMB jest standardem dla klientów systemu Windows, natomiast typ NFS jest używany dla klientów systemu Linux. W zależności od tego, czy wybrano udział SMB czy NFS, wyświetlone opcje są nieco inne.

    3. Podaj konto magazynowe, na którym zostanie umieszczony zasób. If a container doesn't already exist, it's created in the storage account with the newly created share name. If the container already exists, that container is used.

      Ważne

      Make sure that the Azure Storage account that you use does not have immutability policies set on it if you are using it with a Data Box Gateway device. For more information, see Set and manage immutability policies for blob storage.

    4. Choose the Storage service from block blob, page blob, or files. Wybrany typ usługi zależy od tego, jaki format mają mieć dane na platformie Azure. For example, in this instance, we want the data to reside as blob blocks in Azure, hence we select Block Blob. If choosing Page Blob, you must ensure that your data is 512 bytes aligned. For example, a VHDX is always 512 bytes aligned.

    5. This step depends on whether you are creating an SMB or an NFS share.

    • SMB share - Under All privilege local user, select Create new or Use existing. If you create a new local user, enter a username and password, and then confirm password. This action assigns the permissions to the local user. Modyfikacja uprawnień na poziomie udziału nie jest obecnie obsługiwana.

      Add SMB share

      If you select Allow only read operations check box for this share data, you can specify read-only users.

    • NFS share - Enter the IP addresses of the allowed clients that can access the share.

      Add NFS share

  3. Select Create to create the share.

    You're notified that the share creation is in progress. Po utworzeniu udziału przy użyciu określonych ustawień kafelek Udziały zostanie zaktualizowany w celu odzwierciedlenia nowego udziału.

    Updated Shares tile

Connect to the share

Teraz możesz połączyć się z jednym lub kilkoma udziałami utworzonymi w ostatnim kroku. Depending upon whether you have an SMB or an NFS share, the steps can vary.

Connect to an SMB share

On your Windows Server client connected to your Data Box Gateway, connect to an SMB share by entering the commands:

  1. W oknie polecenia wpisz:

    net use \\<IP address of the device>\<share name> /u:<user name for the share>

    Gdy pojawi się prośba, wprowadź hasło do udziału. Poniżej przedstawiono przykładowe dane wyjściowe dla tego polecenia.

    Microsoft Windows [Version 18.8.16299.192) 
    (c) 2017 microsoft Corporation. All rights reserved . 
    
    C: \Users\GatewayUser>net use \\10.10.10.60\newtestuser /u:Tota11yNewUser 
    Enter the password for 'TotallyNewUser' to connect to '10.10.10.60'  
    The command completed successfully. 
    
    C: \Users\GatewayUser>
    
  2. Na klawiaturze naciśnij klawisze Windows + R.

  3. In the Run window, specify the \\<device IP address> and then select OK. Zostanie otwarty Eksplorator plików. Teraz utworzone przez Ciebie udziały powinny być widoczne jako foldery. W Eksploratorze plików kliknij dwukrotnie folder udostępniony, aby wyświetlić jego zawartość.

    Connect to SMB share -->

    Dane są zapisywane w tych udziałach w miarę ich generowania, a urządzenie przesyła je do chmury.

Connect to an NFS share

On your Linux client connected to your device, do the following procedure:

  1. Upewnij się, że na kliencie zainstalowano klienta NFSv4. Aby zainstalować klienta NFS, użyj następującego polecenia:

    sudo apt-get install nfs-common

    Aby uzyskać więcej informacji, przejdź do tematu Instalowanie klienta NFSv4.

  2. After the NFS client is installed, use the following command to mount the NFS share you created on your Data Box Gateway device:

    sudo mount -t nfs -o sec=sys,resvport <device IP>:/<NFS shares on device> /home/username/<Folder on local Linux computer>

    Prior to setting up the mounts, make sure the directories that will act as mountpoints on your local computer are already created and also do not contain any files or sub-folders.

    The following example shows how to connect via NFS to a share on Gateway device. The virtual device IP is 10.10.10.60, the share mylinuxshare2 is mounted on the ubuntuVM, mount point being /home/databoxubuntuhost/gateway.

    sudo mount -t nfs -o sec=sys,resvport 10.10.10.60:/mylinuxshare2 /home/databoxubuntuhost/gateway

Uwaga

W tej wersji mają zastosowanie następujące zastrzeżenia:

  • Po utworzeniu pliku w udostępnionych folderach zmiana nazwy pliku nie jest obsługiwana.
  • Deletion of a file from a share does not delete the entry in the storage account.
  • W przypadku kopiowania danych za pomocą narzędzia rsync opcja rsync -a nie jest obsługiwana.

Następne kroki

W tym samouczku przedstawiono zagadnienia dotyczące usługi Data Box Gateway, takie jak:

  • Dodaj udział
  • Połącz, aby udostępniać

Advance to the next tutorial to learn how to administer your Data Box Gateway.