OS |
Possible Cause |
Solution |
---|---|---|
Linux |
|
|
Windows |
New data disks are not formatted and partitioned by default. Only formatted and partitioned drives show up in the resource manager. You must manually initialize the disk. |
Symptom: A data disk has been attached to a Linux server on the management console, but the disk cannot be viewed on the server.
Run df -TH to view the disk information. CentOS 7.4 is used in this example. The normal command output is as follows:
[root@ecs-test-0001 ~]# df -TH Filesystem Type Size Used Avail Use% Mounted on /dev/vda1 ext4 43G 1.9G 39G 5% / devtmpfs devtmpfs 2.0G 0 2.0G 0% /dev tmpfs tmpfs 2.0G 0 2.0G 0% /dev/shm tmpfs tmpfs 2.0G 9.1M 2.0G 1% /run tmpfs tmpfs 2.0G 0 2.0G 0% /sys/fs/cgroup tmpfs tmpfs 398M 0 398M 0% /run/user/0 /dev/vdb1 ext4 106G 63M 101G 1% /mnt/sdc
Unlike the normal command output, only system disk /dev/vda1 is visible, but data disk /dev/vdb1 is missing from the command output.
Cause Analysis:
For details, see Introduction to Data Disk Initialization Scenarios and Partition Styles.
mount Disk partition Mount point
In this example, run the following command:
mount /dev/vdb1 /mnt/sdc
Perform the following steps to enable automatic partition mounting at system start:
In this example, run the following command to query the UUID of the /dev/vdb1 partition:
blkid /dev/vdb1
Information similar to the following is displayed:
[root@ecs-test-0001 ~]# blkid /dev/vdb1 /dev/vdb1: UUID="0b3040e2-1367-4abb-841d-ddb0b92693df" TYPE="ext4"
The UUID of the /dev/vdb1 partition is displayed.
vi /etc/fstab
Press i to enter editing mode.
UUID=0b3040e2-1367-4abb-841d-ddb0b92693df /mnt/sdc ext4 defaults 0 2
When this parameter is set to 1 for the root partition, this parameter for other partitions must start with 2 because the system checks the partitions in the ascending order of the values.
The system saves the configurations and exits the vi editor.
In this example, run the following command:
umount /dev/vdb1
mount -a
In this example, run the following command:
mount | grep /mnt/sdc
If information similar to the following is displayed, automatic mounting has been configured:
root@ecs-test-0001 ~]# mount | grep /mnt/sdc /dev/vdb1 on /mnt/sdc type ext4 (rw,relatime,data=ordered)
Symptom: A data disk has been attached to a Windows server on the management console, but the disk cannot be viewed on the server. For example, Volume (D:) was not shown in This PC of a Windows server running Windows Server 2012. Normally, Volume (D:) appears, as shown in Figure 1.
Solution: New data disks are not formatted and partitioned by default. Only formatted and partitioned drives show up in This PC. You must manually initialize the disk before it can be viewed here.
For details, see Introduction to Data Disk Initialization Scenarios and Partition Styles.