Rclone SMB Mount on Ubuntu/LXC - 💪The Power of Caching

แชร์
ฝัง
  • เผยแพร่เมื่อ 9 ก.ค. 2024
  • SMB (or Samba) is one of the most common protocols to mount remote folders. But SMB via Rclone is my preferred method.
    In this video I show you how to mount a remote folder, such as from your Network Attached Storage device, on an Ubuntu/Debian server, using Rclone.
    In addition, I also explain the advantages of mount SMB via Rclone compared to a traditional SMB mount on a Linux server.
    For this demo, I will continue building on the Proxmox Ubuntu 22.04 unprivileged LXC that I built in my previous videos. But the procedure is the same for nearly all environments of Ubuntu/Debian.
    #proxmox #homelab #minilab #homeserver #ubuntu #docker #rclone #cifs #smb
    TIMESTAMPS
    0:00 Introduction
    3:07 Proxmox LXC Modifications
    5:24 Setting up FUSE and Customizing It
    6:47 Rclone Install and Rclone Config
    10:09 Mounting Rclone Remote and SystemD Script
    16:30 Next Steps
    17:04 Advantages of Rclone SMB Mount
    19:58 Wrapping Up
    RELEVANT LINKS (in the order of appearance):
    🔗 Homelab Tour: • Mini Homelab Tour - I ...
    🔗 Docker on Proxmox Unprivileged LXC: • Docker on Proxmox LXC ...
    🔗Ultimate Docker Media Server: www.smarthomebeginner.com/doc...
    🔗 Proxmox Bind Mounts: pve.proxmox.com/wiki/Linux_Co...
    🔗 Rclone Install: rclone.org/install/
    🔗 GitHub Repo: github.com/htpcbeginner/docke...
    🔗 Docker Traefik Guide: www.smarthomebeginner.com/tra...
    🔗 github.com/htpcBeginner/docke...
    🔗 github.com/htpcBeginner/docke...
    ULTIMATE DOCKER SERVER SERIES:
    Playlist: • Mini Homelab Tour - I ...
    AUTO-TRAEFIK:
    📰 www.smarthomebeginner.com/go/...
    🎞️ • Auto Traefik 2 - Docke...
    GITHUB REPOSITORIES:
    📜 github.com/htpcbeginner/docke...
    MY PROXMOX HOST:
    🖥️ Topton V700 Intel i7-13800H Mini PC with 64 GB RAM: www.smarthomebeginner.com/go/... (Affiliate Link)
    SUPPORT MY WORK:
    🤝 www.smarthomebeginner.com/go/...
    JOIN THE COMMUNITY:
    👋 www.smarthomebeginner.com/go/...
    🌐 www.smarthomebeginner.com/
    FOLLOW US ON SOCIAL
    Get updates or reach out to Get updates on our Social Media Profiles!
    👥 Twitter: / anandslab
    👥 Facebook: / anandslab
    👥 Instagram: / smarthomebeginr
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 37

  • @AnandsLab
    @AnandsLab  2 หลายเดือนก่อน +3

    15:55 If the Rclone mount fails, check Rclone log file (as in the SystemD script) for errors. I should have mentioned this in the video.
    Relevant Files:
    github.com/htpcBeginner/docker-traefik/blob/master/scripts/systemd/rclone-ds918.service.example
    github.com/htpcBeginner/docker-traefik/blob/master/scripts/hs/start-media-after-boot.sh.example

  • @vitusyu9583
    @vitusyu9583 28 วันที่ผ่านมา

    Great work, very interesting,

  • @FloTexaTenn
    @FloTexaTenn หลายเดือนก่อน

    Another excellent video, Anand. From a Auto Traefik + supporter :-), a video on the use of your script to delay spinning up of the media apps would be PHENOMENAL! I have a method now that works without scripts, but I would love to try your script.

    • @AnandsLab
      @AnandsLab  หลายเดือนก่อน

      Hey thanks! Here you go: github.com/htpcBeginner/docker-traefik/blob/master/scripts/hs/start-media-after-boot.sh.example

  • @fanofc-adecoulomb8477
    @fanofc-adecoulomb8477 หลายเดือนก่อน

    Great work. I was getting an error when I attempted to force-recreate jellyfin after successfully enabling SMB_NFS mount...I had to comment out the following two lines from your original yml - $DATADIR/data/media:/data/media1 - $DATADIR/data2/media:/data2/media2. The error was: Container jellyfin Starting 78.4s
    Error response from daemon: error while creating mount source path '/media/rclone/MYSMB/data/media': mkdir /media/rclone/MYSMB/data/media: input/output error Any ideas??

  • @MarkConstable
    @MarkConstable 2 หลายเดือนก่อน +1

    Good video, thanks. What would be the difference between using rclone to mount a smb share compared to using smbnetfs? Ah... spoke to soon, I got to the end of the video and it's the cache which is makes the difference.

    • @AnandsLab
      @AnandsLab  2 หลายเดือนก่อน +1

      Thanks. Glad it was informative.

  • @jongyrocka
    @jongyrocka 2 หลายเดือนก่อน +1

    This is a great concept and I implemented it, but ran into one major issue. Polling-interval is not supported by this remote. So any changes / new files added on the host are not reflected on the rclone mount unless you restart the service. Are you experiencing the same?

    • @AnandsLab
      @AnandsLab  2 หลายเดือนก่อน

      Thank you! When you say "new files added on the host", do you mean the machine running rclone? Or the SMB server? Please explain, I may have experienced this couple of times.
      Take a look at this to see if it addresses your problem: forum.rclone.org/t/can-you-refresh-a-mounted-remote-without-polling/22144
      Let me know how it goes.

    • @jongyrocka
      @jongyrocka 2 หลายเดือนก่อน

      @@AnandsLab New files added on the SMB server. File's added to the machine running rclone, will upload to the SMB server instantly, but files added directly to the SMB server, rclone will not pick this up without restarting. Setting the log level to info instead of errors, indicates that polling interval is not supported by this remote.

    • @Ripichip1
      @Ripichip1 2 หลายเดือนก่อน

      @@jongyrocka Greetings, I hope you are well, I also realized this problem, the solution is to change the value of ¨--dir-cache-time¨, for example, 10s. Restart the server and it should resolve.

  • @Jarery2000
    @Jarery2000 2 หลายเดือนก่อน

    in the video of the systemd script, there is a line that is --user-agent home-server \ but in the scripts on your github its --user-agent cDoc \ . is this an important variabkle and what should it be ?

    • @AnandsLab
      @AnandsLab  หลายเดือนก่อน

      It’s not important. You can pick any name

  • @Thiccalus
    @Thiccalus 2 หลายเดือนก่อน

    Thanks for your videos as always Anand... I am going to try to use rclone on my recently setup LXC Ubuntu Host before moving on to step 2 of your renewed guide.
    I currently have 4 8tb HDDs in a single system (the same one that proxmox is installed on) in a ZFS pool running Raidz.. hoping rclone will enable my unprivileged host to communicate with the ZFS pool, which is where I will store all of media for my media server stack.
    Probably not going to spring for the auto-traefik script just because I am really doing this to learn, what is the best other way to help you out, a subscription on your website?

    • @AnandsLab
      @AnandsLab  2 หลายเดือนก่อน +2

      Hey Thanks for the kind words. Setting up Rclone and moving to the next guide sounds like a plan. But remember, you will have to setup SMB share on proxmox host. If you are familiar with bind mounting, that might be an easier way to as well if all your media is on the same system as the proxmox host. Give me a week or so I will try to make video on bind mounting.
      No worries on the script. In fact, I recommend doing it the hard way to learn. But some of the membership levels do provide free access to the script: www.smarthomebeginner.com/membership-account/memberships-products-services/

    • @Thiccalus
      @Thiccalus 2 หลายเดือนก่อน

      @@AnandsLab thanks anand, you are the best!
      I followed another guide that took me through setting up an smb share, and confirmed it was working by uploading a file to the smb share (also running in an LXC with Debian 11 and cockpit for Identity access management) and such. To do this we did bind mounting, so it would make sense that I could use bind mounting to make the ZFS pool visible to the Ubuntu LXC, I was a bit concerned I may run into permission issues with the unprivileged Ubuntu host trying to access that bind mounted drive, but maybe I am over thinking it.
      Anyhow, really appreciate all you do.
      Thanks again.

  • @reyastaroth
    @reyastaroth 2 หลายเดือนก่อน

    Hello! I have the shared folders of the HP gen8 with NFS (multimedia) and also the downloads folder (nas synology DS218+), until now I have it in a VM with DietPi and mounted everything with NFS to the virtual machine.
    What advantages does rclone offer versus NFS?
    I understand that if it is an LXC container it is an rclone option.
    It could also be mounted via NFS on the LXC, right?
    Thanks for your videos!!!

    • @AnandsLab
      @AnandsLab  2 หลายเดือนก่อน

      Hi! Rclone offers the advantage of caching. But Rclone does not support NFS mounts. Only SMB/CIFS. Caching can be beneficial but sometimes might require manual (or automated via cron/script) refresh of caching for new files to show up immediately.
      Only privileged LXC can mount NFS. I use (as in the video), unprivileged LXC, which cannot support NFS or SMB mounts. So Rclone is the best option or use Proxmox bind mounts.

    • @reyastaroth
      @reyastaroth 2 หลายเดือนก่อน

      @@AnandsLab I understand that you have to empty the cache directory to fill it again using cron/script, do you have this step documented?

    • @AnandsLab
      @AnandsLab  2 หลายเดือนก่อน

      Actually it is simpler than that. You do not need to empty the cache. You just need to refresh/force a scan of new files. Should only take seconds. I lost that command. I will update here when i find that command.

    • @reyastaroth
      @reyastaroth 2 หลายเดือนก่อน

      ​@@AnandsLab Okey!!! Thank you for your trouble

  • @ravndude
    @ravndude หลายเดือนก่อน

    Which script are you editing? under systemd, is it rclone-drive?

    • @AnandsLab
      @AnandsLab  หลายเดือนก่อน

      Ping me on Discord, I will send you latest one. I made some improvements since publishing the video. I haven't pushed it to GitHub yet.

  • @mithubopensourcelab482
    @mithubopensourcelab482 2 หลายเดือนก่อน

    Good job indeed. This is the easiest way to take backup. Can Rclone preserves versions ?

    • @AnandsLab
      @AnandsLab  2 หลายเดือนก่อน

      Keep in mind that Rclone is not a backup system and does not do versioning.

  • @la3135
    @la3135 หลายเดือนก่อน

    Hi Anand, great instruction video! This was very useful and I like the idea of using a cache of media consumption and keep the "backend storage" on "low power mode". However, what are the options if you don't want to use SMB? Might a S3 backend using Minio f.i. better for faster access and transfer times from rclone to S3 Minio? And what about connecting rclone to NFS server? This last one seems not to be possible, since I don't see a storage backend for NFS in the rclone config. Please let me know what your thoughts are. Have a great day and looking forward to your other posts on this channel!!

    • @AnandsLab
      @AnandsLab  หลายเดือนก่อน +1

      Rclone does not support NFS unfortunately. If SMB does not work there is SFTP support, which is an FTP over SSH connection. Unfortunately, I have no experience with S3 Minio.

    • @la3135
      @la3135 หลายเดือนก่อน

      @@AnandsLab Thanks Anand, SFTP works fine and is less complex than Minio

  • @mithubopensourcelab482
    @mithubopensourcelab482 2 หลายเดือนก่อน

    Can you create a video tutorial on Minio Server ? I have installed minio server, but could not use it....

    • @AnandsLab
      @AnandsLab  2 หลายเดือนก่อน

      I would love to at some point. But honestly it is going to take a while until i finish all my basic docker videos.

  • @jayparton5584
    @jayparton5584 หลายเดือนก่อน

    I am getting this response after the chown command. I have double checked the typing and its the same as yours except my username of course.
    chown: cannot read directory 'cache/lost+found': Permission denied

    • @AnandsLab
      @AnandsLab  หลายเดือนก่อน

      Why is there a lost+found inside your cache folder? Are you mounting a whole disk as your cache folder? If so, I would recommend against it. Create a folder called cache inside the disk.
      Alternatively, the lost+found is not so important. You can try with sudo.

    • @ravndude
      @ravndude หลายเดือนก่อน

      @@AnandsLab i missed the options of deselecting backup and selecting skip replication. My mistake. I successfully completed this rclone method. thank you!!!!!

  • @nadpul
    @nadpul 2 หลายเดือนก่อน +1

    How about sshfs?

    • @AnandsLab
      @AnandsLab  2 หลายเดือนก่อน

      Yes. Rclone supports SFTP protocol and there sshfs should work with FUSE as described in the video.

    • @nadpul
      @nadpul 2 หลายเดือนก่อน

      @@AnandsLab the nice thing about sshfs is that you don’t need to deal with samba and add shares and users, it is same as ssh, you only need the credentials and you have access to the user’s directory.
      This is to clarify to your followers here.
      As for performance that might not be the best choice, but I am no expert.