How to mount the hard disk in XEN VPS and merge it into the system disk

888u

Last update at :2024-04-25,Edit by888u

Some friends bought XEN VPS and found that there are not as many hard drives as the merchant wrote. This does not mean that the merchant is cheating you. It may be because some hard drives are not mounted. When opening a VPS based on the XEN architecture, some merchants will mount 10G hard drives by default, and the remaining hard drives must be mounted manually. So how to mount these unused hard drives? Let me talk about it briefly today. It's simple and only takes a few minutes.

1. Log in to SSH and check the current hard disk status.

fdisk -l


As shown in the picture above, ① is the hard drive that has been mounted by default, with a capacity of 10G, and ② is an unused (unmounted) hard drive with a capacity of 20G. The next step is to operate the 20G hard drive.

2. Mount the unmounted hard disk to the system disk

fdisk /dev/xvdb

After entering the execution command, there will be several options. Just fill them in according to the operation content in the figure below:


3. Re-read the partition table

partprobe

Fourth, check VG details

vgdisplay


Pay attention to the VG NAME marked in red above, which will be used below.

5. Create a new PV and add it to "VG NAME"

#The first line of command creates a new PV. The second line of command adds the newly created PV to the VG NAME. The red VG NAME is the VG NAME of your own VPS, which is listed in the picture above.

pvcreate /dev/xvdb1

vgextend VolGroup00 /dev/xvdb1


Recommended site search: website server, domain name registration fee, 6 yuan per year cloud server, Hong Kong high-defense server, Hong Kong high-defense server rental, com domain name registration, IP address search, anti-complaint vps host, telecom server rental , Ministry of Industry and Information Technology ICP filing inquiry,

How to mount the hard disk in XEN VPS and merge it into the system disk

All copyrights belong to 888u unless special state
取消
微信二维码
微信二维码
支付宝二维码