The Windows file system typically uses the NTFS or FAT32 format, whereas the Linux file system often uses EXT-series formats. When the operating system of a CVM is changed from Windows to Linux, the data disk of the CVM remains in the same format as that of the original operating system. As a result, after the reinstallation of the system, the CVM might be unable to access the file system of the data disk. This document describes how to read a data disk in the original Windows system after the operating system is reinstalled from Windows to Linux.
This document uses CentOS as an example. Note that different types of Linux systems require different installation commands. Therefore, always run the corresponding installation command for your operating system type.
yum install ntfsprogs
If the data disk in your Windows CVM has been mounted to the Linux CVM, skip this operation.
Information similar to the following will be 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
For example, to mount the data disk in
mount -t ntfs-3g data disk path mount target
/mnt, run the following command:
As the file system can be recognized by the operating system, the Linux system can directly read data from and write data to the mounted data disk.
mount -t ntfs-3g /dev/vdb2 /mnt