Wiki source code of Storage
Version 3.3 by Kevin Wiki on 2025/09/23 07:27
Hide last authors
| author | version | line-number | content |
|---|---|---|---|
| |
1.1 | 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 | |||
| |
3.1 | 11 | # create dir to mount drive to |
| 12 | mkdir -p /mnt/vmstorage | ||
| 13 | |||
| |
1.1 | 14 | # add to fstab |
| 15 | printf "\n/dev/nvme0n1p1 /mnt/vmstorage ext4 defaults 0 0" >> /etc/fstab | ||
| |
2.1 | 16 | |
| 17 | # mount drives defined in fstab | ||
| 18 | mount | ||
| |
1.1 | 19 | ``` |
| |
3.1 | 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 | |||
| |
3.2 | 31 | ## Moving images from LVM storage |
| 32 | |||
| |
3.3 | 33 | Identify the lvm disk we are after. If is was LXC container with id 401, a disk might look like `/dev/mapper/pve-vm--401--disk--0`. |
| 34 | |||
| |
3.1 | 35 |