Save static files (private + public) within a different volume on my server

Hi everyone,
I have erpnext V12 installed on my dedicated server.
My server has several devices installed and i would like to move all my static files to an other device.
You can see below my server devices.
My bench is on dev/md1 (/) which is almost full and i wanted to move all my static files to dev/md2 (/data). I tried to find a way to increase my bench volume by merging it with an other but as i understood i can’t do it without reinstall the whole server

Try to mount the sites directory inside frappe-bench directory to different volume.

e.g. /dev/md2 -> /home/frappe/frappe-bench/sites

Remember you’ll need to move contents of sites directory into new volume.

Thanks for your reply @revant_one !
Do you know how can i do this (which command to use )or maybe redirect me to a post/tuto that explain that ?
What about my database ? if tomorrow my DB size is greater than 40GB could i mount the db dir to a different volume ? What the best architecture for avoiding such problems in the long run ?

I post my solution here:
Step 1: I copied the entire sites dir to /data dir sudo cp -r /home/{user}/frappe-bench/sites /data
Step 2: I renamed the original sites dir sudo mv sites sites.orig
Step 3: I created new empty sites dir sudo mkdir /home/{user}/frappe-bench/sites
Step 4: I unmounted the fs from /data dir sudo umount /dev/md2
Step5: I mounted the fs from the new sites dir created at step 3 sudo mount /dev/md2 /home/{user}/frappe-bench/sites

This Post helped a lot


1 Like