LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer
User Name
Password
Linux - Embedded & Single-board computer This forum is for the discussion of Linux on both embedded devices and single-board computers (such as the Raspberry Pi, BeagleBoard and PandaBoard). Discussions involving Arduino, plug computers and other micro-controller like devices are also welcome.

Notices


Reply
  Search this Thread
Old 06-12-2020, 08:54 AM   #1
Completely Clueless
Member
 
Registered: Mar 2008
Location: Marbella, Spain
Distribution: Many and various...
Posts: 899

Rep: Reputation: 70
Question Raspberry Pi card "full" when it's not


Hi all,

I've been running a Pi as an embedded controller for a time-lock safe for several years without issue. It's programmed to open up twice a week on a Tuesday and a Friday and just recently I wanted to change the Tuesday for a Wednesday, which with this script is just a case of changing a '2' for a '3' on a single line of code, so no overall increase in space required (this is on a 4Gb SD card). However, when I try to save the change, I get an error message saying the card is full and I need to delete some files to make space! I'm pretty damn sure there's plenty of space on the card in reality and what I'm trying to do doesn't even require a single bit of extra space anyway, so what's going on here? I'm sure I've had this issue before many years ago but Linux is so reliable I so rarely need to fix anything so forget what I previously did.
Can some kind soul tell me what I'm doing wrong? Thanks.
 
Old 06-12-2020, 09:01 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 22,018

Rep: Reputation: 7343Reputation: 7343Reputation: 7343Reputation: 7343Reputation: 7343Reputation: 7343Reputation: 7343Reputation: 7343Reputation: 7343Reputation: 7343Reputation: 7343
did you check the inodes? df -i
 
Old 06-12-2020, 03:26 PM   #3
Completely Clueless
Member
 
Registered: Mar 2008
Location: Marbella, Spain
Distribution: Many and various...
Posts: 899

Original Poster
Rep: Reputation: 70
Quote:
Originally Posted by pan64 View Post
did you check the inodes? df -i
Sorry for the delay; I'm just reading up on inodes (never heard of 'em before). This may take a while longer.....
 
Old 06-12-2020, 04:46 PM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,776

Rep: Reputation: 5935Reputation: 5935Reputation: 5935Reputation: 5935Reputation: 5935Reputation: 5935Reputation: 5935Reputation: 5935Reputation: 5935Reputation: 5935Reputation: 5935
If the Pi has been running for several years its possible the card has worn out.

If so, I would create a backup if you do not have one ASAP
 
Old 06-12-2020, 06:13 PM   #5
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,149

Rep: Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124
Logs ?. Let's see
Code:
df -hT
 
Old 06-12-2020, 06:26 PM   #6
Completely Clueless
Member
 
Registered: Mar 2008
Location: Marbella, Spain
Distribution: Many and various...
Posts: 899

Original Poster
Rep: Reputation: 70
Quote:
Originally Posted by michaelk View Post
If the Pi has been running for several years its possible the card has worn out.

If so, I would create a backup if you do not have one ASAP
My brain will wear out before the card, since it's write-protected in this application. In fact, maybe that's what's already happened.
I need to sleep on this inode business. Hopefully it'll make more sense in the morning.
 
Old 06-13-2020, 12:56 AM   #7
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by Completely Clueless View Post
I'm pretty damn sure there's plenty of space on the card in reality
How sure? Have you checked?
Provide the output requested in post #5.
Use code tags for that (see my signature).
 
Old 06-13-2020, 07:48 AM   #8
Completely Clueless
Member
 
Registered: Mar 2008
Location: Marbella, Spain
Distribution: Many and various...
Posts: 899

Original Poster
Rep: Reputation: 70
Angry

Quote:
Originally Posted by ondoho View Post
How sure? Have you checked?
Provide the output requested in post #5.
Use code tags for that (see my signature).
Sigh.. I only wish I could. Unfortunately a colleague of mine has slammed the door shut and it's latched again. Now I won't be able to re-open it to get to the Pi and the card until Tuesday. Thanks for trying to help, everyone. I'll have to re-post in a few days' time with the outcomes to your various suggestions.
 
Old 06-13-2020, 10:44 AM   #9
Roken
Member
 
Registered: Oct 2011
Location: Warrington, UK
Distribution: Arch local, Debian on VPS, several RPIs.
Posts: 300
Blog Entries: 1

Rep: Reputation: 55
How have you write protected it? Are you sure it isn't just write protected across the board?
 
Old 06-13-2020, 05:47 PM   #10
Completely Clueless
Member
 
Registered: Mar 2008
Location: Marbella, Spain
Distribution: Many and various...
Posts: 899

Original Poster
Rep: Reputation: 70
Quote:
Originally Posted by Roken View Post
How have you write protected it? Are you sure it isn't just write protected across the board?
There's a tiny switch on the SD card itself; that's what I used.
 
Old 06-13-2020, 06:13 PM   #11
Roken
Member
 
Registered: Oct 2011
Location: Warrington, UK
Distribution: Arch local, Debian on VPS, several RPIs.
Posts: 300
Blog Entries: 1

