Proxmox, NAS VM with file manager?

I’ve recently setup a Proxmox machine and I’m currently using OpenMediaVault to manage the drives and shares.

However… there is something I didn’t take into account. I have a 2Tb drive that is used for downloads and other temp storage. On this drive are a couple of folders for different purposes, but sometimes I need to move something from one folder to another on the same drive.

Doing this over the network means that the drive is reading the data, data goes over the network, and then the drive is writing the data again instead of just changing the file path.

The dream here would be to browse to a URL, then open up Folder A on the left, then open Folder B on the right, then select what I want to move and click a button.

I did some googling and it seems there is no file explorer/Manager for OVMs web interface which would have been the dream… unless anyone here has some ideas?

But, it looks like I may have to switch to something else that comes with or is easy to add a file manger to. Any suggestions?

NOTE: I am passing the drives straight to OMV. They are not part of a pool in proxmox. The idea here was that if something were to go wrong or I wanted to move away from OMV, the drives can just be straight switched. They are just dump storage drives… no VM or OS installs on them at all.

Not sure about NFS, but SMB (Samba) doesn’t need to copy files over the network, if you send it the commands to move a file from one place to another, no matter how big it is, it is going to be instantaneous, because the server is the one processing the request. At least that’s what I discovered and seemed to be the case (tried with a multi-GB file and it was done in less than a second, which shouldn’t be possible over a single Gbps network, not to mention the speed of SATA HDDs).

You could try to mix and match OMV with NextCloud, but I’m almost certain nextcloud has a DB of indexed files, so if you move a file using anything else other than nextcloud, that could be potentially a problem (unless nextcloud does reindexing from time to time). I prefer simple protocols like SMB, NFS and SSHFS over HTTP monstrosities like OMV and NextCloud though, but that’s just me.

1 Like

It’s definitely transferring over the network. Normally if I copy from one drive/share to the other drive.share using my Mint VM it would go at about 100MB/s which is about the limit for 1Gbps LAN. Moving a file from one location to another on the same drive was moving at about 40MB/s which makes sens as the drive was reading and writing at the same time.

That said, I ran into another unexpected issue where downloading a torrent directly to a SMB share from my Mint VM is not working for me… I think it’s a permission problem, but if the torrent goes really slow it seems to not error out.

I have the 500Gb from the old “server” so I might just throw that in and pass that to the Mint VM so I can download to that and when done I can move to the SMB share manually.

Not ideal, but should work.

I am also running OMV, and ran into a similar problem, as SMB has terrible performance outside of a LAN due to latency.

I setup a program called filebrowser, and it seems like it could do what you want.

I can confirm, at least with a SMB/samba share and a Windows client.

The transfer is not always instantaneous, but more in line with hard drive latency for a move, so way faster than a two-copy move.

From what I remember, random file access over samba is not necessarily ideal, and torrents have lots of random access normally.

Maybe if you download the chunks in order, that might help a bit?

2 Likes

OK, so just tried a cut and paste from my Windows machine and that does work. Doing the same action from my Mint VM does not… that transfers the data over the network. I think I’ll just stick to using my Windows machine to do file management when required.

Will try download the chunks in order and see what happens.

EDIT: Torrent is not working. I used Deluge as I can’t find an option to download in order with transmission. I know this going a little off topic, but is there a way to specify a user name ans password for the SMB share with Deluge or Transmission?

Hmm, interesting. It is possible that there is a mount option on the Mint system that will allow this to work, e.g. are you on a recent protocol version for the mount?

1 Like

err… I’m very recent to Linux. :stuck_out_tongue:

All I did was create a SMB share on OMV and then used the build in file manager, Thunar, on my Mint VM to browse to the share under other locations.

Hmm, that could be it. You could try mounting it manually,
like mount -t cifs -o user=<username> //<IP>/<share_name> /mnt/<share_name>
Then see if the moving is working correctly.

I figured it out. I have 2 separate shares on the drive and cut and pasting from one share to the other does not work, but cut and pasting in the same share does.

