So you've filled up your tiny /root partition on Linux... 😱

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 :heart: 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.

8 Likes

Or you could do this

Mike

That works too!

Although my method is more passive and doesn’t require messing with the actual filesystem. Also that guide glosses over if you already have users with stuff in /home you want to keep (even if it’s just your system prefs) - it just says ‘make sure /home is empty and not in use’ (I’ll help: cp -p -r /home /newhome before you unmount and delete the LVM volume, and then after step 8 before you reboot, mv /newhome /home - all assuming your root, before expansion, had enough space for whatever you had in /home to begin with.)

Obviously just having one big / is better if you have other things besides Flame chewing up space as well, so choose your own adventure! :smile:

Besides that rad article linked by Mike, please see the section Install Linux from the Flame User guide. There is some info that can eliminate the need for fixing later. Manual partitioning is covered at the bottom of the page.

Adding another resource for initial setup that covers both EFI and legacy: “KICKSTART INSUFFICIENT” error in “Installation Destination” when installing Rocky Linux 8.5 for Flame

I just knew that all my problems would be answered here at the Logik forums :smiling_face_with_three_hearts:

1 Like

This a brilliant way to rearrange paths. Thanks!

Remember the manual partitioning option in the main installer’s screen (an important update in autodesk’s iso) . A good reason to do it at the next SO installing.

1 Like