By datamonkey
Hi, I have a droplet that has been collecting some data for me, I now want to run a python script, which fails as follows:
out = open('data.tsv', 'w')
IOError: [Errno 28] No space left on device: '/data.tsv'
The problem is, I think there should be plenty of space. Running df -h produces the following:
Filesystem Size Used Avail Use% Mounted on
udev 235M 4.0K 235M 1% /dev
tmpfs 50M 344K 49M 1% /run
/dev/disk/by-label/DOROOT 20G 6.8G 12G 37% /
none 4.0K 0 4.0K 0% /sys/fs/cgroup
none 5.0M 0 5.0M 0% /run/lock
none 246M 0 246M 0% /run/shm
none 100M 0 100M 0% /run/user
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Actually, I believe this may be an issue of you telling it to delete files, but the system hasn’t actually done so, but the pointers are gone.
Run this:
lsof|grep delete
If you see a lot of things return, the simplest solution would be to reboot. It will clear up those files when it restarts.
I’m not great when it comes to coding but here’s a couple of things to check until a programmer comes along.
Sounds like a permissions issue. 1 ) Does the file you are trying to write to exist? 2) Are you going to run the script manually each time?
Sounds like if the file exists and you are manually running the script, you don’t have the correct privileges to write to the file.
Occasionally, a file will be deleted, but a process is still using it. Linux won’t release the storage associated with the file while the process is still running. You just need to find the process and restart it.
Try to locate the process.
sudo lsof / | grep deleted
The problematic process should be listed, then just restart it.
sudo systemctl restart service_name
If this doesn’t help, then I’ll recommend trying to reboot the droplet and see what happens.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.