Hi
I use a raspberry pi 2 with a 3TB HDD USB and 16G SD.
I installed ProFTP, BitTorrent, Kodi and MiniDLNA and I am using them from about one mounth without issues.
Now, BitTorrent does not work correctly because of
Error: Unable to save resume file: No space left on device
I ran 'df' command and I found that /dev/root is 100% used.
I ran 'du' command under root directory to undestand which are the files filling space but the only ones present are kodi files and they fill just 159M.
I also updated dietpi from 142 to 143 rev without any advantage.
How is it possible?
Can you help me to solve this mystery?
Thanks
Francesco
RPI2 - No space left on device
Re: RPI2 - No space left on device
Hi,francescoG wrote: Now, BitTorrent does not work correctly because of
Error: Unable to save resume file: No space left on device
Possible data meant for USB drive has been stored on SD card. This can occur if the USB drive is not mounted during boot (can happen, especially with RPi).
Lets check current filesystems. Please take you take a picture/screenshot of the following commands:
Code: Select all
df -h
blkid
Code: Select all
readlink -f /mnt/dietpi_userdata
Code: Select all
dietpi-services stop
umount /mnt/usb_1
ls -lha /mnt/usb_1
Code: Select all
ls -lha /mnt/usb_1
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
Donating is the easiest – you can use PayPal or become a DietPi patron.
-
- Posts: 9
- Joined: Sat Dec 31, 2016 1:19 pm
Re: RPI2 - No space left on device
Hi,
thanks for the quick reply.
I followed the steps that you've shown me (see attached file Immagine.jpg).
I also deleted all pending transmission downloads and unpluged USB drive.
But when I power on, RPI generates the error showed in attached immagine2.jpg
Note that this issue is very similar to that I wrote to you in my previous thread (see http://dietpi.com/phpbb/viewtopic.php?f=11&t=1123).
thanks for the quick reply.
I followed the steps that you've shown me (see attached file Immagine.jpg).
I also deleted all pending transmission downloads and unpluged USB drive.
But when I power on, RPI generates the error showed in attached immagine2.jpg
Note that this issue is very similar to that I wrote to you in my previous thread (see http://dietpi.com/phpbb/viewtopic.php?f=11&t=1123).
Re: RPI2 - No space left on device
Is this when the drive is plugged in?francescoG wrote:But when I power on, RPI generates the error showed in attached immagine2.jpg
It looks like RootFS is filled, I believe due to USB drive not being mounted during a boot, transmission downloads then stored on SD.
You need to psyhically remove the USB drive from system, power on, then run following to free up the space:
Code: Select all
rm -R /mnt/usb_1/*
As for a prevention:
DietPi adds rootdelay=10 to /boot/cmdline.txt as a workaround for this known issue. Although, some drives may still not be detected during each boot. You could try increasing this value.
This is a problem with the RPi itself.
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
Donating is the easiest – you can use PayPal or become a DietPi patron.
-
- Posts: 9
- Joined: Sat Dec 31, 2016 1:19 pm
Re: RPI2 - No space left on device
I accurately followed the steps that you've shown me, so the error is when I powered on the system without USB drive (psyhically removed from system).
Any way, despite the error, I tried to run
rm -R /mnt/usb_1/*
in a putty window but RPI remains as if it were frozen (I have to use Ctrl C to have the cursor back again) see immagine3.jpg
After this, when I reboot the system always without USB drive plugged in, I always have the error showed to you in immagine2.jpg
I do not know if it is important but there is not any /var/swap directory on my RPI. swap file is on USB drive.
Any way, despite the error, I tried to run
rm -R /mnt/usb_1/*
in a putty window but RPI remains as if it were frozen (I have to use Ctrl C to have the cursor back again) see immagine3.jpg
After this, when I reboot the system always without USB drive plugged in, I always have the error showed to you in immagine2.jpg
I do not know if it is important but there is not any /var/swap directory on my RPI. swap file is on USB drive.
Re: RPI2 - No space left on device
Ok, we'll need to disable the mount entry for this drive, SystemD is waiting for the drive to become available and will hang those commands.francescoG wrote: in a putty window but RPI remains as if it were frozen (I have to use Ctrl C to have the cursor back again) see immagine3.jpg
- Edit fstab:
Code: Select all
nano /etc/fstab
- Comment out the line with /mnt/usb_1, eg:
Code: Select all
#/dev/sda1 /mnt/usb_1 auto defaults,noatime,nofail,x-systemd.automount 0 0
- Save and exit (ctrl+x, y, enter)
- Reload systemd
Code: Select all
systemctl daemon-reload
- reboot
Code: Select all
df -h
rm -R /mnt/usb_1/*
df -h
Code: Select all
/dev/sda1 /mnt/usb_1 auto defaults,noatime,nofail,x-systemd.automount 0 0
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
Donating is the easiest – you can use PayPal or become a DietPi patron.
-
- Posts: 9
- Joined: Sat Dec 31, 2016 1:19 pm
Re: RPI2 - No space left on device
When I opened fstab I found what you can see in attached immagine4.jpgEdit fstab:
Code: Select all
nano /etc/fstab
Comment out the line with /mnt/usb_1, eg:
Code: Select all
#/dev/sda1 /mnt/usb_1 auto defaults,noatime,nofail,x-systemd.automount 0 0
Save and exit (ctrl+x, y, enter)
I commented the line showed by red arrow.
But the issue came when I tried to save, because of a message indicating not enough space on device.
I closed it and when I opened fstab again, I found it empty, no lines inside.

I tried to rewrite the line, coping them from the attached file, but it was impossible to save because of not enough space again.
I rebooted hoping to free space on device but it was worse because now booting errors increased, there is a login error (see immagine5 and immagine6) and I have no write permission (despite I use 'sudo nano /etc/ftab'). Furthermore, putty does not work anymore.
At this point, I think I'm entered in quicksand so I believe it might be better to reinstall. Do you agree?
Or do you have other cartridges to be shot?
Re: RPI2 - No space left on device
Very unluckyBut the issue came when I tried to save, because of a message indicating not enough space on device.

Yep, think thats the best solution. We could try and recover, but it could take a long time, and, no guarantee of result.francescoG wrote:At this point, I think I'm entered in quicksand so I believe it might be better to reinstall. Do you agree?
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
Donating is the easiest – you can use PayPal or become a DietPi patron.
-
- Posts: 9
- Joined: Sat Dec 31, 2016 1:19 pm
Re: RPI2 - No space left on device
I'll reinstall.francescoG wrote:
At this point, I think I'm entered in quicksand so I believe it might be better to reinstall. Do you agree?
Yep, think thats the best solution. We could try and recover, but it could take a long time, and, no guarantee of result.

Anyway, thanks so much for the time you have dedicated to solve my iusses.
I have just another more questions:
which is the path of swap file?
Re: RPI2 - No space left on device
francescoG wrote: which is the path of swap file?
Code: Select all
/var/swap
You can check current size and location with:
Code: Select all
/DietPi/dietpi/func/dietpi-set_dphys-swapfile
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
Donating is the easiest – you can use PayPal or become a DietPi patron.