pippozzzz
Posts: 14
Joined: Sat Oct 22, 2016 9:19 am

disk full or not?

Sun Nov 13, 2016 9:13 am

Hello,

I've a raspberry pi2 with raspbian installed. I keep raspbian updated and every 15 days i use apt-get update and upgrade (also dist-upgrade if needed).

I've mounted an external usb drive where i store some photos (raw files and jpeg). This hard drive is formatted with ext3.

Now something stringe is happening: i was trying to copy some more files but i've got an error (something like "impossible to copy, the drive is full").

So i checked with df -h and i got this:

Code: Select all

/dev/sda1       2,7T  2,4T    192G  93% /media/usbhdd1
so i tried df -i and i got this:

Code: Select all

/dev/sda1      183140352  14598 183125754    1% /media/usbhdd1
So i don't understand why this drive semms to be full when i copy a new big file but with df command i have still 300gigabyte free.

Can you help me understanding what is happening?

User avatar
PeterO
Posts: 4867
Joined: Sun Jul 22, 2012 4:14 pm

Re: disk full or not?

Sun Nov 13, 2016 9:22 am

How are you trying to copy these new files ?
What command or application are you using ?
What is the exact error message ?

PeterO
Discoverer of the PI2 XENON DEATH FLASH!
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson

aleifuu
Posts: 18
Joined: Sat Sep 17, 2016 9:50 am

Re: disk full or not?

Sun Nov 13, 2016 9:57 am

just out of curiosity, how big the files are you trying to copy over ?

pippozzzz
Posts: 14
Joined: Sat Oct 22, 2016 9:19 am

Re: disk full or not?

Sun Dec 11, 2016 9:43 am

Hello,

sorry for my late answer, but i was abroad for work.

this is the exact message:

Code: Select all

cp: errore scrivendo "pippo.mkv": Spazio esaurito sul device
cp: creazione dell'extent di "pippo.mkv" non riuscita: Spazio esaurito sul device
is in italian. In english should be like:

Code: Select all

cp: error writing "pippo.mkv": No more empty space on device
cp: creating the extent of "pippo.mkv" failed: No more empty space on device
I'm trying to copy a file of 500Mbyte

this is the output of sudo df -h on that device:

Code: Select all

/dev/sda1       2,7T  2,4T    163G  94% /media/usbhdd1
Do you have any idea?

pippozzzz
Posts: 14
Joined: Sat Oct 22, 2016 9:19 am

Re: disk full or not?

Sun Jan 01, 2017 8:29 pm

Any ideas?

