[SOLVED] Adding logical volum as a storage

optimistic

New Member
Jun 11, 2018
11
1
3
35
I have Volume Group with some Logical Volumes:
Code:
--- Volume group ---
  VG Name               pve
  System ID             
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  5
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                4
  Open LV               4
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               1,82 TiB
  PE Size               4,00 MiB
  Total PE              476780
  Alloc PE / Size       465670 / 1,78 TiB
  Free  PE / Size       11110 / 43,40 GiB
  VG UUID               b91Zsl-7FRH-Abkv-z5Jw-dZ98-eOwL-kRr3lM
Code:
ACTIVE            '/dev/pve/data' [46,56 GiB] inherit
  ACTIVE            '/dev/pve/root' [27,94 GiB] inherit
  ACTIVE            '/dev/pve/swap' [3,72 GiB] inherit
  ACTIVE            '/dev/pve/files' [1,70 TiB] inherit
Code:
 --- Logical volume ---
  LV Path                /dev/pve/data
  LV Name                data
  VG Name                pve
  LV UUID                BeJPCv-HKZ1-qr41-jI48-RJxR-yxqJ-W41bS2
  LV Write Access        read/write
  LV Creation host, time proxmox, 2018-06-15 20:21:41 +0300
  LV Status              available
  # open                 1
  LV Size                46,56 GiB
  Current LE             11920
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:2
  
  --- Logical volume ---
  LV Path                /dev/pve/root
  LV Name                root
  VG Name                pve
  LV UUID                UY8wxl-tIhD-JoAO-UQXz-MFEI-DrO0-43ztuH
  LV Write Access        read/write
  LV Creation host, time proxmox, 2018-06-15 20:21:58 +0300
  LV Status              available
  # open                 1
  LV Size                27,94 GiB
  Current LE             7152
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:0
  
  --- Logical volume ---
  LV Path                /dev/pve/swap
  LV Name                swap
  VG Name                pve
  LV UUID                efQZy6-auG3-3Y13-O1mU-7sjS-Tvbn-3c4S0u
  LV Write Access        read/write
  LV Creation host, time proxmox, 2018-06-15 20:22:08 +0300
  LV Status              available
  # open                 2
  LV Size                3,72 GiB
  Current LE             953
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:1
  
  --- Logical volume ---
  LV Path                /dev/pve/files
  LV Name                files
  VG Name                pve
  LV UUID                JLXyZr-q1Sd-Zqvj-6C4K-D2Pk-UB1d-HFk4QH
  LV Write Access        read/write
  LV Creation host, time proxmox, 2018-06-17 13:13:45 +0300
  LV Status              available
  # open                 1
  LV Size                1,70 TiB
  Current LE             445645
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:3
Code:
udev                    1,9G            0  1,9G            0% /dev
tmpfs                   382M         5,6M  377M            2% /run
/dev/mapper/pve-root     28G         1,8G   25G            7% /
tmpfs                   1,9G          43M  1,9G            3% /dev/shm
tmpfs                   5,0M            0  5,0M            0% /run/lock
tmpfs                   1,9G            0  1,9G            0% /sys/fs/cgroup
/dev/md0                461M          88M  349M           21% /boot
/dev/mapper/pve-data     46G         6,5G   37G           15% /var/lib/vz
/dev/mapper/pve-files   1,7T          77M  1,6T            1% /mnt
/dev/fuse                30M          16K   30M            1% /etc/pve
tmpfs                   382M            0  382M            0% /run/user/1000

I want to add LV files as a storage in Proxmox and use all the size of it. How can I do it?
Code:
  LV Path                /dev/pve/files
  LV Name                files
I just created this LV, it is empty and I can modify it if it necessary.
 
Yes, I made lv and mounted to my Debian (Proxmox), see code above.
I added this to Proxmox as Directory.
AlPUbt1.png
C4QOyW7.png

In my VM I try to add Hard disk, but I don't understand how to add all the available storage.
I have 1.67Tb, but when I added Hard disk I should specifaed how many GB I want to use
b1tpEEK.png

I want to add all the space, how can I do it?
And no matter I will choose, my Hard disk is always red. Why?

fJgD7pY.png
How to add to VM entire lv
/dev/pve/files mounted in /mnt/files ?
 
Hi,
your harddisk is red, because the changes are active after stopping and starting the VM!
Because Sata isn't hotplug (except you define that?!). Reboot isn't enough - the bios must see the new disk.
BTW, why you use sata? The default scsi with virtio-scsi is better (and hot plugable).

About size: when you define 32GB as harddisk-size, you get 32GB! If you want more - no problem, you can extend the size online.
And to calc 1.6TB*1024 is not so hard - your computer can do that for you
Code:
echo "1.6*1024" | bc
Udo
 
  • Like
Reactions: optimistic
Hi,
your harddisk is red, because the changes are active after stopping and starting the VM!
Because Sata isn't hotplug (except you define that?!). Reboot isn't enough - the bios must see the new disk.
BTW, why you use sata? The default scsi with virtio-scsi is better (and hot plugable).

About size: when you define 32GB as harddisk-size, you get 32GB! If you want more - no problem, you can extend the size online.
And to calc 1.6TB*1024 is not so hard - your computer can do that for you
Code:
echo "1.6*1024" | bc
Udo
Yes, it is better to use scsi, now it works, thank you.
About calculation I thought that there are more sophisticated method.