This topic describes how to use an iSCSI gateways to create file systems and synchronize data to iSCSI volumes?
Windows
Connect to the iSCSI volume.
For more information, see Use volumes on a Windows ECS instance.
Format the iSCSI volume as a file system.
Open Disk Management in Windows and initialize the volume. If the iSCSI volume is displayed as Unallocated or New, choose
and select an disk partition style.Click Unallocated Space, select New Simple Volume, and then create a volume as prompted.
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.
Refresh the cache.
Download and install Sync from the following URL: Sync v2.2.
Run the command prompt as the administrator.
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:
Linux
Connect to the iSCSI volume. For more information, see Use volumes on a Linux ECS instance.
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
Mount the file system.
# Create a mount target. sudo mkdir /mnt/iscsi # Mount the file system. sudo mount /dev/vdb /mnt/iscsi
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.