I searched almost everywhere but i found nothing :(

User avatar
rpdom
Posts: 14701
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: disk full or not?

Sun Jan 01, 2017 8:32 pm

Do you have lots of files on that disk? Sometimes you can hit the limit of the number of files (but that is normally very high).

What does df -i show on that partition?

User avatar
patrikg
Posts: 168
Joined: Sun Mar 18, 2012 10:19 pm

Re: disk full or not?

Sun Jan 01, 2017 8:49 pm

You can search for large files like this command.

Code: Select all

sudo find / -size +100M
That will find files greater than 100 mega bytes.

pippozzzz
Posts: 14
Joined: Sat Oct 22, 2016 9:19 am

Re: disk full or not?

Sun Jan 01, 2017 9:38 pm

I have a lot of large files. They are raw files as result of a merge of some shoot (from 300 to 1000 megabyte per files), so i have a relatively low numbers of files stores (about 3000 files).

with df -i -h i have this result:

Code: Select all

              INODE     IUSED  IFREE   IUSE
/dev/sdb1       175M    15K    175M    1% /media/usbhdd1

pippozzzz
Posts: 14
Joined: Sat Oct 22, 2016 9:19 am

Re: disk full or not?

Sat Feb 04, 2017 8:34 am

up, any idea? I've searched everywhere but i found no help :(

User avatar
dasmanul
Posts: 502
Joined: Wed Sep 30, 2015 10:20 am
Location: Frankfurt, Germany

Re: disk full or not?

Sat Feb 04, 2017 10:33 am

What exact commands are you using to copy the files? How big are the files you're trying to copy? Can you post the output ot

Code: Select all

sudo tune2fs -l /dev/sdb1
?

pippozzzz
Posts: 14
Joined: Sat Oct 22, 2016 9:19 am

Re: disk full or not?

Sat Feb 04, 2017 12:55 pm

This is the output:

Code: Select all

tune2fs 1.42.12 (29-Aug-2014)
Filesystem volume name:   backup
Last mounted on:          /media/usbhdd1
Filesystem magic number:  0xEF53
Filesystem revision #:    1 (dynamic)
Filesystem features:      has_journal ext_attr resize_inode dir_index filetype needs_recovery sparse_super large_file
Filesystem flags:         unsigned_directory_hash
Default mount options:    user_xattr acl
Filesystem state:         clean with errors
Errors behavior:          Continue
Filesystem OS type:       Linux
Inode count:              183140352
Block count:              732558080
Reserved block count:     36627904
Free blocks:              79191196
Free inodes:              183125749
First block:              0
Block size:               4096
Fragment size:            4096
Reserved GDT blocks:      849
Blocks per group:         32768
Fragments per group:      32768
Inodes per group:         8192
Inode blocks per group:   512
Filesystem created:       Thu Jan 22 20:37:35 2015
Last mount time:          Sat Feb  4 09:42:07 2017
Last write time:          Sat Feb  4 09:44:45 2017
Mount count:              192
Maximum mount count:      -1
Last checked:             Thu Jan 22 20:37:35 2015
Check interval:           0 (<none>)
Lifetime writes:          2737 GB
Reserved blocks uid:      0 (user root)
Reserved blocks gid:      0 (group root)
First inode:              11
Inode size:               256
Required extra isize:     28
Desired extra isize:      28
Journal inode:            8
Default directory hash:   half_md4
Directory Hash Seed:      da5f22cd-4b9c-4e3d-ba6c-4004976258c1
Journal backup:           inode blocks
FS Error count:           188412
First error time:         Sun Feb 14 22:20:53 2016
First error function:     ext4_mb_generate_buddy
First error line #:       757
First error inode #:      0
First error block #:      0
Last error time:          Sat Feb  4 09:44:45 2017
Last error function:      ext4_mb_generate_buddy
Last error line #:        758
Last error inode #:       0
Last error block #:       0

User avatar
dasmanul
Posts: 502
Joined: Wed Sep 30, 2015 10:20 am
Location: Frankfurt, Germany

Re: disk full or not?

Sat Feb 04, 2017 2:32 pm

PeterO wrote:How are you trying to copy these new files ?
What command or application are you using ?
dasmanul wrote:What exact commands are you using to copy the files?

pippozzzz
Posts: 14
Joined: Sat Oct 22, 2016 9:19 am

Re: disk full or not?

Sat Feb 04, 2017 2:45 pm

a simple cp

Example:

Code: Select all

cp source.dat destination.dat
Also using scp i have the same problem, and also sharing a directory with sftp.

For sure i have rights to write in that directory

User avatar
dasmanul
Posts: 502
Joined: Wed Sep 30, 2015 10:20 am
Location: Frankfurt, Germany

Re: disk full or not?

Sat Feb 04, 2017 2:59 pm

Are you also absolutely, positively sure the destination directory is actually on that disk? What does a "df <targetdir>" give you? What happens if you try a "dd if=/dev/zero of=<targetdir> bs=1M count=700"?

pippozzzz
Posts: 14
Joined: Sat Oct 22, 2016 9:19 am

Re: disk full or not?

Sat Feb 04, 2017 3:17 pm

Yes, i'm sure about it

This is the output of that command:

Code: Select all

700+0 record dentro
700+0 record fuori
734003200 byte (734 MB) copiati, 29,1462 s, 25,2 MB/s
in english should be:

Code: Select all

700+0 record in
700+0 record out
734003200 byte (734 MB) copied, 29,1462 s, 25,2 MB/s

User avatar
dasmanul
Posts: 502
Joined: Wed Sep 30, 2015 10:20 am
Location: Frankfurt, Germany

Re: disk full or not?

Sat Feb 04, 2017 3:43 pm

Sorry, was too quick earlier. That should have been

Code: Select all

dd if=/dev/zero of=<targetdir>/testfile bs=1 count=700
Can you still access the target directory? The output looks like dd could indeed write 700 MB, so the disk is not full. The last thing I can think of is to run

Code: Select all

strace <your exact cp command>
and post the (probably very long) output and your exact command here.

Return to “Raspbian”