Opentrons / buildroot

The Opentrons fork of buildroot for building the OT2 system. Our default branch is opentrons-develop.
http://buildroot.org
Other
10 stars 7 forks source link

Root filesystem is low on space #144

Open SyntaxColoring opened 2 years ago

SyntaxColoring commented 2 years ago

This issue follows up on #143 by aggregating further ideas to free up space on the filesystem. (Other Opentrons folks, feel free to edit this list.)



See also https://github.com/Opentrons/opentrons/issues/8184, which has some investigation for what counts as "full."

arogozhnikov commented 1 year ago

git is very useful for users like me - so that code of utilities working on opentrons is taken/stored at git repo, not just laying on the robot

SyntaxColoring commented 1 year ago

@arogozhnikov Thanks for your feedback.

Can you tell us a little more about how you're using Git on the robot? Are you doing something like this?

# SSH into the robot.
$ ssh -i $MY_SSH_KEY root@$MY_ROBOT_IP_ADDRESS

# Now that we're on the robot, use Git to download files from a remote repository.
cd /data/user_storage/my_repo
git pull

If so, could you replace that with something like this?

# On your PC, use Git to get the latest files.
cd ~/my_repo
git pull

# Delete any old files on the robot.
ssh -i $MY_SSH_KEY root@$MY_ROBOT_IP_ADDRESS rm -rf /data/user_storage/my_repo
# Use scp to push the latest files from your PC to the robot.
scp -i $MY_SSH_KEY -r ~/my_repo root@$MY_ROBOT_IP_ADDRESS:/data/user_storage/my_repo
arogozhnikov commented 1 year ago

@SyntaxColoring it is a two-way sync (notebooks from robot stored to the repo)

SyntaxColoring commented 1 year ago

Would rsync work instead of git?

The robot doesn't currently have rsync installed. I don't know if it would actually be smaller than git, but it might be.

arogozhnikov commented 1 year ago

I think rsync would do.

But

May I ask why you say 'low on space'?

E.g. it looks I have 16Gb on robot and I'm happy to spend 3-4Gb to get more tools rather than suffering from sh (that doesn't even support readline)... or from missing nano/git ... or missing ssh client. Example: your support recommends using reverse tunnel, but there is no ssh client on robot 🤷

SyntaxColoring commented 1 year ago

May I ask why you say 'low on space'?

E.g. it looks I have 16Gb on robot [...]

It has to do with the way the SD card is partitioned. The whole card does indeed have plenty of space. That's the 16 GB you're seeing. But the root partition only has something like 312 MB.

Our robot software updates work by atomically overwriting the whole root partition, basically leaving the rest of the SD card alone. So all of our executables and libraries live on the root partition. This can and has filled up its 312 MB beyond the conventional 95% limit, to the point where it couldn't even fit a few additional Python packages.

I'm happy to spend 3-4Gb to get more tools rather than suffering from sh (that doesn't even support readline)... or from missing nano/git ... or missing ssh client. Example: your support recommends using reverse tunnel, but there is no ssh client on robot 🤷

Agreed. It's just a matter of unlocking the rest of the 16 GB.

We're pursuing an approach like this:

arogozhnikov commented 1 year ago

Let's see how it goes. Userspace binaries should work (though registry with binaries would help).

As for python packages - I've tried scipy / pillow, but neither worked (unsurprisingly). Not that it I need it right now, but I have to lower my expectations from 'I have a machine that can orchestrate things in the lab with flexibility of python' to 'I shouldn't expect more than liquid handling'.