LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 01-07-2017, 11:18 PM   #1
agarwaldvk
LQ Newbie
 
Registered: Oct 2016
Posts: 27

Rep: Reputation: Disabled
Fix 'Structure Needs Cleaning' Error


Hi Everyone


I had been copying/pasting files from my Windows PC (running Windows 10) to my server PC (running Ubuntu 16.04 LTS) using Windows Explorer.

Three (3) files come up as with the 'Structure Needs Cleaning' Error. I know which drive that is on (its on my /sdb1 partition)


Any suggestions as to how can I remove these files from the system. Surprisingly, these aren't even visible in Windows Explorer. I can't even delete from the ubuntu terminal.

What can I do?


This is what comes up from these files

Code:
ls: cannot access '/sharedfiles/media/Movies/Hindi/Others/Aashiqui 2.avi': Structure needs cleaning
ls: cannot access '/sharedfiles/media/Movies/Hindi/Others/Aitraaz.mkv': Structure needs cleaning
ls: cannot access '/sharedfiles/media/Movies/Hindi/Others/Safar.mpg': Structure needs cleaning

Can I use the following safely (these I found somewhere on the net) :-


Code:
debugfs -w /dev/sdb1  --This file is on sdb1 partition - opening partition in read write mode

Then type in these commands in sequence one after the other
clri /sharedfiles/media/Movies/Hindi/Others/Aashiqui 2.avi
clri /sharedfiles/media/Movies/Hindi/Others/Aitraaz.mkv
clri /sharedfiles/media/Movies/Hindi/Others/Safar.mpg




Best regards


Deepak
 
Old 01-08-2017, 02:18 PM   #2
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,260

Rep: Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322
You can try anything you like - it's your pc. I don't know the 'clri' utility. You're not really giving us the info we need to help
1. What's the file system? From the mention of debugfs, I take it to be ext<something>
2. Have you tried as root?
3. Have you run 'e2fsck -ccf' on the disk? Time for coffee while this runs.
4. What does 'file /path/to/dodgy.movie' indicate on each of them?

If you have them stored elsewhere, you could do
Code:
> /path/to/dodgy.movie
which should make a zero byte file out of it. Or try with dd if you want to keep them. There is also 'unstopcp,' which doesn't stop on errors.
 
Old 01-08-2017, 02:40 PM   #3
agarwaldvk
LQ Newbie
 
Registered: Oct 2016
Posts: 27

Original Poster
Rep: Reputation: Disabled
Hi


Here is the information that you have asked for - hopefully, this might help you to help me :-


1. What's the file system? From the mention of debugfs, I take it to be ext<something>

It is ext4

2. Have you tried as root?

I am logged in as sudo privileged user

3. Have you run 'e2fsck -ccf' on the disk? Time for coffee while this runs.

No, I didn't. I read on the net that the command 'e2fsck' should not be run if the drive is mounted. So, I wasn't sure what steps should I take prior to running this command because this drive has a lot of data - 1.7 tb of data. I am trying to copy over this data to another drive in the meanwhile but its taking its own time as I am copying it to an external drive connected to a windows pc - I am connecting remotely to the server computer from my windows pc

4. What does 'file /path/to/dodgy.movie' indicate on each of them?

I don't know that because I haven't run that command yet. I will do that once I get home tonight.


Yeah, look, as such I don't these dodgy movie files - I just want to get rid of them and have a good clean system but I couldn't even remove them.

If the system is not able to access that file - doesn't it mean that it cannot reach that memory location (and I could be wrong here). If this is the case, however, then would the system be able to create a file at the same location? I will try it nonetheless tonight and keep you posted.


Best regards


Deepak
 
Old 01-09-2017, 02:26 AM   #4
agarwaldvk
LQ Newbie
 
Registered: Oct 2016
Posts: 27

Original Poster
Rep: Reputation: Disabled
Hi

The file command gives the following error :-

cannot open : structure needs cleaning

The > path to file gives the following error :-

-bash : structure needs cleaning


Anything else I can try?


Best regards


Deepak
 
Old 01-09-2017, 03:53 AM   #5
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,260

Rep: Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322
e2fsck
 
  


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
"Structure needs cleaning" on ext4 Bengbers Linux - General 7 01-16-2017 02:28 AM
Fedora 22 rm can not remove file - structure needs cleaning zug234zwang Linux - Software 5 04-07-2016 03:30 AM
Convert directory structure from long file names in Linux to DOS 8.3 structure? manorina Linux - Software 5 09-12-2009 09:18 AM
error coding structure in c shams Programming 9 08-24-2004 10:02 AM
error with structure rubinbob Programming 2 07-21-2004 07:55 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 07:59 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