[SOLVED] No space left on device

This forum is for topics specific to the Raspberry Pi and Arch Linux ARM

[SOLVED] No space left on device

Postby aveferrum » Tue Jul 29, 2014 5:02 pm

Hi,
I am unable to write any new file(s) (although can delete with no issues) on my ext4 usb drive (/dev/sdb1 on /media/samsung_1.5tb) using the regular user.

$this->bbcode_second_pass_code('', '
[ras@alarmpi samsung_1.5tb]$ ls -al
total 48
drwxrwxr-x 5 ras users 4096 Jul 29 19:45 .
drwxrwxr-x 4 ras users 4096 Jul 5 23:36 ..
drwx-w---- 2 ras users 16384 Jun 30 01:27 lost+found
drwxrwxr-x 296 ras users 20480 Jul 29 19:22 movies
drwxrwxr-x 29 ras users 4096 Jul 3 23:33 roms
[ras@alarmpi samsung_1.5tb]$ mkdir a
mkdir: cannot create directory 'a': No space left on device
[ras@alarmpi samsung_1.5tb]$
')

Here's some background info;

$this->bbcode_second_pass_code('', '
/dev/mmcblk0p5 on / type ext4 (rw,relatime,data=ordered)
devtmpfs on /dev type devtmpfs (rw,relatime,size=185884k,nr_inodes=46471,mode=755)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /run type tmpfs (rw,nosuid,nodev,mode=755)
tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,mode=755)
cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xattr,release_agent=/usr/lib/systemd/systemd-cgroups-agent,name=systemd)
cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset)
cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpuacct,cpu)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)
cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio)
cgroup on /sys/fs/cgroup/perf_event type cgroup (rw,nosuid,nodev,noexec,relatime,perf_event)
cgroup on /sys/fs/cgroup/net_prio type cgroup (rw,nosuid,nodev,noexec,relatime,net_prio)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=22,pgrp=1,timeout=300,minproto=5,maxproto=5,direct)
tmpfs on /tmp type tmpfs (rw)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
mqueue on /dev/mqueue type mqueue (rw,relatime)
configfs on /sys/kernel/config type configfs (rw,relatime)
/dev/mmcblk0p1 on /boot type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,errors=remount-ro)
/dev/sda1 on /media/seagate_2.0tb type ext4 (rw,relatime,data=ordered)
[b]/dev/sdb1 on /media/samsung_1.5tb type ext4 (rw,relatime,data=ordered)[/b]
tmpfs on /run/user/1000 type tmpfs (rw,nosuid,nodev,relatime,size=38024k,mode=700,uid=1000,gid=100)
')

