This document describes how to initialize a cloud disk newly mounted to a CVM, create a file system, and write a file named
For more information on initializing cloud disks, see Initialization Scenarios.
To prevent data loss, please see Usage FAQs before operating on your CBS cloud disks.
This document uses a CVM with Windows Server 2012 R2 DataCenter 64-bit Chinese installed as an example. Note that the steps may vary according to the operating system version.
Right click the disk you need, select New Simple Volume, and click Next in the pop-up window.
Enter the simple volume size, and click Next.
Select a drive letter or drive path, and click Next. In this example, E is assigned as the driver letter.
Select the file system, perform a quick format, and then click Next.
The disk status goes to Formatting. Wait for the completion of initialization. When the volume status becomes Healthy, the disk initialization is successful. You can then view the newly formatted data disk in the PC interface.
Enter the newly formatted data disk, create a file named
qcloud.txt, enter the content you need, and select File > Save.
If the returned result is as shown in the following figure, the current CVM has two disks, where
/dev/vdais the system disk and
/dev/vdbis the newly added data disk.
mount /dev/vdb /data
lscommand, and you can see that the
qcloud.txtfile has been written to the disk.
/etc/fstabfile to the
/homedirectory, for example:
cp -r /etc/fstab /home
Take automatic mounting using the soft link of an elastic cloud disk as an example. Add the following content:
<Device information> <Mount point> <File system format> <File system installation option> <File system dump frequency> <File system check sequence at startup>
/dev/disk/by-id/virtio-disk-drkhklpe /data ext4 defaults 0 0
ls -l /dev/disk/by-idcommand to obtain the soft link of the elastic cloud disk.
:wq, and press Enter.
/etc/fstabfile has been written successfully.
If the command runs successfully, the file has been written. The newly created file system will be mounted automatically when the operating system starts up.
A cloud disk is an expandable storage device on cloud. You can expand its capacity to fit your business at any time without losing any data in it. For detailed directions, see Step 4. Expanding Cloud Disk Capacity.