Home Data Center How To Mount New Hardisk Proxmox VE

How To Mount New Hardisk Proxmox VE

63
0
How To Mount New Hardisk Proxmox VE
How To Mount New Hardisk Proxmox VE

After installing a new hard disk, enter it in the terminal to view the hard disk partition:

# ls -al /dev/sd*

# fdisk -l

Of course, you can also enter the web management page Node-> Disk.
You can see the name of your newly connected device

sdb is the new partition, but it has not been formatted

Use the fdisk command to assign a partition to the new hard disk

# fdisk /dev/sdb

Hard disk formatted as ext4

# mkfs.ext4 -t ext4 -m0 /dev/sdb

Hang on a new hard drive

# mkdir /data

Add a new folder, the name can be customized.

It is used to store virtual machines. The hard disk on which I install Proxmox VE (Proxmox Virtual Environment) is an SSD with a relatively small capacity, which is not enough for me to store virtual machines. The new hard disk is used to store virtual machines.

Mount sdb1 to /data

# mount /dev/sdb /data

View capacity

# df -h

Mount forever

# ls -alF /dev/disk/by-uuid/

Write down the long list of UUID of sdb1, here I am 856e9b8f-b0f1-49f2-a19a-71989a7a8e92

Write UUID to /etc/fstab, and the new hard disk will be automatically loaded and mounted under the /data directory every time you turn it on.

# vi /etc/fstab

Add two lines

UUID=854e8ah8f-b0f1-49f2-e44a-71982e8a6e92   /data   ext4    defaults 0 0

/data/images    /var/lib/vz/images     none    bind    0   0


/dev/sdb /data ext4 defaults 0 0
/dev/sdb1 /var/lib/vz/images ext4 defaults 0 0

See if the mount is successful

# mount -a

Let the system reload all the contents of /etc/fstab so that there is no need to restart.

# mount -l

Add new storage
Data Center — Storage — Directory

LEAVE A REPLY

Please enter your comment!
Please enter your name here