$this->bbcode_second_pass_code('', '
Filesystem Size Used Avail Use% Mounted on
/dev/root 7.2G 4.7G 2.2G 69% /
devtmpfs 182M 0 182M 0% /dev
tmpfs 186M 0 186M 0% /dev/shm
tmpfs 186M 364K 186M 1% /run
tmpfs 186M 0 186M 0% /sys/fs/cgroup
tmpfs 186M 0 186M 0% /tmp
/dev/mmcblk0p1 90M 25M 66M 28% /boot
/dev/sda1 1.8T 78G 1.7T 5% /media/seagate_2.0tb
/dev/sdb1 1.4T 1.4T 0 100% /media/samsung_1.5tb
tmpfs 38M 0 38M 0% /run/user/1000
')

df -h shows 100% usage for /dev/sdb1 but I still can't write on it even afer deleting a good GB of data.

Seems I've enough Inodes on that drive.
$this->bbcode_second_pass_code('', '
[ras@alarmpi samsung_1.5tb]$ df -i
Filesystem Inodes IUsed IFree IUse% Mounted on
/dev/root 458784 88450 370334 20% /
devtmpfs 46471 364 46107 1% /dev
tmpfs 47526 1 47525 1% /dev/shm
tmpfs 47526 382 47144 1% /run
tmpfs 47526 11 47515 1% /sys/fs/cgroup
tmpfs 47526 9 47517 1% /tmp
/dev/mmcblk0p1 0 0 0 - /boot
/dev/sdb1 91578368 1535 91576833 1% /media/samsung_1.5tb
/dev/sda1 122101760 52278 122049482 1% /media/seagate_2.0tb
tmpfs 47526 4 47522 1% /run/user/1000
')

I've tested with root and Interestingly I've able to write but my user owns the mount points and data in the drive so I am kinda lost.

$this->bbcode_second_pass_code('', '
total 16
drwxrwxr-x 4 ras users 4096 Jul 5 23:36 .
drwxr-xr-x 18 root root 4096 Jul 13 09:04 ..
drwxrwxr-x 5 ras users 4096 Jul 29 19:45 samsung_1.5tb
drwxrwxr-x 10 ras users 4096 Jul 27 23:28 seagate_2.0tb
[ras@alarmpi media]$
')

Any insight will be greatly appreciated.
Last edited by aveferrum on Wed Jul 30, 2014 10:37 am, edited 1 time in total.
aveferrum
 
Posts: 5
Joined: Tue Jul 29, 2014 4:36 pm

Re: No space left on device

Postby WarheadsSE » Tue Jul 29, 2014 5:06 pm

That's an odd one. Also, have you fsck'd it?
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm

Re: No space left on device

Postby aveferrum » Tue Jul 29, 2014 5:10 pm

Yes, a couple of times. It seems clean.

$this->bbcode_second_pass_code('', '
[ras@alarmpi media]$ ls
samsung_1.5tb seagate_2.0tb
[ras@alarmpi media]$ fsck /dev/sdb1
fsck from util-linux 2.24.2
e2fsck 1.42.10 (18-May-2014)
fsck.ext4: Permission denied while trying to open /dev/sdb1
You must have r/w access to the filesystem or be root
[ras@alarmpi media]$ sudo fsck /dev/sdb1
fsck from util-linux 2.24.2
e2fsck 1.42.10 (18-May-2014)
samsung_1.5tb: clean, 1535/91578368 files, 364293018/366284288 blocks
[ras@alarmpi media]$
')
aveferrum
 
Posts: 5
Joined: Tue Jul 29, 2014 4:36 pm

Re: No space left on device

Postby aveferrum » Tue Jul 29, 2014 5:21 pm

Here's my fstab. /dev/sda1 and /dev/sdb1 are completely same. I can write on /sda1 disk perfectly but not the other.

$this->bbcode_second_pass_code('', '
#
# /etc/fstab: static file system information
#
# <file system> <dir> <type> <options> <dump> <pass>
/dev/mmcblk0p1 /boot vfat defaults 0 0
/swapfile none swap defaults 0 0
/dev/sda1 /media/seagate_2.0tb ext4 defaults 0 1
/dev/sdb1 /media/samsung_1.5tb ext4 defaults 0 1
')
aveferrum
 
Posts: 5
Joined: Tue Jul 29, 2014 4:36 pm

Re: No space left on device

Postby sdjf » Tue Jul 29, 2014 11:37 pm

Maybe there is something wrong about how the file system was created and mounted.

I have had external media that the same thing happened with, and the solution was sometimes to write to a different subdirectory.

I also wonder if those decimal points in the mount point names could be confusing the system. What happens if you take them out of the directory names?

And what if you do sudo mkdir /media/blabla/a just to play it safe, with full path to the new directory.
sdjf
 
Posts: 178
Joined: Wed May 08, 2013 1:55 pm

Re: No space left on device

Postby moonman » Wed Jul 30, 2014 6:40 am

10 or 15 % is reserved i believe for root. You can decrese the reserved vlocks
$this->bbcode_second_pass_code('', 'tune2fs -m 0 /dev/sdX')
Pogoplug V4 | GoFlex Home | Raspberry Pi 4 4GB | CuBox-i4 Pro | ClearFog | BeagleBone Black | Odroid U2 | Odroid C1 | Odroid XU4
-----------------------------------------------------------------------------------------------------------------------
[armv5] Updated U-Boot | [armv5] NAND Rescue System
moonman
Developer
 
Posts: 3388
Joined: Sat Jan 15, 2011 3:36 am

Re: No space left on device

Postby aveferrum » Wed Jul 30, 2014 10:37 am

Thanks moonman. tune2fs -m 0 /dev/sdb1 did the trick.

$this->bbcode_second_pass_code('', '
[ras@alarmpi samsung_1.5tb]$ df -h
/dev/sda1 1.8T 78G 1.7T 5% /media/seagate_2.0tb
/dev/sdb1 1.4T 1.4T 7.6G 100% /media/samsung_1.5tb
')
aveferrum
 
Posts: 5
Joined: Tue Jul 29, 2014 4:36 pm


Return to Raspberry Pi

Who is online

Users browsing this forum: No registered users and 76 guests