Cloud server data disk partition and mount

fdisk -l , view disk capacity and partition status

39f7caed-6baa-447a-962d-e1729f716f62

fdisk /dev/xvdb , partition the disk (according to the prompt, enter " n ", " p ", " 1 " in turn, press Enter twice , " wq ", the partitioning starts and will be completed soon)
n means new partition, p identifies the primary partition, 1 is the partition number, carriage return means use the default value cylinder, wq means perform the partition operation

8ba03dc4-3852-4ba7-bd7b-20d2076b30ee

df -l , check the partition mount status mkfs.ext3 /dev/xvdb1 , format the partition as ext3,
af0610ea-66e9-4a5c-9d3b-ff9522374fc5

140880eb-4c72-4c5c-a554-16ca97be43dd

mount /dev/xvdb1 /soft , mount the partition to the path /soft

1618979e-5a1f-481f-a742-e6da6ea085d4

vi /etc/fstab , auto-mount partition
/dev/xvdb1 /soft ext3 defaults 0 0
parted /dev/hda , print list , disk partition and file system view

ed1bae13-1440-46e0-9201-343d9f92ccad

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325689307&siteId=291194637
Recommended