Forum

Full Version: sudo: unable to write to /var/lib/sudo/xbian/: No space left on device
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hey everyone,
I'm using xbian some months yet. But now I got a problem and I don't know how to solve it on my own.

Since yesterday, I got a 'No space left on device' error message. I also started to read in the internet of this problem. But I couldn't solve it.

Here is the output of df -h:

Quote:Filesystem..........Size...Used...Avail...Use%...Mounted on
rootfs.................7.2G..4.9G...2.2G....70%...../
/dev/mmcblk0p2..7.2G..4.9G...2.2G....70%...../
devtmpfs............188M..4.0K...188M....1%...../dev
none..................38M...180K...38M.....1%....../run
/dev/mmcblk0p1..34M...20M....15M.....59%..../boot
/dev/mmcblk0p2..7.2G..4.9G...2.2G....70%...../home
/dev/mmcblk0p2..7.2G..4.9G...2.2G....70%...../lib/modules
/dev/sda1...........3.9G..3.9G....81M....98%...../media/58DD-5D36
/dev/mmcblk0p2..7.2G..4.9G...2.2G....70%...../xbmc-backup

The free space looks good.

And here the output of df -i:

Quote:Filesystem...........Inodes...IUsed...IFree...IUse%...Mounted on
rootfs.....................0..........0.........0.......-........./
/dev/mmcblk0p2......0..........0.........0.......-........./
devtmpfs.............47910.....286.....47624...1%....../dev
none...................47926.....230.....47696...1%....../run
/dev/mmcblk0p1......0..........0.........0.......-........./boot
/dev/mmcblk0p2......0..........0.........0.......-........./home
/dev/mmcblk0p2......0..........0.........0.......-........./lib/modules
/dev/sda1...............0..........0.........0.......-........./media/58DD-5D36
/dev/mmcblk0p2......0..........0.........0.......-........./xbmc-backup

Why are the Inodes number zero in the most cases?

I already started to delete some files (e.g. in home/ and some old log files). But I'm not really sure where to look at, because nothing helped so far. And it also took ages to delete a single file.

Why is there an error 'No space left on device'? (e.g. sudo rm -r bla/ -> sudo: unable to write to /var/lib/sudo/xbian/3: No space left on device) Is my SDcard broken or is there an error with the file system?

Does someone running in the same problem and does someone knows how to solve it?

Best, psyLord
Hi,

i've got this few times before, specially when i used transmission,

delete a file is not suffisiant (due btrfs and snapshot),
you will need to delete btrfs snapshot
see here :
http://wiki.xbian.org/doku.php/snapshots

if all the commands ended with a 'no space left', even delete snasphot, you can mount your sd card on a linux, and resize with gparted swap partition (the last one) a bit smaller, move it to the end, and resize the second parition a bit larger, boot on pi again, and you should be able to delete snapshot.

if you use transmission, even if temp dir is set on usb drive, i suspect to put some temp file somwhere on sd,
without using transmission, i haven't had the probelm anymore. but never look deeper, so it's only a presumption.

Belese
Thanks a lot for your answer Belese. I will try it out. I let you know if it worked.
Sorry for my delay. During the last week I tried different methods for solving the problem.

Resizing the main partition worked. I didn't got an 'No space left on device' error message any longer. I also could delete some files. Then I tried to delete the oldest snapshot with btrfs-auto-snapshot destroy. Here, something went wrong, because after rebooting the partition was read-only.

Then I plugged the SDcard in my linux PC and mounted it. Same problem. At this stage, it wasn't possible to do a backup anymore (I don't know why... everytime only ~34mb out of 7gb). I tried it with dd if=... of=..

Then I checked the filesystem with btrfs check. The result was the chunk tree was damaged. Therefor, I tried to repair it also with the btrfs tools.

Now the partition is not mountable any longer. Sad (But I found a backup from some month ago, so not everything is lost.)

Next time I will do a backup as soon as a problem appears. (Then it should be possible to work directly with the backup instead of the SDcard.)
(9th Sep, 2014 03:02 AM)psyLord Wrote: [ -> ](I don't know why... everytime only ~34mb out of 7gb)
That's the size of the FAT partition (/boot).
(9th Sep, 2014 03:25 AM)menakite Wrote: [ -> ]
(9th Sep, 2014 03:02 AM)psyLord Wrote: [ -> ](I don't know why... everytime only ~34mb out of 7gb)
That's the size of the FAT partition (/boot).

Yes, it's around the same size as the boot partition. That also confuses me in the beginning. But the dd command stoped with an error message. (But I can't remember what is was at the moment.) And I'm definitly sure this was the main partition.

I also did a backup of the boot partition. This was working fine.
Reference URL's