All Products
Search
Document Center

Cloud Storage Gateway:Create a file system and flush cache to an iSCSI volume

Last Updated:Jun 20, 2026

Format an iSCSI volume as a file system and flush the cache to the iSCSI volume. This procedure is supported on both Windows and Linux operating systems.

Prerequisites

Ensure the following requirements are met:

  • You have connected the host to the iSCSI volume on the block gateway.

  • You have administrator or sudo permissions on the host.

    Windows

    This section describes how to format an iSCSI volume as a file system and flush the cache to synchronize data with the volume.

    1. Connect to the iSCSI volume.

      For details, see Use volumes on Windows.

    2. Format the iSCSI volume as a file system.

      1. Open Windows Disk Management. If the iSCSI volume shows as Unallocated or a new disk, right-click the disk, select , and select a suitable partition style.

      2. Right-click the unallocated space, select New Simple Volume, and follow the wizard to create the volume.

      3. Right-click the new volume and select Format. Set the file system to NTFS, keep the default allocation unit size, select Quick Format, and click Start.

    3. Flush the cache to synchronize data with the iSCSI volume.

      1. Download and install Sync from Sync v2.2.

      2. Open a command prompt as an administrator.

      3. Run the sync command to flush the cache to the iSCSI volume.

        For 32-bit operating systems:

         # Replace f: with the drive letter for your file system.
         sync.exe -r f:  

        For 64-bit operating systems:

         # Replace f: with the drive letter for your file system.
        sync64.exe -r f:  

    Linux

    This section describes how to connect to the iSCSI volume, format and mount it as a file system, and flush the cache to synchronize data with the volume.

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

    2. Format the iSCSI volume as a file system.

      # Find the iSCSI device. This example uses /dev/vdb.
      lsblk
      # Create a disk partition.
      sudo fdisk /dev/vdb
      # Create a file system. Linux supports various file systems. This example uses ext4.
      sudo mkfs.ext4 /dev/vdb1
    3. Mount the file system.

      # Create a mount point.
      sudo mkdir /mnt/iscsi
      # Mount the file system.
      sudo mount /dev/vdb1 /mnt/iscsi
    4. Flush the cache to synchronize data with the iSCSI volume.

      sudo sync

    Unmounting the file system also flushes the cache to the iSCSI volume.