(beginner) Storage mistakenly created inside PVE storage? Need help fixing/doing it properly

qda

New Member
Jan 24, 2024
5
0
1
So I am more or less a complete beginner here (apologies in advance!), and have been trying to follow various guides.

I'm running PVE 8.1.3 on an old PC with a single 1TB drive. I have a LXC for running Plex, and I wanted to create a storage volume for holding media files that I could also mount on a local Windows machine. So I mounted a 480GB storage ("homeshare", SMB, I think) to the LXC and followed some guides to mount it on the Windows machine as well.

1706133500189.png

This is what I have under "Datacenter" > "Storage":

1706134315714.png

Everything seemed fine except I recently noticed that the HD space for the PVE node is filling up almost completely. Running the du -smh /* command revealed that the "/homeshare" folder was taking up 96GB. I assume this means that I made a mistake somewhere and managed to mount the SMB storage inside the PVE node. To confirm this, I copied some files using the Windows machine into the /homeshare folder, and sure enough, the disc usage in the node increased:

1706133774194.png

The strange thing is that deleting files from /homeshare (again from the Windows machine) does not reduce the space used at all. Some Googling led to the fstrim -a command, which didn't do anything when run from the node's Shell.

Can someone help me fix this mess? I would really appreciate help with 1) recovering the space, and 2) creating the storage/mount properly. I am totally okay with deleting the existing storage/mount and recreating it. Thanks in advance!
 
Last edited:
What likely happened is you wrote data to /homeshare when nothing was mounted there. When you added a mount that hid the files already located in that folder. You need to unmount /homeshare and examine the directory after that.
You did not indicate how you mounted your additional disk, whether its done manually or through fstab. You may want to add "is_mountpoint" option to your storage definition:
Code:
 --is_mountpoint <string> (default = no)
           Assume the given path is
This will tell PVE that it should expect this to be mounted before using.


Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
 
You may want to add "is_mountpoint" option to your storage definition:
Code:
--is_mountpoint <string> (default = no)
Assume the given path is
This will tell PVE that it should expect this to be mounted before using.
Command would be: pvesm set homeshare --is_mountpoint /homeshare
With that the storage will fail if the SMB share isn't mounted instead of filling up your root filesystem.
 
Last edited:
What likely happened is you wrote data to /homeshare when nothing was mounted there. When you added a mount that hid the files already located in that folder. You need to unmount /homeshare and examine the directory after that.
You did not indicate how you mounted your additional disk, whether its done manually or through fstab. You may want to add "is_mountpoint" option to your storage definition:
Code:
 --is_mountpoint <string> (default = no)
           Assume the given path is
This will tell PVE that it should expect this to be mounted before using.


Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
Okay, this may be a dumb question, but where should I unmount /homeshare from? I've tried unmounting it via the web UI from the Plex LXC, and now, under Resources, it says:

1706141058156.png

I then removed the homeshare entry from Datacenter > Storage (which I shouldn't have done?), and I tried the Remove action from the Plex LXC Resources page. It gives the following message, presumably because I've removed the entry from Datacentre > Storage:

1706141400003.png

Now the Plex LXC Resources page has this, even after restarting the container:

1706141318866.png

Despite removing everything, in the PVE shell, the homeshare folder is still the same size as before. It contains only three items:

1706141537932.png

Should I try removing it? I feel a bit like a bull in a china shop.

Edit: I think I did everything through the web UI when first mounting it. It was a few months ago and I'm afraid I don't remember exactly which steps I followed. Is there a way to figure it out? Based on the fact that the term "storage definition" does not ring any bells, I'm guessing that wasn't the option I used.
 
Last edited:
Okay, this may be a dumb question, but where should I unmount /homeshare from? I've tried unmounting it via the web UI from the Plex LXC, and now, under Resources, it says:
Do the reverse of how you mounted it. Something like umount /homeshare. You probably edited your PVE hosts /etc/fstab to mount it or you actually never mounted it in the first place which is why stuff gets written to the root filesystem.

I highly recommend properly documenting everything you do, so you can look up what you did months or years later.
 
Last edited:
Do the reverse on how you mounted it. Something like umount /homeshare. You probably edited your PVE hosts /etc/fstab to mount it or you actually never mounted it in the first place which why stuff gets written to the root filesystem.
I don't remember mounting it in the PVE node, so perhaps that's it. My /etc/fstab in the PVE shell looks like this:

Code:
# <file system> <mount point> <type> <options> <dump> <pass>
/dev/pve/root / ext4 errors=remount-ro 0 1
UUID=C215-8345 /boot/efi vfat defaults 0 1
/dev/pve/swap none swap sw 0 0
proc /proc proc defaults 0 0

Does this mean I can simply delete the homeshare folder from the PVE shell? The only file visible from shell is homeshare/images/110/vm-110-disk-0.raw (110 is the Plex LXC), which ls -l --block-size=G tells me is 480GB (this is what I had set the size of homeshare to be). Can I just delete the whole thing?
 
Last edited:
Does this mean I can simply delete the homeshare folder from the PVE shell? The only file visible from shell is homeshare/images/110/vm-110-disk-0.raw (110 is the Plex LXC), which ls -l --block-size=G tells me is 480GB (this is what I had set the size of homeshare to be). Can I just delete the whole thing?
Depends if you want to lose the data you stored on it in plex.
 
Depends if you want to lose the data you stored on it in plex.
Oh, I don't care about that data. Just wanted to check I wasn't doing something stupid. Also, I found the line unused0: homeshare:110/vm-110-disk-0.raw in the conf file for the Plex LXM. I assume I can just remove that, since homeshare no longer exists, right?
 
So I mounted a 480GB storage ("homeshare", SMB, I think) to the LXC and followed some guides to mount it on the Windows machine as well.
Thats not a SMB share. Thats a virtual disk. If you want a SMB share you should create something like a OpenMediaVault VM or LXC with cockpit/webmin/fileserver and a virtual disk to store your media on it. Share that media via SMB. Mount that SMB share on the PVE host. Bind-mount that mountpoint from the PVE host into the plex LXC.
PVE is not a NAS. If you want to share something via SMB you need to setup some kind of SMB server yourself.
 
Last edited:
Thats not a SMB share. Thats a virtual disk. If you want a SMB share you should create something like a OpenMediaVault VM or LXC mit cockpit/webmin/fileserver with a virtual disk to store your media on it. Share that media via SMB. Mount that SMB share on the PVE host. Bind-mount that mountpoint from the PVE host into the plex LXC.
PVE is not a NAS. If you want to share something via SMB you need to setup some kind of SMB server yourself.
Ah sorry, I just meant that I shared it out using SMB from the Plex LXC.

Update: Removed the homeshare directory from the host, and the space is freed up. Everything seems dandy. Many thanks for your help!
 
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!