Help & DocumentationCloud Virtual MachineOps GuideMount Data DisksRead/write NTFS Data Disks after Reinstalling a Windows CVM to Linux CVM

Read/write NTFS Data Disks after Reinstalling a Windows CVM to Linux CVM

Last updated: 2020-02-25 11:45:50



Windows's file system usually uses the NTFS or FAT32 format, while Linux's file system usually uses the EXT series format. Although the type of Cloud Virtual Machine operating system has changed from Windows Reinstall to Linux, operating system, the data disk in Cloud Virtual Machine is still in the format used by the original system. Therefore, Cloud Virtual Machine after Reinstall system may not be able to Access data disk file system. This document guides you to read the data disk data under the original Windows system on the Linux Cloud Virtual Machine behind the Reinstall system.


Configure the Linux system to support NTFS

  1. Linux Cloud Virtual Machine after logging in to Reinstall's system.
  2. Execute the following command to install the ntfsprogs software so that Linux Cloud Virtual Machine supports the Access NTFS file system.

This paper takes CentOS system as an example. Different types of Linux system installation commands are different, please use the corresponding installation commands to install.

yum install ntfsprogs

Mount the data disk under Windows Cloud Virtual Machine to Linux Cloud Virtual Machine

If the data disk under your Windows Cloud Virtual Machine has been mounted to Linux Cloud Virtual Machine, you can skip this operation.

  1. Log in to the CVM Console .
  2. In Left sidebar, click [ Cloud Block Storage ], go to the HDD cloud disk management page.
  3. Select the Windows data disk to be mounted, and click * * more * *-> * * Mount * *.
  4. In the pop-up "Mount to instance" window, select the Linux Cloud Virtual Machine you want to mount to, and click "OK".
  5. Log in to the Linux Cloud Virtual Machine that has mounted the Windows data disk.
  6. Execute the following command to view the data disk mounted from Windows Cloud Virtual Machine.
parted -l

A message similar to the one below is returned:

Model: Virtio Block Device (virtblk)
Disk /dev/vdb: 53.7GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags: 
Number  Start   End     Size    File system  Name                          Flags
 1      17.4kB  134MB   134MB                Microsoft reserved partition  msftres
 2      135MB   53.7GB  53.6GB  ntfs         Basic data partition
  1. Execute the following command to mount the data disk.
mount -t ntfs-3g Data disk path mount point

For example, you need to set the path to /dev/vdb1 The data disk is mounted to the /mnt Execute the following command

mount -t ntfs-3g /dev/vdb1 /mnt

Because the file system is recognizable at this time, the mounted data disk can be read and written directly by the Linux system.