From ashitpro at yahoo.co.in Fri Feb 1 11:21:03 2008 From: ashitpro at yahoo.co.in (ashish mahamuni) Date: Fri, 1 Feb 2008 16:51:03 +0530 Subject: How to read group descriptor? Message-ID: <200802011221.m11CLWDt021783@mx3.redhat.com> Hi All, I am trying to read group descriptor from disk. I am able to read the superblock structure successfully. But I am not getting successful to get the group descriptor. Here is my code. Please check out what is missing. #include #include #include #include #include #include #include #include #define block_size 4096 #define boot_block_size 1024 int main() { char *buff = (char *)malloc(block_size); struct ext3_super_block * sblock = (struct ext3_super_block *)malloc(sizeof(struct ext3_super_block)); struct ext3_group_desc * gdesc = (struct ext3_group_desc *)malloc(sizeof(struct ext3_group_desc)); int fd = open("/dev/hda3",O_RDONLY); lseek(fd,boot_block_size,SEEK_CUR); //skip the boot block read(fd,buff,block_size); //read superblock,we read one block(4096 bytes)here memcpy((void *)sblock,(void *)buff,sizeof(struct ext3_super_block));//here I can fill sblock successfully.. //read the next block..assuming this will contain group dsc for this block..i.e. first group descriptor for first block group read(fd,buff,block_size); //read first block. It should contain group description structure. memcpy((void *)gdesc,(void *)buff,sizeof(struct ext3_group_desc)); //try to print some field inside structure.. printf("\nbg_inode_table:%u",gdesc->bg_inode_table); //Bang....It gives me zero. close(fd); return 0; } From adilger at sun.com Sat Feb 2 07:06:43 2008 From: adilger at sun.com (Andreas Dilger) Date: Sat, 02 Feb 2008 00:06:43 -0700 Subject: How to read group descriptor? In-Reply-To: <200802011221.m11CLWDt021783@mx3.redhat.com> References: <200802011221.m11CLWDt021783@mx3.redhat.com> Message-ID: <20080202070643.GZ23836@webber.adilger.int> On Feb 01, 2008 16:51 +0530, ashish mahamuni wrote: > I am trying to read group descriptor from disk. > I am able to read the superblock structure successfully. > But I am not getting successful to get the group descriptor. Here is my > code. Please check out what is missing. Why not just use libext2fs? Cheers, Andreas -- Andreas Dilger Sr. Staff Engineer, Lustre Group Sun Microsystems of Canada, Inc. From ashitpro at yahoo.co.in Mon Feb 4 06:13:40 2008 From: ashitpro at yahoo.co.in (ashish mahamuni) Date: Mon, 4 Feb 2008 11:43:40 +0530 (IST) Subject: How to read group descriptor? In-Reply-To: <20080202070643.GZ23836@webber.adilger.int> Message-ID: <354142.50242.qm@web94605.mail.in2.yahoo.com> --- On Sat, 2/2/08, Andreas Dilger wrote: > From: Andreas Dilger > Subject: Re: How to read group descriptor? > To: "ashish mahamuni" > Cc: ext3-users at redhat.com > Date: Saturday, 2 February, 2008, 12:36 PM > On Feb 01, 2008 16:51 +0530, ashish mahamuni wrote: > > I am trying to read group descriptor from disk. > > I am able to read the superblock structure > successfully. > > But I am not getting successful to get the group > descriptor. Here is my > > code. Please check out what is missing. > > Why not just use libext2fs? > > Cheers, Andreas > -- > Andreas Dilger > Sr. Staff Engineer, Lustre Group > Sun Microsystems of Canada, Inc. I don't know how to use libext2fs. Where can I get any documentation for this library? Get the freedom to save as many mails as you wish. To know how, go to http://help.yahoo.com/l/in/yahoo/mail/yahoomail/tools/tools-08.html From ashitpro at yahoo.co.in Mon Feb 4 06:26:45 2008 From: ashitpro at yahoo.co.in (ashish mahamuni) Date: Mon, 4 Feb 2008 11:56:45 +0530 (IST) Subject: How to read group descriptor? In-Reply-To: <354142.50242.qm@web94605.mail.in2.yahoo.com> Message-ID: <581838.43420.qm@web94613.mail.in2.yahoo.com> --- On Mon, 4/2/08, ashish mahamuni wrote: > From: ashish mahamuni > Subject: Re: How to read group descriptor? > To: "Andreas Dilger" > Cc: ext3-users at redhat.com > Date: Monday, 4 February, 2008, 11:43 AM > --- On Sat, 2/2/08, Andreas Dilger > wrote: > > > From: Andreas Dilger > > Subject: Re: How to read group descriptor? > > To: "ashish mahamuni" > > > Cc: ext3-users at redhat.com > > Date: Saturday, 2 February, 2008, 12:36 PM > > On Feb 01, 2008 16:51 +0530, ashish mahamuni wrote: > > > I am trying to read group descriptor from disk. > > > I am able to read the superblock structure > > successfully. > > > But I am not getting successful to get the group > > descriptor. Here is my > > > code. Please check out what is missing. > > > > Why not just use libext2fs? > > > > Cheers, Andreas > > -- > > Andreas Dilger > > Sr. Staff Engineer, Lustre Group > > Sun Microsystems of Canada, Inc. > > I don't know how to use libext2fs. > Where can I get any documentation for this library? > > > Get the freedom to save as many mails as you wish. To > know how, go to > http://help.yahoo.com/l/in/yahoo/mail/yahoomail/tools/tools-08.html > > _______________________________________________ > Ext3-users mailing list > Ext3-users at redhat.com > https://www.redhat.com/mailman/listinfo/ext3-users Well. I found out the documentation for libext2fs.. Sorry for being early bird. But I don't find any function which will return me group discriptor structure. 5, 50, 500, 5000 - Store N number of mails in your inbox. Go to http://help.yahoo.com/l/in/yahoo/mail/yahoomail/tools/tools-08.html From bryan at kadzban.is-a-geek.net Tue Feb 5 01:51:46 2008 From: bryan at kadzban.is-a-geek.net (Bryan Kadzban) Date: Mon, 04 Feb 2008 20:51:46 -0500 Subject: forced fsck (again?) In-Reply-To: <20080129235627.GB23836@webber.adilger.int> References: <20080123140847.GB29321@mit.edu> <20080123192334.GG3180@webber.adilger.int> <4797F397.9020306@kadzban.is-a-geek.net> <20080124043930.GG18433@webber.adilger.int> <47988245.4010904@kadzban.is-a-geek.net> <47995564.2050402@kadzban.is-a-geek.net> <20080125085557.GV18433@webber.adilger.int> <479A94D0.9080308@kadzban.is-a-geek.net> <20080128174804.GT18433@webber.adilger.int> <479E79D2.5070406@kadzban.is-a-geek.net> <20080129235627.GB23836@webber.adilger.int> Message-ID: <47A7C132.6010603@kadzban.is-a-geek.net> -----BEGIN PGP SIGNED MESSAGE----- Hash: RIPEMD160 Andreas Dilger wrote: > You can add a Signed-Off-By: Andreas Dilger here, > as it does everything I think is needed at this point... Just want to double check: I've made a few more changes here, based on some of the other messages between you and Ted, and the one message from Eric; I don't necessarily want to put your sign-off on it if I've reverted any of your changes. :-) > Probably good to put a version number in the script, along with your > name/email so it is clear what version a user is running. Done, along with a "contributions" section. >> # e2check configuration file > > Minor note - "lvscan configuration file". Uh, yep. I've also grepped both files for other occurrences of "e2" and removed anything that doesn't belong. (There was only one occurrence, also in the config file, under AC_UNKNOWN. It runs more than just e2fsck now.) One thing I did realize, though. The script still uses a lot of tools from e2fsprogs -- logsave and blkid at least; possibly more. Does it make sense to require e2fsprogs on a system whose only filesystems are XFS or reiser? (Does it make sense to provide this script as a separate package -- that would therefore depend on e2fsprogs -- on these systems, either?) Not entirely sure what I can do about that, though; I can use "tee -a" instead of logsave, but I'm not sure about blkid. Maybe /proc/mounts might be helpful? Summary of other changes: Added XFS cases to some functions, to document that nothing needs to be done (and get rid of warnings), and changed xfs_check to xfs_repair. (Per Eric Sandeen's message.) Changed back to two e2fsck calls, per Ted's message about the orphaned inode list getting cleared with e2fsck -p. Also switched back to -fy instead of -fn, since more useful output is given, and the snapshots are already read-write. (I can easily revert these if needed, back to a single "e2fsck -fn" call, but it sounded like the changes were probably required?) *Also* re-added "-C 0" so running the script interactively is slightly prettier. Append output to a single log file (per logical volume) in /var/log, instead of a separate file per LV per day. Added a date header to the file as well, before the output of each fsck. Other comments? -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFHp8ExS5vET1Wea5wRA9NDAJ4o+3465aI4klH2gIbRPtnjzCED+ACfZ5wR Ynsy2rkpguap4id5xN1MAmU= =j4w3 -----END PGP SIGNATURE----- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: lvcheck URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: lvcheck.conf URL: From ashitpro at yahoo.co.in Tue Feb 5 06:57:17 2008 From: ashitpro at yahoo.co.in (ashish mahamuni) Date: Tue, 5 Feb 2008 12:27:17 +0530 (IST) Subject: How to read group descriptor? In-Reply-To: <804dabb00802041511g2a5e5b3ctdf5765ca1582c86c@mail.gmail.com> Message-ID: <797699.20901.qm@web94603.mail.in2.yahoo.com> --- On Tue, 5/2/08, Peter Teoh wrote: > From: Peter Teoh > Subject: Re: How to read group descriptor? > To: "ashish mahamuni" > Date: Tuesday, 5 February, 2008, 4:41 AM > How about the using the command: > > Using this to check for ext2/ext3 filesystem: > file -s /dev/sdb1 > and > /sbin/dumpe2fs /dev/sdb1? > > to dump the group descriptor? > > On Feb 1, 2008 7:21 PM, ashish mahamuni > wrote: > > Hi All, > > I am trying to read group descriptor from disk. > > I am able to read the superblock structure > successfully. > > But I am not getting successful to get the group > descriptor. Here is my > > code. Please check out what is missing. > > > > > > > > #include > > #include > > #include > > #include > > #include > > #include > > #include > > #include > > > > #define block_size 4096 > > #define boot_block_size 1024 > > > > int main() > > { > > char *buff = (char *)malloc(block_size); > > > > struct ext3_super_block * sblock = (struct > ext3_super_block > > *)malloc(sizeof(struct ext3_super_block)); > > > > struct ext3_group_desc * gdesc = (struct > ext3_group_desc > > *)malloc(sizeof(struct ext3_group_desc)); > > > > int fd = open("/dev/hda3",O_RDONLY); > > > > lseek(fd,boot_block_size,SEEK_CUR); //skip the > boot block > > > > read(fd,buff,block_size); //read superblock,we > read one block(4096 > > bytes)here > > > > memcpy((void *)sblock,(void > *)buff,sizeof(struct > > ext3_super_block));//here I can fill sblock > successfully.. > > > > //read the next block..assuming this will > contain group dsc for this > > block..i.e. first group descriptor for first block > group > > read(fd,buff,block_size); //read first block. > It should contain > > group description structure. > > > > memcpy((void *)gdesc,(void > *)buff,sizeof(struct ext3_group_desc)); > > > > //try to print some field inside structure.. > > > printf("\nbg_inode_table:%u",gdesc->bg_inode_table); > //Bang....It > > gives me zero. > > > > close(fd); > > return 0; > > } > > > > > > > > _______________________________________________ > > Ext3-users mailing list > > Ext3-users at redhat.com > > https://www.redhat.com/mailman/listinfo/ext3-users > > > > > > -- > Peter Teoh > HP: 96809281 Thats fine. But I need it in my source code for some calculations. Bring your gang together - do your thing. Go to http://in.promos.yahoo.com/groups From lakshmipathi.g at gmail.com Tue Feb 5 10:53:38 2008 From: lakshmipathi.g at gmail.com (lakshmi pathi) Date: Tue, 5 Feb 2008 16:23:38 +0530 Subject: exthide - Linux File hiding tool Message-ID: Hi friends, I wrote a file hiding program under linux.(It's alpha) Here is the link : http://freshmeat.net/projects/exthide I welcome your comments and feedback and criticizms. ;-) Cheerrss, Lakshmipathi.G -------------- next part -------------- An HTML attachment was scrubbed... URL: From tytso at mit.edu Tue Feb 5 13:29:59 2008 From: tytso at mit.edu (Theodore Tso) Date: Tue, 5 Feb 2008 08:29:59 -0500 Subject: How to read group descriptor? In-Reply-To: <581838.43420.qm@web94613.mail.in2.yahoo.com> References: <354142.50242.qm@web94605.mail.in2.yahoo.com> <581838.43420.qm@web94613.mail.in2.yahoo.com> Message-ID: <20080205132959.GW18392@mit.edu> On Mon, Feb 04, 2008 at 11:56:45AM +0530, ashish mahamuni wrote: > > I found out the documentation for libext2fs.. > Sorry for being early bird. > But I don't find any function which will return me group discriptor structure. > After you open the filesystem, the superblock structure is available in fs->super. See the sources for misc/dumpe2fs.c and lib/e2p/ls.c for more information. And yes, the documentation could be better; patches and other improvements are welcome. :-) - Ted From lakshmipathi.g at gmail.com Tue Feb 5 13:41:42 2008 From: lakshmipathi.g at gmail.com (lakshmi pathi) Date: Tue, 5 Feb 2008 19:11:42 +0530 Subject: giis 4.2 - file undelete tool Message-ID: Hi friends, I have released giis4.2 few days back. Instead of providing undelete option for only /home and /root directories. User has an option to add other directories too. (like, /etc or /var ) url: http://freshmeat.net/projects/giis cheerrss, Lakshmipathi.G -------------- next part -------------- An HTML attachment was scrubbed... URL: From tytso at MIT.EDU Tue Feb 5 14:15:19 2008 From: tytso at MIT.EDU (Theodore Tso) Date: Tue, 5 Feb 2008 09:15:19 -0500 Subject: exthide - Linux File hiding tool In-Reply-To: References: Message-ID: <20080205141519.GY18392@mit.edu> On Tue, Feb 05, 2008 at 04:23:38PM +0530, lakshmi pathi wrote: > Hi friends, > I wrote a file hiding program under linux.(It's alpha) > Here is the link : > http://freshmeat.net/projects/exthide This is a dangerous program; if a full fsck is run on the filesystem, your "hidden files" will be erased. The code quality could defintely be improved, in terms of indentation style, #including the correct header files for portability, etc. - Ted From lakshmipathi.g at gmail.com Thu Feb 7 05:05:31 2008 From: lakshmipathi.g at gmail.com (lakshmi pathi) Date: Thu, 7 Feb 2008 10:35:31 +0530 Subject: exthide - Linux File hiding tool In-Reply-To: <20080205141519.GY18392@mit.edu> References: <20080205141519.GY18392@mit.edu> Message-ID: Hi, Thanks for your comments. Yes,i need to improve a lot on my coding skills, i'll surely learn and implement it soon. After hiding a file,i executed fsck program. fsck said : Unattached inode 6932386 Connect to /lost+found? i typed 'yes',the inode is placed under /lost+found directory. Now i tried to run exthide to unhide the file.The file is placed in its directory. yes,the hidden files are exposed during fsck. i don't think exthide will crash the harddisk. I agree exthide makes the standard file system into dirty, but i don't to think exthide is a dangerous program, as long as user hides minimum number of files with it. [I may be wrong here - please correct me if i'm wrong.] Thanks once again for your comments. Thanks, Lakshmipathi.G On 2/5/08, Theodore Tso wrote: > > On Tue, Feb 05, 2008 at 04:23:38PM +0530, lakshmi pathi wrote: > > Hi friends, > > I wrote a file hiding program under linux.(It's alpha) > > Here is the link : > > http://freshmeat.net/projects/exthide > > This is a dangerous program; if a full fsck is run on the filesystem, > your "hidden files" will be erased. > > The code quality could defintely be improved, in terms of indentation > style, #including the correct header files for portability, etc. > > - Ted > -------------- next part -------------- An HTML attachment was scrubbed... URL: From adilger at sun.com Mon Feb 11 18:19:41 2008 From: adilger at sun.com (Andreas Dilger) Date: Mon, 11 Feb 2008 11:19:41 -0700 Subject: forced fsck (again?) In-Reply-To: References: <200801221701.50202.giancarlo.corti@supsi.ch> <4796157E.5040803@redhat.com> <479615CA.1090408@redhat.com> <70b6f0bf0801221434r1f03b591w7525b7110dab27a8@mail.gmail.com> <20080122225248.GD1659@mit.edu> Message-ID: <20080211181941.GC6552@webber.adilger.int> On Jan 31, 2008 16:27 +0000, Matt Bernstein wrote: > Please forgive my late noticing of this. The idea is good, and will work > fine in 99% of cases. > > I'd love to snapshot (for rsync as well as fsck) my large filesystems, > which have external journals which in turn are in a different VG. > > I suspect that if I were to na?vely run your script, really interesting > things would be likely to happen ;) Well, the LVM snapshot code interacts with the filesystem and ext3 locks the whole filesystem and flushes the entire journal before the snapshot is done. This means that the journal is "clean" when the snapshot is done (needs_recovery flag is cleared in the ext3 superblock). The problem of course is that after the snapshot is done and the filesystem unfrozen the journal will continue to be used. > So.. I'd love to atomically make two snapshots, but I guess that is Hard > (or would at least require a very coarse lock). I suppose in the meantime I > could "tune2fs -O ^has_journal" the snapshot volume, but I'm too scared > even to do that. That would be exactly the right thing to do, because there isn't any data in the journal at all related to the snapshot. Making this automatic in some fashion is more desirable of course. > So.. maybe I could request that you either include a Big Fat Disclaimer, or > code based on the following (untested, you can probably do better)? > > if (tune2fs -l /dev/${VG}/${VOLUME}|egrep -q "Journal device") > then > echo "Cowardly refusing to play with external journals." > echo "There be dragons!" > exit 1 > fi Definitely a good idea until someone does a bit of testing with this and understands the interaction of the snapshot filesystem with the still-in-use journal device. Cheers, Andreas -- Andreas Dilger Sr. Staff Engineer, Lustre Group Sun Microsystems of Canada, Inc. From massimo.bongi at gmail.com Wed Feb 13 11:02:05 2008 From: massimo.bongi at gmail.com (Massimo Bongi) Date: Wed, 13 Feb 2008 12:02:05 +0100 Subject: problems with ext3 after resizing Message-ID: <8a0378fd0802130302g459b022fj31059abeec76aced@mail.gmail.com> Hello, I have problems with an ext3 partition whose data I would like not to lose, and I hope some one can help me.. I've used parted 1.6.19 to grow an ext3 partition (after adding some disks to a RAID array). It worked without errors, but now when I try to mount again the partition I get: # mount -t ext3 /dev/sdb1 /mountpoint mount: wrong fs type, bad option, bad superblock on /dev/sdb1, or too many mounted file systems with a corresponding message in dmesg: EXT3-fs: journal inode is deleted. I also tried mounting it ext2, getting the same from mount and this in dmesg: EXT2-fs: corrupt root inode, run e2fsck If I try dumpe2fs it does not complain: # dumpe2fs -h /dev/sdb1 dumpe2fs 1.35 (28-Feb-2004) Filesystem volume name: Last mounted on: Filesystem UUID: bf311738-c5af-4642-81ee-5fe1b2a4921f Filesystem magic number: 0xEF53 Filesystem revision #: 1 (dynamic) Filesystem features: has_journal filetype sparse_super large_file Default mount options: (none) Filesystem state: clean Errors behavior: Continue Filesystem OS type: Linux Inode count: 851853312 Block count: 1703705079 Reserved block count: 0 Free blocks: 1413636793 Free inodes: 851801401 First block: 0 Block size: 4096 Fragment size: 4096 Blocks per group: 32768 Fragments per group: 32768 Inodes per group: 16384 Inode blocks per group: 512 Last mount time: Mon Feb 11 10:01:29 2008 Last write time: Mon Feb 11 10:03:16 2008 Mount count: 13 Maximum mount count: 30 Last checked: Fri Nov 30 11:58:05 2007 Check interval: 0 () Reserved blocks uid: 0 (user root) Reserved blocks gid: 0 (group root) First inode: 11 Inode size: 128 Journal inode: 8 Journal backup: inode blocks and actually a plain e2fsck says it is clean. To make ireally t check the partition I added -f, and in this case I get: # e2fsck -f -n /dev/sdb1 e2fsck 1.35 (28-Feb-2004) Pass 1: Checking inodes, blocks, and sizes Root inode is not a directory. Clear? no Journal is not regular file. Fix? no Pass 2: Checking directory structure Pass 3: Checking directory connectivity Root inode not allocated. Allocate? no Cannot proceed without a root inode. e2fsck: aborted Does anyone understand what's going on? Which is the best strategy to recover it? I fear that a e2fsck -f without will delete the root inode and I will lose everything.. Any help is appreciated, Massimo From lists at nerdbynature.de Fri Feb 15 15:20:35 2008 From: lists at nerdbynature.de (Christian Kujau) Date: Fri, 15 Feb 2008 16:20:35 +0100 (CET) Subject: problems with ext3 after resizing In-Reply-To: <8a0378fd0802130302g459b022fj31059abeec76aced@mail.gmail.com> References: <8a0378fd0802130302g459b022fj31059abeec76aced@mail.gmail.com> Message-ID: On Wed, February 13, 2008 12:02, Massimo Bongi wrote: On Wed, February 13, 2008 12:02, Massimo Bongi wrote: > Does anyone understand what's going on? Which is the best strategy to > recover it? I fear that a e2fsck -f without will delete the root inode and > I will lose everything.. In case you don't have a recent backup, I'd probably make a backup now (dd from sdb1) and then try to fsck sdb1. When something goes wrong, you can always replay your diskimage... Christian. -- make bzImage, not war From jlforrest at berkeley.edu Fri Feb 15 15:28:18 2008 From: jlforrest at berkeley.edu (Jon Forrest) Date: Fri, 15 Feb 2008 07:28:18 -0800 Subject: Thank Goodness For The "rescue" Command in GNU Parted Message-ID: <47B5AF92.9020700@berkeley.edu> I thought I'd mention how useful the "rescue" command in GNU parted is. In the last year, by using this wonderful command, I've been able to completely resurrect 2 ext3 file systems that appeared to be lost. For example, yesterday I made some modifications to a RAID unit on a popular RAID controller. I had two units, and I changed one from RAID 0 to RAID 1. I expected this to wipe out the data on this unit. But, for some unknown reason, it also wiped out the partition table on the other unit. The "rescue" command saved the day. If you ever have partition table problems but think your file system area is intact, you should check out this command. I think you'll like it. Cordially, -- Jon Forrest Research Computing Support College of Chemistry 173 Tan Hall University of California Berkeley Berkeley, CA 94720-1460 510-643-1032 jlforrest at berkeley.edu From sebastia at l00-bugdead-prods.de Tue Feb 19 17:23:29 2008 From: sebastia at l00-bugdead-prods.de (Sebastian Reitenbach) Date: Tue, 19 Feb 2008 18:23:29 +0100 Subject: timestamps Message-ID: <20080219172330.15DBC5C83D@smtp.l00-bugdead-prods.de> Hi, is it possible to save and then retrieve timestamps in mili or microseconds with ext3? I've heard ext4 will have timestamps in nanoseconds. thanks Sebastian From cmm at us.ibm.com Tue Feb 19 18:09:24 2008 From: cmm at us.ibm.com (Mingming Cao) Date: Tue, 19 Feb 2008 10:09:24 -0800 Subject: timestamps In-Reply-To: <20080219172330.15DBC5C83D@smtp.l00-bugdead-prods.de> References: <20080219172330.15DBC5C83D@smtp.l00-bugdead-prods.de> Message-ID: <1203444564.7841.3.camel@localhost.localdomain> On Tue, 2008-02-19 at 18:23 +0100, Sebastian Reitenbach wrote: > Hi, > > is it possible to save and then retrieve timestamps in mili or microseconds > with ext3? > I've heard ext4 will have timestamps in nanoseconds. > Yes, ext4 supports nanosecond timestamp. It's not very hard to port the changes back to ext3, but it does requires ext3 formatted with larger inode size (>256bytes) to store the finer timestamps. Mingming From sebastia at l00-bugdead-prods.de Wed Feb 20 07:58:42 2008 From: sebastia at l00-bugdead-prods.de (Sebastian Reitenbach) Date: Wed, 20 Feb 2008 08:58:42 +0100 Subject: timestamps Message-ID: <20080220075842.B82985CA56@smtp.l00-bugdead-prods.de> Hi, cmm at us.ibm.com wrote: > On Tue, 2008-02-19 at 18:23 +0100, Sebastian Reitenbach wrote: > > Hi, > > > > is it possible to save and then retrieve timestamps in mili or microseconds > > with ext3? > > I've heard ext4 will have timestamps in nanoseconds. > > > Yes, ext4 supports nanosecond timestamp. It's not very hard to port the > changes back to ext3, but it does requires ext3 formatted with larger > inode size (>256bytes) to store the finer timestamps. thanks for the answer. I won't go fiddle around with ext3 ;) I either wait until ext4 gets matured, or have to take a different filesystem at all. kind regards Sebastian From tandrews at grok.co.za Wed Feb 20 12:50:03 2008 From: tandrews at grok.co.za (Thomas Andrews) Date: Wed, 20 Feb 2008 14:50:03 +0200 Subject: commit interval Message-ID: <47BC21FB.7010208@grok.co.za> Hi, I have an ext3 partition on a compact flash device. I was thinking of reducing the commit interval to say 30 sec, but I'm not sure it's really necessary. What I'd like to know is if ext3 will *actually* do any writes to the journal if none of the data has changed, and given that it's mounted noatime. eg, if only one file is modified every hour, will the journal still write every 5 seconds? I am using ordered mode btw. Many thanks, Thomas From tytso at mit.edu Wed Feb 20 13:44:33 2008 From: tytso at mit.edu (Theodore Tso) Date: Wed, 20 Feb 2008 08:44:33 -0500 Subject: ext3 partition can not be mounted as ext3 but as ext4 In-Reply-To: <47BC252D.9010101@tugraz.at> References: <47BC252D.9010101@tugraz.at> Message-ID: <20080220134433.GA30305@mit.edu> On Wed, Feb 20, 2008 at 02:03:41PM +0100, Gunter Zenkl wrote: > > After my NAS (QNAP TS109 with embedded Linux) behaved a bit strange, I > removed the hard disk (Seagate 500GB) and made a 1:1 image of the whole > drive with dd_rescue on my desktop. I worked on the image from here on > forward. The kernel version of the QNAP TS109 is at least 2.6.12.6-arm1 > probably something newer. > That seems.... very strange. Either your filesystem is horribly corrupted, or your NAS box did something very unusual. Do you have a hard drive image from a working NAS box that is known good, so we can see if they are doing something strange the ext3 filesystem format. (I doubt they are using ext4 as well, but maybe they grabbed some feature flags because they did do something wierd with the filesystem format with some kind of private extension? Unlikely, but we can't rule it out.) Another approach would be to get the sources for the kernel from the NAS manufactuerer (which must be available per the GPL) and diff against the baseline kernel to make sure they didn't do something wierd with the filesystem code. > Oh and debugfs on the ext4dev mounted partition gave: > > ----------------------------------------- > root at grml ~ # debugfs /mnt/floppy > debugfs 1.40.3 (05-Dec-2007) > /mnt/floppy: Attempt to read block from filesystem resulted in short read > while opening filesystem > debugfs: stats > stats: Filesystem not open You need to run debugfs on the device, not on the mounted partition: i.e., "debugfs /dev/sdd3". You mist also try using catastrophic mode ("debugfs -c /dev/sdd3") if the first invocation doesn't work. Good luck! - Ted From val at vahconsulting.com Wed Feb 20 22:25:52 2008 From: val at vahconsulting.com (Valerie Henson) Date: Wed, 20 Feb 2008 14:25:52 -0800 Subject: commit interval In-Reply-To: <47BC21FB.7010208@grok.co.za> References: <47BC21FB.7010208@grok.co.za> Message-ID: <70b6f0bf0802201425r566d6328l294adbcf03d0376a@mail.gmail.com> On Wed, Feb 20, 2008 at 4:50 AM, Thomas Andrews wrote: > Hi, > > I have an ext3 partition on a compact flash device. I was thinking of > reducing the commit interval to say 30 sec, but I'm not sure it's really > necessary. > > What I'd like to know is if ext3 will *actually* do any writes to the > journal if none of the data has changed, and given that it's mounted > noatime. eg, if only one file is modified every hour, will the journal > still write every 5 seconds? > > I am using ordered mode btw. It depends on what you are doing to the file system. Lots of writes? No writes? Some writes? Reducing commit interval will help if you are doing writes. The journal only commits if there is some change to write. With noatime, file reads will not cause any changes. Have you considered jffs2? Sure, CF devices do hardware wear-leveling, but in my experience they do it extremely badly. For flash, ext2 is better than ext3 if you can eat the fsck time. -VAL From caphrim007 at gmail.com Fri Feb 22 00:40:09 2008 From: caphrim007 at gmail.com (Tim Rupp) Date: Thu, 21 Feb 2008 18:40:09 -0600 Subject: looking for some advice Message-ID: <47BE19E9.8020001@gmail.com> Hi list, I have a 750 gig SATA drive with a single ext3 partition on it. I just recently (today) formatted it and began putting data on it, but got this message after a while of writing data EXT3 FS on sda1, internal journal EXT3-fs: mounted filesystem with ordered data mode. APIC error on CPU1: 00(40) APIC error on CPU1: 40(40) APIC error on CPU1: 40(40) APIC error on CPU1: 40(40) APIC error on CPU1: 40(40) attempt to access beyond end of device sda1: rw=0, want=7255425000, limit=1465144002 EXT3-fs error (device sda1): ext3_free_blocks: Freeing blocks not in datazone - block = 906928124, count = 1 Aborting journal on device sda1. ext3_abort called. EXT3-fs error (device sda1): ext3_journal_start_sb: Detected aborted journal Remounting filesystem read-only EXT3-fs error (device sda1) in ext3_reserve_inode_write: Journal has aborted EXT3-fs error (device sda1) in ext3_reserve_inode_write: Journal has aborted EXT3-fs error (device sda1) in ext3_orphan_del: Journal has aborted I had something similar to this happen with a completely different machine sometime ago and it turned out to be bad RAM I think. I've run badblocks on the drive and it's come back clean. This has happened with RHEL 4 and 5, so it's gotta be a hardware problem I think. Can anyone provide some pointers on where to go? Every time I unmount the drive, and start fsck, I get about 2 to 3 minutes into the fsck and then hit a kernel panic that stops the machine. The text up to the panic (from fsck) is [root at babar /]# fsck /dev/sda1 fsck 1.39 (29-May-2006) e2fsck 1.39 (29-May-2006) /dev/sda1: recovering journal /dev/sda1 contains a file system with errors, check forced. Pass 1: Checking inodes, blocks, and sizes Inode 453936 is in use, but has dtime set. Fix? yes Inode 453936 has compression flag set on filesystem without compression support. Clear? yes Inode 453936, i_blocks is 58, should be 0. Fix? yes Inodes that were part of a corrupted orphan linked list found. Fix? yes Inode 1035544 was part of the orphaned inode list. FIXED. Inode 1671448 is in use, but has dtime set. Fix? yes Inode 1671448 has imagic flag set. Clear? yes Inode 1671448 has compression flag set on filesystem without compression support. Clear? yes Inode 1671448, i_size is 8029468887176259360, should be 0. Fix? yes Inode 1671448, i_blocks is 740766520, should be 0. Fix? yes Inode 2524688 is in use, but has dtime set. Fix? yes Inode 2524688 has imagic flag set. Clear? yes Inode 2524688 has compression flag set on filesystem without compression support. Clear? yes Inode 2524688, i_size is 4194594118404629538, should be 0. Fix? yes Inode 2524688, i_blocks is 1868787572, should be 0. Fix? yes Inode 4079615 is in use, but has dtime set. Fix? yes Inode 4079615, i_size is 14052004244018609920, should be 0. Fix? yes and panic sets in. I don't know of a good way to capture the actual panic text though. In any event, I'd appreciate any insight you all may have. Thanks in advance, Tim From alex at alex.org.uk Fri Feb 22 10:28:21 2008 From: alex at alex.org.uk (Alex Bligh) Date: Fri, 22 Feb 2008 10:28:21 +0000 Subject: looking for some advice In-Reply-To: <47BE19E9.8020001@gmail.com> References: <47BE19E9.8020001@gmail.com> Message-ID: <68B1D6B9E33933513F612C3C@Ximines.local> --On 21 February 2008 18:40:09 -0600 Tim Rupp wrote: > I had something similar to this happen with a completely different > machine sometime ago and it turned out to be bad RAM I think. I've run > badblocks on the drive and it's come back clean. This has happened with > RHEL 4 and 5, so it's gotta be a hardware problem I think. > > Can anyone provide some pointers on where to go? memtest86? (assuming x86) Alex From Mike.Miller at hp.com Fri Feb 22 15:33:26 2008 From: Mike.Miller at hp.com (Miller, Mike (OS Dev)) Date: Fri, 22 Feb 2008 15:33:26 +0000 Subject: looking for some advice In-Reply-To: <68B1D6B9E33933513F612C3C@Ximines.local> References: <47BE19E9.8020001@gmail.com> <68B1D6B9E33933513F612C3C@Ximines.local> Message-ID: > -----Original Message----- > From: ext3-users-bounces at redhat.com > [mailto:ext3-users-bounces at redhat.com] On Behalf Of Alex Bligh > Sent: Friday, February 22, 2008 4:28 AM > To: Tim Rupp; ext3-users at redhat.com > Cc: Alex Bligh > Subject: Re: looking for some advice > > > > --On 21 February 2008 18:40:09 -0600 Tim Rupp > wrote: > > > I had something similar to this happen with a completely different > > machine sometime ago and it turned out to be bad RAM I > think. I've run > > badblocks on the drive and it's come back clean. This has happened > > with RHEL 4 and 5, so it's gotta be a hardware problem I think. > > > > Can anyone provide some pointers on where to go? > > memtest86? (assuming x86) > > Alex The partition table may be corrupt. Compare the ending block of the partition to the size of your disk. -- mikem > > _______________________________________________ > Ext3-users mailing list > Ext3-users at redhat.com > https://www.redhat.com/mailman/listinfo/ext3-users > From buraphalinuxserver at gmail.com Tue Feb 26 17:39:50 2008 From: buraphalinuxserver at gmail.com (BuraphaLinux Server) Date: Wed, 27 Feb 2008 00:39:50 +0700 Subject: backup superblocks Message-ID: <5d75f4610802260939s5ff4dba4l5d6a0cb4d4b1038d@mail.gmail.com> Please reveal a way using the e2fsprogs tools to do this: copy the known-good primary superblock to all backup superblocks I accept unmounting the filesystem first. This way I can add that step to my shutdown scripts and avoid those new e2fscks on cleanly unmounted filesystems that take many hours on my filesystems due to feature flag mismatches. I couldn't find any switch for tune2fs to set flags on backup superblocks, it seems to only work on the primary superblock. I'm using e2fsprogs-1.40.6 From hedayan at gmail.com Thu Feb 28 03:20:35 2008 From: hedayan at gmail.com (dayan) Date: Thu, 28 Feb 2008 11:20:35 +0800 Subject: EXT3-fs error (device sda3) in start_transaction: Journal has aborted Message-ID: <001a01c879b8$e5be5aa0$a701a8c0@alpha> Errors happy in the early hours of the Morning 4 or 5 AM. every time , many directories and files can't be accessed , message "I/O error " display, all partitions become read-only no data lost and no data can be wirted ,only redress is a reboot. Distribution: REDHAT version 4 X86_64 update 5 Server Platform : IBM X 366 RAID Controller : IBM ServerRAID 8i Disks : 4*73G SAS ST --- RAID5 Any help would be much appreciated. Thanks in advance. ---------------------- Greeting Danny -------------- next part -------------- An HTML attachment was scrubbed... URL: From pprs_proj at yahoo.com Thu Feb 28 06:57:00 2008 From: pprs_proj at yahoo.com (snehal nehete) Date: Wed, 27 Feb 2008 22:57:00 -0800 (PST) Subject: e2defrag error Message-ID: <321351.64577.qm@web45508.mail.sp1.yahoo.com> Hi, We want to defrag ext3 filesystem using e2defrag tool.When we tried to compile source code of defrag-e2c-0.73.1-1.1 ,following error had occured : /home/priyanka/Desktop/defrag-e2c-0.73.1-1.1 # make gcc -pipe -Wall -fomit-frame-pointer i686 -DHAVE_LLSEEK -DEXT2FS -c -o defrag.ext2.o defrag.c gcc: i686: No such file or directory make: *** [defrag.ext2.o] Error 1 rm defrag.ext2.o Can anyone suggest how to defrag ext3 filesystem? Is there any other tool to defrag ext3 FS? thanks --------------------------------- Never miss a thing. Make Yahoo your homepage. -------------- next part -------------- An HTML attachment was scrubbed... URL: From pprs_proj at yahoo.com Thu Feb 28 07:25:55 2008 From: pprs_proj at yahoo.com (snehal nehete) Date: Wed, 27 Feb 2008 23:25:55 -0800 (PST) Subject: error while mounting ext3 Message-ID: <674017.8932.qm@web45502.mail.sp1.yahoo.com> Hi, i compiled ext3 as a module and it was successfully inserted.but while mounting i got segmentation fault. Can anyone suggest how should i compile ext3 as a module? thanks --------------------------------- Never miss a thing. Make Yahoo your homepage. -------------- next part -------------- An HTML attachment was scrubbed... URL: From lists at nerdbynature.de Thu Feb 28 08:57:05 2008 From: lists at nerdbynature.de (Christian Kujau) Date: Thu, 28 Feb 2008 09:57:05 +0100 (CET) Subject: error while mounting ext3 Message-ID: <240459ccd6716fd3a1d8ba845e058f1c.squirrel@housecafe.dyndns.org> On Thu, February 28, 2008 08:25, snehal nehete wrote: > i compiled ext3 as a module and it was successfully inserted.but while > mounting i got segmentation fault. > Can anyone suggest how should i compile ext3 as a module? Why do you want/have to compile your kernel by yourself? What's wrong with your distribution's kernel? For which kernel are you trying to compile for? With which compiler? Which arch? C. -- make bzImage, not war From lists at nerdbynature.de Thu Feb 28 09:00:42 2008 From: lists at nerdbynature.de (Christian Kujau) Date: Thu, 28 Feb 2008 10:00:42 +0100 (CET) Subject: e2defrag error In-Reply-To: <321351.64577.qm@web45508.mail.sp1.yahoo.com> References: <321351.64577.qm@web45508.mail.sp1.yahoo.com> Message-ID: On Thu, February 28, 2008 07:57, snehal nehete wrote: > We want to defrag ext3 filesystem using e2defrag tool.When we tried to > compile source code of defrag-e2c-0.73.1-1.1 ,following error had occured I think you're better off asking the defrag-e2c folks[0]. > Can anyone suggest how to defrag ext3 filesystem? > Is there any other tool to defrag ext3 FS? This comes up every now and then on this list. Try: http://search.gmane.org/search.php?group=gmane.comp.file-systems.ext3.user&query=defrag C. [0] http://e2compr.sourceforge.net/attic/defrag.html -- make bzImage, not war From lists at nerdbynature.de Thu Feb 28 09:04:09 2008 From: lists at nerdbynature.de (Christian Kujau) Date: Thu, 28 Feb 2008 10:04:09 +0100 (CET) Subject: EXT3-fs error (device sda3) in start_transaction: Journal has aborted In-Reply-To: <001a01c879b8$e5be5aa0$a701a8c0@alpha> References: <001a01c879b8$e5be5aa0$a701a8c0@alpha> Message-ID: <18d860291145354d69ec95a0f5535a16.squirrel@housecafe.dyndns.org> On Thu, February 28, 2008 04:20, dayan wrote: > Errors happy in the early hours of the Morning 4 or 5 AM. Does the errors occur *every* morning? Maybe some kind of (cron-)job is merely triggering the failures... > every time , many directories and files can't be accessed , message "I/O > error " display, all partitions become read-only please post a few more errors from your syslog or kern.log. C. -- make bzImage, not war From alex at alex.org.uk Thu Feb 28 11:24:50 2008 From: alex at alex.org.uk (Alex Bligh) Date: Thu, 28 Feb 2008 11:24:50 +0000 Subject: EXT3-fs error (device sda3) in start_transaction: Journal has aborted In-Reply-To: <001a01c879b8$e5be5aa0$a701a8c0@alpha> References: <001a01c879b8$e5be5aa0$a701a8c0@alpha> Message-ID: <507B1699152DA61F14568131@Ximines.local> --On 28 February 2008 11:20:35 +0800 dayan wrote: > Errors happy in the early hours of the Morning 4 or 5 AM. > > every time , many directories and files can't be accessed , message "I/O > error " display, all partitions become read-only > > no data lost and no data can be wirted ,only redress is a reboot. Sounds like a power glitch or EMI. Does the building heating switch on then? Alex From hedayan at gmail.com Thu Feb 28 11:27:33 2008 From: hedayan at gmail.com (dayan) Date: Thu, 28 Feb 2008 19:27:33 +0800 Subject: EXT3-fs error (device sda3) in start_transaction: Journal has aborted References: <001a01c879b8$e5be5aa0$a701a8c0@alpha> <18d860291145354d69ec95a0f5535a16.squirrel@housecafe.dyndns.org> Message-ID: <003a01c879fc$ec144510$a701a8c0@alpha> Kernel print on the console " EXT3-fs error (device /dev/sda3) in start_transaction: Journal has aborted " only my problem is similar to this : http://www.nabble.com/journal-has-aborted-td13556995.html ----- Original Message ----- From: "Christian Kujau" To: "dayan" Cc: "RHMaillist_Ext3-users" Sent: Thursday, February 28, 2008 5:04 PM Subject: Re: EXT3-fs error (device sda3) in start_transaction: Journal has aborted > On Thu, February 28, 2008 04:20, dayan wrote: >> Errors happen in the early hours of the Morning 4 or 5 AM. > > Does the errors occur *every* morning? Maybe some kind of (cron-)job is > merely triggering the failures... > >> every time , many directories and files can't be accessed , message "I/O >> error " display, all partitions become read-only > > please post a few more errors from your syslog or kern.log. > > C. > -- > make bzImage, not war > From andre.nitschke at versanet.de Thu Feb 28 13:22:21 2008 From: andre.nitschke at versanet.de (Andre Nitschke) Date: Thu, 28 Feb 2008 14:22:21 +0100 Subject: Avoid Fragmentation of ext3 Message-ID: <20080228142221.o6xo2cl0bkg80g0k@webmail.versatel.de> Hello, i just want to know, how ext3 avoids fragmentation. Well, i think it works like this (but i dont know...): When the OS says to the filesystem, save the file, the file system looks, where are free sectors laying together to use. when there is enough place the filesystem try's to write the file without fragments. is there not enough place, the fs wrote the file in the way, to create less fragemnts. some file systems keep space after the file, for when the file grows. i dont know, works ext3 in this way? maybe somebody can explain it shortly. thanks frindly From sandeen at redhat.com Thu Feb 28 15:05:54 2008 From: sandeen at redhat.com (Eric Sandeen) Date: Thu, 28 Feb 2008 09:05:54 -0600 Subject: EXT3-fs error (device sda3) in start_transaction: Journal has aborted In-Reply-To: <003a01c879fc$ec144510$a701a8c0@alpha> References: <001a01c879b8$e5be5aa0$a701a8c0@alpha> <18d860291145354d69ec95a0f5535a16.squirrel@housecafe.dyndns.org> <003a01c879fc$ec144510$a701a8c0@alpha> Message-ID: <47C6CDD2.1080200@redhat.com> dayan wrote: > Kernel print on the console " EXT3-fs error (device /dev/sda3) in start_transaction: Journal has > aborted " only > > perhaps your logging level is set low enough that you don't see more; if you run the "dmesg" command you should see more; I would not expect ext3/jbd to *only* print this error w/o further info? If it is, then error reporting needs to be fixed in this case. -Eric From adilger at sun.com Fri Feb 29 01:14:54 2008 From: adilger at sun.com (Andreas Dilger) Date: Thu, 28 Feb 2008 17:14:54 -0800 Subject: e2defrag error In-Reply-To: References: <321351.64577.qm@web45508.mail.sp1.yahoo.com> Message-ID: <20080229011454.GE3176@webber.adilger.int> On Feb 28, 2008 10:00 +0100, Christian Kujau wrote: > On Thu, February 28, 2008 07:57, snehal nehete wrote: > > We want to defrag ext3 filesystem using e2defrag tool.When we tried to > > compile source code of defrag-e2c-0.73.1-1.1 ,following error had occured > > I think you're better off asking the defrag-e2c folks[0]. If this is the old e2defrag then the answer is "just don't use it", because it is very old and will corrupt your filesystem. > > Can anyone suggest how to defrag ext3 filesystem? Why do you think your filesystem is fragmented, is the first question. If it is then you should delete as many files as you can (or move non- critical files to another filesystem), and then rewrite the files in single stream copies. Using ext4+mballoc+delalloc will almost entirely eliminate fragmentation, but it isn't in any released kernel yet. Cheers, Andreas -- Andreas Dilger Sr. Staff Engineer, Lustre Group Sun Microsystems of Canada, Inc.