Changes for page Storage
Last modified by Kevin Wiki on 2025/09/23 07:42
From version
3.1
edited by Kevin Wiki
on 2024/10/11 08:44
on 2024/10/11 08:44
Change comment:
There is no comment for this version
To version
4.3
edited by Kevin Wiki
on 2025/09/23 07:42
on 2025/09/23 07:42
Change comment:
There is no comment for this version
Summary
Details
- Page properties
-
- Content
-
... ... @@ -26,7 +26,47 @@ 26 26 content backup,rootdir,snippets,iso,vztmpl,images 27 27 prune-backups keep-all=1 28 28 shared 0 29 +``` 29 29 31 +## Moving images from LVM storage 32 + 33 +The actual disk is mounted as a mapper device. If is was LXC container with id 401, a disk might look like `/dev/mapper/pve-vm--401--disk--0` 34 + 35 +```bash 36 +$ fdisk -l 37 +... 38 + 39 +Disk /dev/mapper/pve-vm--121--disk--0: 12 GiB, 12884901888 bytes, 25165824 sectors 40 +Units: sectors of 1 * 512 = 512 bytes 41 +Sector size (logical/physical): 512 bytes / 512 bytes 42 +I/O size (minimum/optimal): 65536 bytes / 65536 bytes 43 +Disklabel type: gpt 44 +Disk identifier: E6B137D0-95DE-4C44-B5D1-1C74DE40F141 45 + 46 +Device Start End Sectors Size Type 47 +/dev/mapper/pve-vm--121--disk--0-part1 227328 25165790 24938463 11.9G Linux filesystem 48 +/dev/mapper/pve-vm--121--disk--0-part14 2048 10239 8192 4M BIOS boot 49 +/dev/mapper/pve-vm--121--disk--0-part15 10240 227327 217088 106M EFI System 30 30 ``` 31 31 32 - 52 +Identify the vm disk path using the command: 53 + 54 +```bash 55 +pvesm path STORAGE:vm-VM_ID-disk-0 56 +``` 57 + 58 +Stop the container or vm: 59 + 60 +```bash 61 +qm stop 401 62 +or 63 +lxc-stop 401 64 +``` 65 + 66 +Then convert the the storage with: 67 + 68 +```bash 69 +qemu-img convert -p -O qcow2 $(pvesm path local-lvm:vm-401-disk-0) vm-401-disk-0.qcow2 70 +``` 71 + 72 +note, here we also move the storage from `local-lvm` to `nvme`.