I''ve have a single-fs, mirrored pool on my hands which recently went through a bout of corruption. I''ve managed to clean up a good bit of it but it appears that I''m left with some directories which have bad refcounts. For example, I have what should be an empty directory "foo" which, when you cd into it and ls -al, it shows a incorrect refcount for a empty directory: total 444 drwxr-xr-x 2 daleg users 3 Aug 17 13:20 ./ drwx--x--x 64 daleg users 117 Aug 17 13:20 ../ Thus, attempts to remove this directory via rmdir fails with "directory not empty" and rm -rf gacks with "File exists" I can touch a new file in this dir and such, with the refcount incrementing to 4, and removing it poses no problem, either, with the refcount decrementing back to 3. However 3 is the wrong number. It should of course be only 2 (. and ..) Normally on UFS I would just take the ''nuke it from orbit'' route and use clri to wipe the directory''s inode. However, clri doesn''t appear to be zfs aware (there''s not even a zfs analog of clri in /usr/lib/fs/ zfs), and I don''t immediately see an option in zdb which would help cure this. Any suggestions would be appreciated. /dale
On 27-Oct-09, at 1:43 PM, Dale Ghent wrote:> I''ve have a single-fs, mirrored pool on my hands which recently went > through a bout of corruption. I''ve managed to clean up a good bit of > itHow did this occur? Isn''t a mirrored pool supposed to self heal? --Toby> but it appears that I''m left with some directories which have bad > refcounts. > ... > /dale > _______________________________________________ > zfs-discuss mailing list > zfs-discuss at opensolaris.org > http://mail.opensolaris.org/mailman/listinfo/zfs-discuss
daleg at elemental.org said:> Normally on UFS I would just take the ''nuke it from orbit'' route and use clri > to wipe the directory''s inode. However, clri doesn''t appear to be zfs aware > (there''s not even a zfs analog of clri in /usr/lib/fs/ zfs), and I don''t > immediately see an option in zdb which would help cure this.Well, it might make things worse, but have you tried /usr/sbin/unlink ? I''m on Solaris-10, so don''t know if that''s still part of OpenSolaris. Regards, Marion
Seemingly Similar Threads
- 4913439 clri doesn''t first check for ufs superblock magic number before taking action
- softdepflush bad block error has led to negative blocks in free inode and handle_workitem_freeblocks: block count
- How to clean up /
- Poor performance on NFS-exported ZFS volumes
- fixing a corrupt /dev/hdar .. debugfs assistance...