[SOLVED] Mount point to local-lvm

Hammerhand

Member
Dec 6, 2021
20
0
6
43
Hello. When I created my system two years ago I created a mount point named "Disco2" which points to local-lvm:

1702122638667.png

I don't think I need dis mount point but I don't know how to remove it without erasing local-lvm. If I go to Datacenter-> remove will I remove contents in local-lvm?

Sorry if it's a silly question.
 
Could somebody help me? Could I remove Disco2 without losing local-lvm content being it a mount point?
 
Yes, if I asume that erasing "Disco2" as seen in my screenshot is unmounting, but I don't really understand what "Remove" does in Datacenter/Storage. Does it unmount the Mount point or erase the content?

If it does unmount but not erase the content, that's what I want to do.
 
So if I have local-lvm and somehow I created a mount point called Disco2 (unuseful for me right now) could I remove it with no risk?
 
Somehow created? You mean you don't know where the volume that's mounted on /mnt/Disco2 came from? Maybe you should post the output of "mount" and "lvs" so we (and you I guess) can see what you really have.

Generally speaking, removing a directory storage doesn't erase it. But unless you know where it is and how you mounted it, it might be hard to find it again.
 
I'm afraid that's the case. I set the pc up more than two years ago, just proxmox and home assistant. Then I had a lot of job, and started to build a new house so I switched it off and forgot about it until some months ago. Then I started developing domotics for home assistant as it was most important for my new house.

Weeks ago I started again with proxmox and I don't completely understand what I did.

mount

Code:
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
proc on /proc type proc (rw,relatime)
udev on /dev type devtmpfs (rw,nosuid,relatime,size=16292880k,nr_inodes=4073220,mode=755,inode64)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /run type tmpfs (rw,nosuid,nodev,noexec,relatime,size=3266048k,mode=755,inode64)
/dev/mapper/pve-root on / type ext4 (rw,relatime,errors=remount-ro)
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev,inode64)
tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k,inode64)
cgroup2 on /sys/fs/cgroup type cgroup2 (rw,nosuid,nodev,noexec,relatime)
pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime)
efivarfs on /sys/firmware/efi/efivars type efivarfs (rw,nosuid,nodev,noexec,relatime)
bpf on /sys/fs/bpf type bpf (rw,nosuid,nodev,noexec,relatime,mode=700)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=30,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=28125)
mqueue on /dev/mqueue type mqueue (rw,nosuid,nodev,noexec,relatime)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime,pagesize=2M)
debugfs on /sys/kernel/debug type debugfs (rw,nosuid,nodev,noexec,relatime)
tracefs on /sys/kernel/tracing type tracefs (rw,nosuid,nodev,noexec,relatime)
fusectl on /sys/fs/fuse/connections type fusectl (rw,nosuid,nodev,noexec,relatime)
configfs on /sys/kernel/config type configfs (rw,nosuid,nodev,noexec,relatime)
ramfs on /run/credentials/systemd-sysusers.service type ramfs (ro,nosuid,nodev,noexec,relatime,mode=700)
ramfs on /run/credentials/systemd-tmpfiles-setup-dev.service type ramfs (ro,nosuid,nodev,noexec,relatime,mode=700)
nfsd on /proc/fs/nfsd type nfsd (rw,relatime)
systemd-1 on /mnt/disco1 type autofs (rw,relatime,fd=59,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=30184)
systemd-1 on /mnt/disco4 type autofs (rw,relatime,fd=60,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=30188)
systemd-1 on /mnt/disco5 type autofs (rw,relatime,fd=61,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=30191)
systemd-1 on /mnt/disco8 type autofs (rw,relatime,fd=62,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=30194)
systemd-1 on /mnt/pve/disco4 type autofs (rw,relatime,fd=63,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=17329)
/dev/nvme0n1p2 on /boot/efi type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
ramfs on /run/credentials/systemd-sysctl.service type ramfs (ro,nosuid,nodev,noexec,relatime,mode=700)
/dev/sda1 on /mnt/pve/disco1t4 type ext4 (rw,relatime)
/dev/sdb1 on /mnt/pve/disco4 type ext4 (rw,relatime)
ramfs on /run/credentials/systemd-tmpfiles-setup.service type ramfs (ro,nosuid,nodev,noexec,relatime,mode=700)
sunrpc on /run/rpc_pipefs type rpc_pipefs (rw,relatime)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,nosuid,nodev,noexec,relatime)
lxcfs on /var/lib/lxcfs type fuse.lxcfs (rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other)
/etc/auto_mount.usb on /media/auto_mount_usb type autofs (rw,relatime,fd=6,pgrp=1082,timeout=60,minproto=5,maxproto=5,indirect,pipe_ino=31256)
/etc/auto.ext-usb on /media type autofs (rw,relatime,fd=12,pgrp=1082,timeout=10,minproto=5,maxproto=5,indirect,pipe_ino=31935)
/dev/fuse on /etc/pve type fuse (rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other)
overlay on /var/lib/docker/overlay2/dc7821dc89f4d72e08aba3831f31b6c0d5f905cf8c5b105b12c7232317769eae/merged type overlay (rw,relatime,lowerdir=/var/lib/docker/overlay2/l/2LKX5TLYNURGPHNN45CH4IXFFI:/var/lib/docker/overlay2/l/DXVJXZI6Z5EB7WA4YGQ3HJ2UZP:/var/lib/docker/overlay2/l/4KY3UY3EVFZIRLBLZRICLBUGBB:/var/lib/docker/overlay2/l/BA525TCFX72DAULRERHH434NME,upperdir=/var/lib/docker/overlay2/dc7821dc89f4d72e08aba3831f31b6c0d5f905cf8c5b105b12c7232317769eae/diff,workdir=/var/lib/docker/overlay2/dc7821dc89f4d72e08aba3831f31b6c0d5f905cf8c5b105b12c7232317769eae/work,nouserxattr)
nsfs on /run/docker/netns/f6a7ef1bd8c5 type nsfs (rw)
//192.168.0.100/Z on /mnt/pve/spiritu type cifs (rw,relatime,vers=3.1.1,cache=strict,username=Manuel,uid=0,noforceuid,gid=0,noforcegid,addr=192.168.0.100,file_mode=0755,dir_mode=0755,soft,nounix,serverino,mapposix,rsize=4194304,wsize=4194304,bsize=1048576,echo_interval=60,actimeo=1,closetimeo=1)
/dev/sda1 on /mnt/disco1 type ext4 (rw,relatime,x-systemd.automount)
/dev/sdb1 on /mnt/disco4 type ext4 (rw,relatime,x-systemd.automount)
/dev/sdd1 on /mnt/disco8 type ext4 (rw,relatime,x-systemd.automount)
/dev/sdc1 on /mnt/disco5 type fuseblk (rw,relatime,user_id=0,group_id=0,allow_other,blksize=4096,x-systemd.automount)
tmpfs on /run/user/0 type tmpfs (rw,nosuid,nodev,relatime,size=3266044k,nr_inodes=816511,mode=700,inode64)

