腾讯云重装为centos6.7 x64 后重新挂载原NTFS云硬盘

来源:互联网 发布:合肥房地产销售数据 编辑:程序博客网 时间:2024/06/05 03:44

原操作系统环境为:windows server 2008 R2 Enterprise Service Pack 1 x64

原挂载了两个云硬盘:系统盘(C:)、数据盘(D:)


重装系统为:centos 6.7 x64


挂载原数据盘NTFS格式的步骤如下:

1、在Linux系统上使用以下命令安装ntfsprogs软件使得Linux能够支持NTFS文件系统:

yum install ntfsprogs

2、使用命令parted -l查看从Windows中挂载过来的数据盘:

[root@XXXX_centos mnt]# parted -lModel: Virtio Block Device (virtblk)Disk /dev/vda: 53.7GBSector size (logical/physical): 512B/512BPartition Table: msdosNumber  Start   End     Size    Type     File system  Flags 1      1049kB  53.7GB  53.7GB  primary  ext3         bootModel: Virtio Block Device (virtblk)Disk /dev/vdb: 107GBSector size (logical/physical): 512B/512BPartition Table: msdosNumber  Start   End    Size   Type     File system  Flags 1      1049kB  107GB  107GB  primary  ntfs

3、使用 fdisk -l 命名查看 需要挂载的 windows的 数据盘路径:

[root@xxx_centos mnt]# fdisk -lDisk /dev/vda: 53.7 GB, 53687091200 bytes255 heads, 63 sectors/track, 6527 cylindersUnits = cylinders of 16065 * 512 = 8225280 bytesSector size (logical/physical): 512 bytes / 512 bytesI/O size (minimum/optimal): 512 bytes / 512 bytesDisk identifier: 0x0007ee22   Device Boot      Start         End      Blocks   Id  System/dev/vda1   *           1        6528    52427776   83  LinuxDisk /dev/vdb: 107.4 GB, 107374182400 bytes255 heads, 63 sectors/track, 13054 cylindersUnits = cylinders of 16065 * 512 = 8225280 bytesSector size (logical/physical): 512 bytes / 512 bytesI/O size (minimum/optimal): 512 bytes / 512 bytesDisk identifier: 0xa09c50d9   Device Boot      Start         End      Blocks   Id  System/dev/vdb1               1       13054   104854528    7  HPFS/NTFS

4、使用命令mount -t ntfs-3g 数据盘路径 挂载点 挂载数据盘:

[root@xxx_centos /]# mount -t ntfs-3g /dev/vdb1 mnt/The disk contains an unclean file system (0, 0).The file system wasn't safely closed on Windows. Fixing.

如上即可将windows的ntfs盘挂载到centos中。