Relocate storage area in Ubuntu Server

I've recently set up a Dell Wyse 3040 as a small Repetier server for my few printers; its internal storage space is very small at 8GB, but it has a USB 3.0 port to which I've connected a 32GB USB stick. I am running Ubuntu Server 22.04 LTS

I've formatted the USB stick and mounted it at /media/usb on the file system.

I would like for all the Repetier server working files - uploaded gcodes, videos, images, whatever - to be stored onto this USB stick instead of the internal volume. Looking around, it seems the Repetier user files are stored in /var/lib/Repetier-Server.

Is it just as simple as copying that folder's contents to the USB stick, deleting that folder, and then setting the mount point of my USB stick to be /var/lib/Repetier-Server ?

(I haven't used Unix for close on 25 years, and then it was as a user of a big Solaris box, not an administrator..)

Comments

  • > Is it just as simple as copying that folder's contents to the USB stick, deleting that folder, and then setting the mount point of my USB stick to be /var/lib/Repetier-Server ?

    In theory yes. Just make sure it is mounted before server starts or you get problems when it creates file at mount point. Adding it to /etc/fstab as permanent and always leaving usb stick connected should do.
  • Thanks I'll give that a go. I assume if I used a symlink or something, the "disk free" bar graph in the web interface wouldn't work properly?
  • Maybe. I use a library function to query free space for that directory, so not sure if it sees it points to different drive. If you instead use it as mount point it should work, in the other case maybe.
  • I have had success doing this. The first time I failed, as I had formatted the USB stick as fat32, which didn't allow for any Unix permissions and such completely hosed the install.

    I set the server up again, this time formatting the stick as ext3 - and all works. To be clear for those that find this 12 months from now, I am mounting the USB stick (i.e. /dev/sda1) at /var/lib/Repetier-Server, with an ext3 file system.

    The disk free bar graph also works properly with this approach - it says I have 26.6GB free now (whereas before it only showed a few hundred MB)
Sign In or Register to comment.