Should have realized this before.

I’m now wondering if I do a manual mount with the right user account if the torrent will then download fine straight to the SMB share…

2 Likes

Tried the command with all the correct values based on my setup and even googled it, but it says no such file or directory on the /mnt/ part.

Do I need to create a local location first?

Yes, sorry I didn’t mention that.

OK, tried that, still same error :frowning:

If you got questions about Samba, feel free to ask them. I’m an intermediate samba user. Also, if you ever have Linux problems, always feel free to ask on The Small Linux Problem thread on the forum. :slight_smile:

Yeah, you should create the folder where to mount it. But I can give you a better option, I made a script that uses autofs and automatically mounts samba mounts to /mnt/whatever-folder/samba-share. I think you will find it pretty nifty, because it can update your mounted samba folders every time you add a new share.

I’ll have to find it first and then post the instructions, it’s a little bit of work, but it should be doable in less than 5 minutes if you know how to follow instructions.

After following a guide online on how to use mount and making the directory with mkdir I got the mount done. Now Transmission is telling me it has no permission to write to that location. The previous error said something about the operation is not supported.

Anyway, it’s 23:30 here so calling it for today. Will do some more research tomorrow morning to se if I can fix the torrent issue, but will probably just install the old 500Gb drive and use that.

Thanks guys.

I know it’s probably 3am in your timezone when I’m posting this comment, but you may read it tomorrow (which should be today for you).

I made the above tutorial. If you go to the tl;dr, you will find a script. Just copy that into a script file (can be called anything, I named mine deploy-autofs.sh), make it executable by doing chmod u+x file-name.sh, then do a sudo ./file-name.sh. Following that, you will have a new script in your home folder called mkautofssmbconf.sh, that you should run by doing

./mkautofssmbconf.sh <samba-server-dns-name-or-ip-address>

It should do everything for you. When you will try accessing /mnt/remote/Your-Samba-Share, all your stuff should be already there. If you don’t skip to the tl;dr, you will understand what the script does.

I know running random commands found on the internet without knowing what you are doing is not exactly secure or a safe thing to do, but TBH, running online scripts is the easiest, most reproducible thing to help people configure stuff without spending hours to try to find and click on menus. And it reduces human error.

1 Like

That’s a pretty cool script. I’ve bookmarked it for potential future use. For now I just wanted one mount for Transmission to work properly and not give unnecessary access to all the shares.

I did end up getting Transmission to download to a mount by adding the following to my fstab file. No idea if this is 100% correct, but it works I guess:

//<ip>/<share> /mnt/<name> cifs user=<uname>,password=<pass>,uid=1000,gid=1000,dir_mode=0777,filemode=0660

Hopefully I understand you correctly. Adding a second host only network bridge to your Proxmox host and a second virtual network card to the file server vm (and other VMs who need access) could be the solution. That’s what I did in order to share data among my VMs and volumes within proxmox host, I gave it another range (physical 192.168.0.x vs host only 192.168.122.x ) so I can adress it easily. This way you are not limited by your physical NIC or network. Proxmox itself can also access this host only network.

Edit: But you still need to remote into one of the VMs or Proxmox cli with this setup in order to transfer files.

Edit 2: But if you reference your newly created internal network in the web management interface of the file server it should work and the data should not be transferred over your LAN.

Copying files externally from share to share will still use the local network ofc.

1 Like

Interesting solution. I think it’s OK as is for now. I made the mistake of moving files from one share to another share which uses the network even though both shares were on the save drive. That’s on me not thinking it through properly.

If I do a Move from one folder to the next within the same share location and drive, then it’s instant like expected. So I was just doing it wrong.

I think for 99% of time I will only be moving stuff within the same share. It’s not often that I move/copy stuff from one drive to the next and in that case it will have to do a full read and write anyway.

I do have a small network issue posted in the Small Linux issue thread where I need some advice. I think the easiest might be to just get a new network card and not use the onboard:
https://forum.level1techs.com/t/the-small-linux-problem-thread/75538/4810