All Products
Search
Document Center

Cloud Storage Gateway:How do I use iSCSI gateways to create file systems and synchronize data to iSCSI volumes?

Last Updated:Sep 18, 2024

This topic describes how to use an iSCSI gateways to create file systems and synchronize data to iSCSI volumes?

Windows

  1. Connect to the iSCSI volume.

    For more information, see Use volumes on a Windows ECS instance.

  2. Format the iSCSI volume as a file system.

    1. Open Disk Management in Windows and initialize the volume. If the iSCSI volume is displayed as Unallocated or New, choose iSCSI Volume > Initialize Disk and select an disk partition style.

    2. Click Unallocated Space, select New Simple Volume, and then create a volume as prompted.

    3. Click the created volume and select Format. Select NTFS for File system, keep the default allocation unit size, select Quick Format, and then click Start.

  3. Refresh the cache.

    1. Download and install Sync from the following URL: Sync v2.2.

    2. Run the command prompt as the administrator.

    3. Run the sync command to synchronize data to the iSCSI volume.

      # f: is the drive letter of the file system. Change it to the actual drive letter.
       sync.exe -r f:  

      If you use a 64-bit operating system, run the following command:

      # f: is the drive letter of the file system. Change it to the actual drive letter.
       sync64.exe -r f:  

      Windows

Linux

  1. Connect to the iSCSI volume. For more information, see Use volumes on a Linux ECS instance.

  2. Format the iSCSI volume as a file system.

    # Find the iSCSI device. In this example, the device name is /dev/vdb.
    lsblk
    
    # Create a disk partition.
    sudo fdisk /dev/vdb
    
    # Create a file system. Linux systems support multiple file system types. The type of the file system created in this example is ext4. 
    sudo mkfs.ext4 /dev/vdb
  3. Mount the file system.

    # Create a mount target.
    sudo mkdir /mnt/iscsi
    
    # Mount the file system.
    sudo mount /dev/vdb /mnt/iscsi
  4. Refresh the cache.

    sudo sync /mnt/iscsi/

When you manually unmount the file system, the file system also synchronizes the cached data to the iSCSI volume.