FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > EXT3 Users

 
 
LinkBack Thread Tools
 
Old 07-24-2008, 03:47 PM
Charles Riley
 
Default debugfs question: What does "expand" do?

Hi,

What does the "expand_dir" command do in debugfs?
All the information I can find on it just says "Expand the directory
filespec"
I googled the archives and can't find a post where someone actually used
it to give me some context.
If I try it in debugfs (image opened ro) it seems to want to write to
the image.


I'm having a bit of a stack underflow here, please help.
Thanks in advance,

Charles

_______________________________________________
Ext3-users mailing list
Ext3-users@redhat.com
https://www.redhat.com/mailman/listinfo/ext3-users
 
Old 07-24-2008, 04:12 PM
Theodore Tso
 
Default debugfs question: What does "expand" do?

On Thu, Jul 24, 2008 at 11:47:16AM -0400, Charles Riley wrote:
> Hi,
>
> What does the "expand_dir" command do in debugfs?
> All the information I can find on it just says "Expand the directory
> filespec"
> I googled the archives and can't find a post where someone actually used
> it to give me some context.
> If I try it in debugfs (image opened ro) it seems to want to write to
> the image.

It adds an extra (empty) directory block to a directory inode. This
something like this is used to recreate a lost+found directory with
extra empty directory blocks so that e2fsck can reattach orphaned
inodes without needing to allocate blocks from the filesystem (which
might not be available if the filesystem is 100% full), for example.

It's not normally useful for most debugfs users. (Heck, debugfs
wasn't intended to be useful for most ext3 users; it's really designed
for ext3 wizards that need to untangle badly corrupted filesystems,
and/or ext3/4 developers that are debugging new ext4 code, and/or
ext3/4 developers creating deliberately corrupted filesystems for
e2fsprogs's regression test suite.)

- Ted

_______________________________________________
Ext3-users mailing list
Ext3-users@redhat.com
https://www.redhat.com/mailman/listinfo/ext3-users
 
Old 07-24-2008, 08:40 PM
Charles Riley
 
Default debugfs question: What does "expand" do?

Theodore Tso wrote:

On Thu, Jul 24, 2008 at 11:47:16AM -0400, Charles Riley wrote:


Hi,

What does the "expand_dir" command do in debugfs?
All the information I can find on it just says "Expand the directory
filespec"
I googled the archives and can't find a post where someone actually used
it to give me some context.
If I try it in debugfs (image opened ro) it seems to want to write to
the image.



It adds an extra (empty) directory block to a directory inode. This
something like this is used to recreate a lost+found directory with
extra empty directory blocks so that e2fsck can reattach orphaned
inodes without needing to allocate blocks from the filesystem (which
might not be available if the filesystem is 100% full), for example.

It's not normally useful for most debugfs users. (Heck, debugfs
wasn't intended to be useful for most ext3 users; it's really designed
for ext3 wizards that need to untangle badly corrupted filesystems,
and/or ext3/4 developers that are debugging new ext4 code, and/or
ext3/4 developers creating deliberately corrupted filesystems for
e2fsprogs's regression test suite.)

- Ted


Thanks!



I've been playing with it quite a lot, in preparation for repairing the
1.5TB filesystem I posted about previously.* Just to be on the safe
side, I wanted to see what would happen using various methods of fixing
things.. So I recreated the directory structure (on a much smaller
scale) on a test image and used debugfs to duplicate the state of the
broken filesystem.* The more I learn about the lower level workings of
the filesystem, the more fascinated I become and the more I want to
learn.



It just occurred to me that I have no life =)



Charles








_______________________________________________
Ext3-users mailing list
Ext3-users@redhat.com
https://www.redhat.com/mailman/listinfo/ext3-users
 

Thread Tools




All times are GMT. The time now is 03:51 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org