Structure needs cleaning

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

Structure needs cleaning

Postby Vesco » Wed May 11, 2016 7:38 pm

Hi guys,

I'm owning a raspi2 with arch installed.
I'm trying to update it by using $this->bbcode_second_pass_code('', 'sudo pacman -Syu') and I'm getting this error:
$this->bbcode_second_pass_code('', '
:: Starting full system upgrade...
error: could not open file /var/lib/pacman/local/mpfr-3.1.4-1/desc: Structure needs cleaning
resolving dependencies...
error: could not open file /var/lib/pacman/local/gamin-0.1.10-8/desc: Structure needs cleaning
error: could not open file /var/lib/pacman/local/libdaemon-0.14-3/desc: Structure needs cleaning
error: could not open file /var/lib/pacman/local/libjpeg-turbo-1.4.2-2/desc: Structure needs cleaning
error: could not open file /var/lib/pacman/local/libtiff-4.0.6-2/desc: Structure needs cleaning
error: could not open file /var/lib/pacman/local/pkg-config-0.29.1-1/desc: Structure needs cleaning
error: could not open file /var/lib/pacman/local/tdb-1.3.8-1/desc: Structure needs cleaning
looking for conflicting packages...
warning: could not fully load metadata for package mpfr-3.1.4-1
error: failed to prepare transaction (invalid or corrupted package)
')
Couldn't find anything on Google tho.
Also pretty newbit to linux
Thanks for further answers
Vesco
 
Posts: 9
Joined: Mon Aug 31, 2015 7:25 am

Re: Structure needs cleaning

Postby sdjf » Thu May 12, 2016 11:46 am

Sounds like your SD card has gone bad, or the file system is corrupted, possibly after a power outage. Have you run fsck.ext4 on it?

By the way, googling the general error "structure needs cleaning" linux ext4 is what I did.
sdjf
 
Posts: 178
Joined: Wed May 08, 2013 1:55 pm

Re: Structure needs cleaning

Postby Vesco » Thu May 12, 2016 1:21 pm

Yea, i had 2 power outages in two different days..
This is my 3rd sd card that goes bad due to power outage :cry:
I'll try to run a fsck, but could u help out on which parameters should I use ?
This's my df:
$this->bbcode_second_pass_code('', '[archie@alarmpi ~]$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/root 15G 2.3G 12G 17% /
devtmpfs 212M 0 212M 0% /dev
tmpfs 216M 0 216M 0% /dev/shm
tmpfs 216M 5.8M 211M 3% /run
tmpfs 216M 0 216M 0% /sys/fs/cgroup
tmpfs 216M 0 216M 0% /tmp
/dev/mmcblk0p6 99M 18M 82M 18% /boot
/dev/sda1 932G 310G 622G 34% /mnt/NAS
tmpfs 44M 0 44M 0% /run/user/1000
')

By the way, thank you for your answer, now i did something like this:
$this->bbcode_second_pass_code('', 'shutdown -Fr now')
Vesco
 
Posts: 9
Joined: Mon Aug 31, 2015 7:25 am

Re: Structure needs cleaning

Postby graysky » Thu May 12, 2016 6:51 pm

Pull the card out and scan it from another system... if ext4 filesystems, you can use:
$this->bbcode_second_pass_code('', 'e2fsck -fv /dev/sdxy')
graysky
Developer
 
Posts: 1728
Joined: Sun Jun 26, 2011 6:56 am
Location: /run/user/1000

Re: Structure needs cleaning

Postby sdjf » Fri May 13, 2016 4:24 pm

When you run the fsck on the card from another system, which will be better than going into emergency system, make sure to run mount or "cat /proc/partitions" to find out what the card's device assignment is.

Another possibility is to run fsck.ext4, I have done that using just defaults and it seems to work fine.

But if at all possible, it is wise to shut down and repair the card before doing any more writing to it. I sympathize with you on this problem, the best thing to do is not write to any file system that might be corrupted without an fsck repairing things first. Not fun.
sdjf
 
Posts: 178
Joined: Wed May 08, 2013 1:55 pm

Re: Structure needs cleaning

Postby Vesco » Sat May 14, 2016 7:30 pm

Hey, thank youa ll for answering me!
I'll try to scan my SD from a VM inside my other pc with windows.

BTW it's very very frustrating to have always issues with corruptions on SD card
Vesco
 
Posts: 9
Joined: Mon Aug 31, 2015 7:25 am

Re: Structure needs cleaning

Postby sdjf » Sun May 15, 2016 4:58 pm

Yeah, I do know how aggravating it is to get a corrupted card. It happens a whole lot less for me now that I have figured out how to avoid most of my unsafe shutdowns. The pi really needs a backup universal power supply to cut down on such events. Call it a battery if you want, I do not have one either yet. And of course we need a more than adequate power supply to begin with, along with hubs that are more than adequately powered as most do not deliver the advertized amount of mA.
sdjf
 
Posts: 178
Joined: Wed May 08, 2013 1:55 pm


Return to Raspberry Pi

Who is online

Users browsing this forum: No registered users and 12 guests