lvs

Code:
LV            VG  Attr       LSize    Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  data          pve twi-aotz-- <338.36g             29.59  1.42                          
  root          pve -wi-ao----   96.00g                                                  
  swap          pve -wi-ao----    8.00g                                                  
  vm-100-disk-0 pve Vwi-aotz--    4.00m data        0.00                                  
  vm-100-disk-1 pve Vwi-aotz--   50.00g data        81.50                                
  vm-101-disk-0 pve Vwi-aotz--   15.00g data        21.55                                
  vm-102-disk-0 pve Vwi-aotz--    2.00g data        71.54                                
  vm-103-disk-0 pve Vwi-aotz--   15.00g data        40.05                                
  vm-104-disk-0 pve Vwi-aotz--    4.00g data        39.10                                
  vm-105-disk-0 pve Vwi-aotz--   40.00g data        99.84                                
  vm-106-disk-0 pve Vwi-aotz--   15.00g data        47.89
 
Last edited:
I can see in Datacenter/storage and in left sidebar. I can access it in terminal. The size is not the same as local-lvm, now you note it:

1702411386167.png
 
First, for a normal Proxmox install you can't mount local-lvm. It is defined as a storage but the only thing it can hold is block devices. You can mount those (once formated) but not local-lvm itself. So there is no way that removing your Disco2 volume could affect that in any way.

Second, Disco2 doesn't even appear to be a mounted device at all. It is just a directory on your rootfs that you've told Proxmox to use as a storage for certain types of files. Some other storages like disco4 are actually separate disks or remote shares, but Disco2 isn't.

You appear to have a fairly standard Proxmox setup without ZFS. There's a single LVM group inside of which are "thick" block devices "root" and "swap". Those are normally used for the root filesystem and swap, respectively. They are called "thick" because they are fully allocated and reserved. The root volume is normally formatted as ext4 and used as the rootfs while swap is, well, swap.

Then there's a thin-pool called "data". Note the 't' in the flags in the output of lvs and that the various vm-disk devices refer to "data" as their source pool. A thin pool allows you to allocate what are in some sense virtual block devices. They have a size but don't actually use any storage until written to. That pool is where the virtual disks for your VM's or CT's are created. The various percentages in the lvs output show how much of each virtual disk is in use relative to the size you specified. Note that you can specify a set of VM disks that are larger than the pool size and that's fine as long as you don't actually try to use space that doesn't exist. So you have to keep an eye on that (or don't overprovision).

That thin pool "data" is the storage called "local-lvm" in the GUI. Note how the used percentage in the GUI is the same as the "data" volume in the lvs output.

This will make more sense if you do some reading on the Linux Logical Volume Manager.
 
  • Like
Reactions: Hammerhand
Going ahead to translate and read all this to fully understand (also about LVM). Willl inform as soon as I go further.

Thanks a lot!

Edit: as you said it was a directory, just deleted it without problem. Maybe when I mounted the pc I thought this way I could access files from local-lvm thinking it was something different?

Don't know, but I read what you said and now I understand much better the structure of storage.
 
Last edited:

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!