The default auto partitioning when you install Linux for Flame will usually give you a smallish /root partition and a gigantic /home partition, relatively speaking to the size of your disk. This would be fine except that Flame doesnât actually put anything on /home, it lives in /opt - which is on the root partition unless you specified otherwise. Sooner or later (usually sooner) you run out of space on /root while /home sits there mostly empty.
But there is hope â you can move your bulky /opt/Autodesk onto a more roomy /home and put off the pain of backing up, reparitioning and starting from scratch. Kick the can down the road! Itâs all the rage.
Since this has come up more than once, I figured Iâd post a big little guide. Itâs not that complicated and a pretty benign operation, but this post just looks long because Iâll try to explain why youâre doing what youâre doing rather than just telling you a bunch of random things to type.
So, the general idea here is to move the contents of /opt/Autodesk somewhere else where you have more space (like /home) and then mount the new location back onto /opt/Autodesk such that, as far as Flame and the rest of the system are concerned, nothing really happened â it continues to use /opt/Autodesk (and you do too) but it just happens to actually live elsewhere in reality.
Nothin to it but to do it!
Before we migrate, first make sure Flame isnât running, and shut down ALL of the Flame/Autodesk services like Stone+Wire, Backburner, licensing, etc. You can use the Service Monitor utility that Flame installs to stop them all (you know the thing with all the buttons and the green lights.) We want to make sure no files are locked or in an unwritten state for some reason by any of the services running in the background.
Once everything is stopped, open a Terminal and make yourself root:
sudo su
(enter your user password)
Now weâll copy /opt/Autodesk into a new directory on /home where it will live â Iâm going to call it /home/opt_Autodesk
so itâs sort of obvious itâs not just another userâs home directory. Do not manually make this directory yourself first, or youâll wind up with an additional nested directory. The copy operation will take care of it:
cp -p -r /opt/Autodesk /home/opt_Autodesk
NOTE the lack of trailing slashes on the directories!
The -p option makes sure to clone all the file ownership and permissions, and -r tells it to copy recursevely, getting the entire directory structure.
The copy will take a bit of time, and will look like nothing is happening. You can add a -v
to the cp options above and watch it spew thousands and thousands of filenames into the terminal as it copies, but it will make it nearly impossible to see if any error messages if they occur.
Once itâs done and you get back to a shell prompt (and it didnât complain about anything) doing an ls /home/opt_Autodesk
should look the same as doing ls /opt/Autodesk
contents-wise.
Next, rename /opt/Autodesk to something else, rather than deleting it right away â backups are always good until you complete the whole operation and verify everythingâs working correctly with the new setup.
mv /opt/Autodesk /opt/old_Autodesk
Now make a new /opt/Autodesk directory, which will only serve as the mount point for our new actual location. While this is just a plain directory like any other, once you mount something on it the system âshadowsâ the contents of the directory in leiu of the mounted thingâs contents.
mkdir /opt/Autodesk
Now hereâs where the actual magic happens, by doing a special âbindâ mount to mount our new /home/opt_Autodesk
to the old /opt/Autodesk
so everything can go on using /opt/Autodesk as always. Note that weâre doing this manually just this one time:
mount --bind /home/opt_Autodesk /opt/Autodesk
At this point, doing an ls /opt/Autodesk
in the terminal should look exactly the same as ls /home/opt_Autodesk
If everything has gone well so far, the final important step is to add this mount to your /etc/fstab
file permanetly so it happens automatically on reboots.
Edit /etc/fstab
in your favorite editor â I
nano
because itâs already there and relatively friendly to use:
nano /etc/fstab
and add a new line somewhere that looks like:
/home/opt_Autodesk /opt/Autodesk none bind
If you donât know nano
, hit ctrl-x
to exit and follow the prompts at the bottom to save.
Now you can restart all the Autodesk services, again with Service Monitor, and then launch Flame and make sure things are all working normally - or it might be easier to just reboot, and then youâll have tested that too.
Thatâs it! Once youâre confident everything is good, you can delete the /opt/old_Autodesk
directory to free up the space on /root and stop the system from complaining about it.
Just remember that now your Flame installs, projects, etc. are actually in /home/opt_Autodesk
so donât accidentally delete it for some reason â but you can otherwise forget about it and keep on referencing /opt/Autodesk
like you always have.
Hope this helps someone in a pinch.