[SOLVED] How can i disable /var/tmp from being used when uploading .ISO files?

nomizfs

Renowned Member
Jan 7, 2015
52
9
73
Hello, My PVE rpool is on a small 128GB M.2 2242 SSD, and i use a enterprise U.2 SSD for everything not related to rpool.

I have disabled local and local-zfs in Datacenter storage. Then i have created the corresponding storage on the datacenter SSD.

However, when i upload a .ISO file, it first gets written to /var/tmp on the rpool, and then copied to the datacenter SSD. Is there any way to disable this, to reduce unnecessary writes to the M.2 SSD?

One forum post suggested setting Content to empty on local, but i'm unable to do that from the GUI (content box turns red and prevents from pressing OK)

I have also tried adding tmpdir: /zpool_800G/tmp/ to /etc/vzdump.conf m but that seemed to have no effect. Is there any other solutions to this?

Thankyou

pve_storage.png
pve_upload.png
 
I'm still surprised Proxmox uses /var/tmp instead of /tmp because ISO uploads don't need to survive a reboot (the main reason for /var/tmp to exist). If it used /tmp, you could simply use a tmpfs for it.
 
Thank you @Neobin , i'll mark this as solved, since this issue is getting attention from developers, and it's likely it will be improved in the future.
 
hi @nomizfs, I believe this bug is still open/outstanding right?

I have my Proxmox instance on the latest version, and I still run into this...

For now, I use the tmp directory as a workaround..

Is there any visibility in when this will be resolved?
 
It's 2025 and it's still happening.
This is still an issue even 2 years later.

The workaround is still there but I find it problematic as you have to give too broad permissions on that folder for the upload to actually go through.

Also, I don't see why you need to upload things to a folder just to be moved to another. Sounds silly.
 
Last edited:
can i get more details on how this works? i'm a very new new person and i grasp at a high level what you're saying but no idea how to do it.

i've got a multipath drive mounted for a directory where i'm trying to do the upload. i however cannot get that to take the tmp files. any help would be greatly appreciated.
 
hi @nomizfs, I believe this bug is still open/outstanding right?

I have my Proxmox instance on the latest version, and I still run into this...

For now, I use the tmp directory as a workaround..

Is there any visibility in when this will be resolved?
Hi all, sorry for no reply, i been away from this for years. I have no clue about this, i had been expecting the dev team to figure this out, but afaik no solutions yet, other than creating custom directories etc.. I would prefer a real solution. Everytime i upload a big 3GB+ ISO to my poor old 128GB SATA 2242 M.2 SSD my heart bleeds. And minutes roll by as it is s l o w l y copied after upload. It's really untenable.
 
Without knowing if relevant, i recently upgraded to PVE 9 (debian trixie) and now remember skimming the changelog and noticed a mention that in Trixie, /tmp is now a RAM disk, just like in Fedora etc, so if anyone here is inclined to check, is /tmp actually a ramdisk in PVE9, and so this is no issue?
 
update.. /var/tmp is still not a ramdisk it seems:

Code:
# mount | grep tmp
udev on /dev type devtmpfs (rw,nosuid,relatime,size=131949456k,nr_inodes=32987364,mode=755,inode64)
tmpfs on /run type tmpfs (rw,nosuid,nodev,noexec,relatime,size=26399632k,mode=755,inode64)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev,inode64)
tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k,inode64)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,size=131998160k,nr_inodes=1048576,inode64)
tmpfs on /run/credentials/systemd-journald.service type tmpfs (ro,nosuid,nodev,noexec,relatime,nosymfollow,size=1024k,nr_inodes=1024,mode=700,inode64,noswap)
tmpfs on /run/credentials/getty@tty1.service type tmpfs (ro,nosuid,nodev,noexec,relatime,nosymfollow,size=1024k,nr_inodes=1024,mode=700,inode64,noswap)
tmpfs on /run/user/0 type tmpfs (rw,nosuid,nodev,relatime,size=26399628k,nr_inodes=6599907,mode=700,inode64)
 
Files /var/tmp are supposed to survive a reboot (unlike files /tmp) and is therefore typically not a RAM-disk. Maybe Proxmox developers chose /var/tmp because it is usually bigger than /tmp?
 
  • Like
Reactions: nomizfs
Files /var/tmp are supposed to survive a reboot (unlike files /tmp) and is therefore typically not a RAM-disk. Maybe Proxmox developers chose /var/tmp because it is usually bigger than /tmp?
Yeah.. Still with trixie now running /tmp as a ramdisk, this issue would be easily solved if there was an option to use /tmp instead of /var/tmp for ISO uploads..
 
Tmpfs is RamDisk. Those both configs are an bug.
Why an ISO upload need an caching folder is strange.
 
Last edited:
This is still an issue even with 9.1. Is this configurable? I would like to change the location, so I don't have to manually copy isos to the HDD.
Also, if the disk setup could be more configurable so that it can align with the DSA STIG. That would also be awesome. mainly having /var a separate disk would work so I don't have to break it out later.
 
Last edited:
This is still an issue even with 9.1. Is this configurable? I would like to change the location, so I don't have to manually copy isos to the HDD.
Also, if the disk setup could be more configurable so that it can align with the DSA STIG. That would also be awesome. mainly having /var a separate disk would work so I don't have to break it out later.
It's not really solved, if anyone knows how i can remove the [SOLVED] status from this thread i will