Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
i accidentally deleted some stuff before it was backed up, and i tried to recover it with the reiserfsck tools. part of what got recovered is an empty directory that now i can't get rid of. when i try to remove it, it says it's not empty, but there's nothing in it but an empty subdirectory, and no hidden (dot) files anywhere.
i've renamed it, moved it to another location, changed all the permissions to 777 -- nothing works. for example:
it's weird that when i try to delete it, it appends the subdirectory name and the two slashes: "cannot remove 'bad-directory//cd1'" - what is that about i wonder? nothing else i've tried will get rid of this. what can i do?
>>edit: i just tried deleting it from a knoppix cd and got the same thing. so i guess it's nothing linked to a tmp directory or something like that, but some corruption in the filesystem "encoding" for the directory itself?
ps2: i can "move" it within the partition, but not out to any other partition. i get the same messages about it not being empty.
same result: it says the directory isn't empty and won't let me move it. will i actually have to move all the data and reformat the partition?
edit:
-----
unmounted the filesystem and ran reiserfsck --fix-fixable, fixed some stuff but didn't allow me to delete the directory. i'll read through the reiserfsck man pages, in the meantime any other ideas?
Code:
[7] root:~ # reiserfsck --fix-fixable /dev/hda5
reiserfsck 3.6.19 (2003 www.namesys.com)
*************************************************************
** If you are using the latest reiserfsprogs and it fails **
** please email bug reports to reiserfs-list@namesys.com, **
** providing as much information as possible -- your **
** hardware, kernel, patches, settings, all reiserfsck **
** messages (including version), the reiserfsck logfile, **
** check the syslog file for any related information. **
** If you would like advice on using this program, support **
** is available for $25 at www.namesys.com/support.html. **
*************************************************************
Will check consistency of the filesystem on /dev/hda5
Will put log info to 'stdout'
Do you want to run this program?[N/Yes] (note need to type Yes if you do):Yes
reiserfsck --fix-fixable started at Wed Dec 28 19:48:49 2005
Replaying journal..
Trans replayed: mountid 191, transid 2388328, desc 2315, len 1, commit 2317, next trans offset 2300
2.6.14-ck5]replayed
Checking internal tree..finished
Comparing bitmaps..finished
/torrents/.BitTornado/datacachevpf-10650: The directory [518 1817] has the wrong size in the StatData (720) - corrected to (1000)
/bad-directory/cd1vpf-10650: The directory [1865 652] has the wrong size in the StatData (128) - corrected to (48)
vpf-10650: The directory [2 70] has the wrong size in the StatData (336) - corrected to (344)
finished
No corruptions found
There are on the filesystem:
Leaves 4591
Internal nodes 34
Directories 92
Other files 730
Data block pointers 4547047 (103486 of them are zero)
Safe links 0
###########
reiserfsck finished at Wed Dec 28 19:49:11 2005
###########
there was a cd1 directory in /dev0, whether from the attempt to move the bad-directory there or not i don't know. i rm-ed that, and it deleted, and then i was able to delete the bad-directory. thanks for pointing me in the right direction.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.