Rep: Reputation: 55
Quote:
Originally Posted by Completely Clueless View Post
There's a tiny switch on the SD card itself; that's what I used.

OK, and have you unlocked it to write the file?
 
Old 06-16-2020, 05:03 PM   #12
Completely Clueless
Member
 
Registered: Mar 2008
Location: Marbella, Spain
Distribution: Many and various...
Posts: 899

Original Poster
Rep: Reputation: 70
Sorry for the delay. Yes, the 'lock' switch on the card has been disabled to make it writable, but it still won't save. And the error message specifically says there's no space on the card, too.

Here's the outputs I'm seeing from the two suggested commands:

Code:
bro@bro-laptop ~/Desktop $ df -hT
Filesystem     Type      Size  Used Avail Use% Mounted on
udev           devtmpfs  2.9G  4.0K  2.9G   1% /dev
tmpfs          tmpfs     581M  1.4M  580M   1% /run
/dev/sda6      ext4      123G   65G   52G  56% /
none           tmpfs     4.0K     0  4.0K   0% /sys/fs/cgroup
none           tmpfs     5.0M     0  5.0M   0% /run/lock
none           tmpfs     2.9G   37M  2.9G   2% /run/shm
none           tmpfs     100M   36K  100M   1% /run/user
/dev/sdb2      ext4      1.7G  1.6G     0 100% /media/bro/b7b5ddff-ddb4-48dd-84d2-dd47bf00564a
/dev/sdb1      vfat       56M   19M   38M  34% /media/bro/3312-932F

bro@bro-laptop ~/Desktop $ df -i
Filesystem      Inodes  IUsed   IFree IUse% Mounted on
udev            739446    542  738904    1% /dev
tmpfs           743494    599  742895    1% /run
/dev/sda6      8167424 412295 7755129    6% /
none            743494      2  743492    1% /sys/fs/cgroup
none            743494      1  743493    1% /run/lock
none            743494     63  743431    1% /run/shm
none            743494     21  743473    1% /run/user
/dev/sdb2       114688  68577   46111   60% /media/bro/b7b5ddff-ddb4-48dd-84d2-dd47bf00564a
/dev/sdb1            0      0       0     - /media/bro/3312-932F
bro@bro-laptop ~/Desktop $
The card is mounted on dev/sdb for the avoidance of any doubt.
I'm going to have to return this card to the controller very shortly so if there are any further suggestions requiring access, I may have to defer trying them until Friday when the safe will be open again.
Thanks.
 
Old 06-16-2020, 05:11 PM   #13
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,776

Rep: Reputation: 5935Reputation: 5935Reputation: 5935Reputation: 5935Reputation: 5935Reputation: 5935Reputation: 5935Reputation: 5935Reputation: 5935Reputation: 5935Reputation: 5935
Code:
Filesystem     Type      Size  Used Avail Use% Mounted on
/dev/sdb2      ext4      1.7G  1.6G   0   100% /media/bro/b7b5ddff-ddb4-48dd-84d2-dd47bf00564a
The output shows the partition is full. By default ext4 does reserver 5% for root use. With a 1.6G partition reserved space is only 85MBs.

You need to delete some stuff.
 
Old 06-16-2020, 05:43 PM   #14
Completely Clueless
Member
 
Registered: Mar 2008
Location: Marbella, Spain
Distribution: Many and various...
Posts: 899

Original Poster
Rep: Reputation: 70
Quote:
Originally Posted by michaelk View Post
Code:
Filesystem     Type      Size  Used Avail Use% Mounted on
/dev/sdb2      ext4      1.7G  1.6G   0   100% /media/bro/b7b5ddff-ddb4-48dd-84d2-dd47bf00564a
The output shows the partition is full. By default ext4 does reserver 5% for root use. With a 1.6G partition reserved space is only 85MBs.

You need to delete some stuff.
OK, well let's try that, then. How little can I get away with deleting and from which of sdb1 or sdb2 should it come off?
 
Old 06-16-2020, 06:05 PM   #15
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,776

Rep: Reputation: 5935Reputation: 5935Reputation: 5935Reputation: 5935Reputation: 5935Reputation: 5935Reputation: 5935Reputation: 5935Reputation: 5935Reputation: 5935Reputation: 5935
You need to delete to get below 95% and would say at least 100Mb.

sdb2..
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Raspberry Pi: Combine a Raspberry Pi with up to 4 Raspberry Pi Zeros for less than US$50 with the Cluster HAT LXer Syndicated Linux News 0 07-05-2019 12:03 PM
[SOLVED] full screen not really a full screen - why is that? linux-man Linux - Newbie 6 05-20-2018 08:21 AM
/tmp full - but not full ? turbo_acura Linux - Newbie 2 10-20-2010 08:20 AM
Help With Java Problem Please"""""""""""" suemcholan Linux - Newbie 1 04-02-2008 06:02 PM
Which distributions do not support --full-time for ls (ls --full-time)? GCS Linux - Distributions 0 07-28-2004 01:25 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer

All times are GMT -5. The time now is 04:40 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration