Wiki source code of Storage

Version 3.1 by Kevin Wiki on 2024/10/11 08:44

Show last authors
1 Adding external high speed VM storage to proxmox. Find the new drive and erase it and then format using parted:
2
3 ```bash
4 # format drive and create partition
5 parted /dev/nvme0n1 mklabel gpt
6 parted /dev/nvme0n1 mkpart primary ext4 0% 100%
7
8 # create a ext4 filesystem
9 mkfs.ext4 /dev/nvme0n1p1
10
11 # create dir to mount drive to
12 mkdir -p /mnt/vmstorage
13
14 # add to fstab
15 printf "\n/dev/nvme0n1p1 /mnt/vmstorage ext4 defaults 0 0" >> /etc/fstab
16
17 # mount drives defined in fstab
18 mount
19 ```
20
21 Add the new device in proxmox UI or in `/etc/pve/storage.cfg` to:
22
23 ```cfg
24 dir: nvme
25 path /mnt/vmstorage
26 content backup,rootdir,snippets,iso,vztmpl,images
27 prune-backups keep-all=1
28 shared 0
29
30 ```
31
32