Re: Anyway to extract a large file from EXT2FS filesystem?

From: Bruce Evans (bde_at_zeta.org.au)
Date: 02/18/04

  • Next message: matthew: "Re: Sending mail gets 'Relaying Denied' from off network."
    Date: Wed, 18 Feb 2004 11:37:26 +1100 (EST)
    To: Tim Robbins <tjr@freebsd.org>
    
    

    On Tue, 17 Feb 2004, Tim Robbins wrote:

    > > 5BOn Tue, Feb 17, 2004 at 11:16:50AM +0100, Stefan Krantz wrote:
    > > > > > I would like to extract a large (11GB) tar file on an ext3 filesystem. But
    > > > > > it shows only to be about 3gb large:
    > > > > >
    > > > > > yabba# ls -la pictures.tar
    > > > > > -rw-r--r-- 1 root wheel 3317055488 Feb 15 19:03 pictures.tar
    > > > > >
    > > > > > Is there any possible way to extract the file?

    > Try this patch and let me know how it goes. You'll have to specify
    > the file name of /sys/gnu/ext2fs/ext2_inode_cnv.c to patch(1) manually,
    > then either buildkernel or rebuild only ext2fs.ko. If the file shows
    > up with the correct size in a directory listing, make sure you can actually
    > read data past 4 GB.
    >
    > ==== //depot/user/tjr/freebsd-tjr/src/sys/gnu/ext2fs/ext2_inode_cnv.c#1 - /p4/tjr/src/sys/gnu/ext2fs/ext2_inode_cnv.c ====
    > @@ -77,6 +77,8 @@
    > */
    > ip->i_mode = ei->i_links_count ? ei->i_mode : 0;
    > ip->i_size = ei->i_size;
    > + if (S_ISREG(ip->i_mode))
    > + ip->i_size |= ((u_int64_t)ei->i_size_high) << 32;
    > ip->i_atime = ei->i_atime;
    > ip->i_mtime = ei->i_mtime;
    > ip->i_ctime = ei->i_ctime;
    > @@ -112,6 +114,8 @@
    > */
    > ei->i_dtime = ei->i_links_count ? 0 : ip->i_mtime;
    > ei->i_size = ip->i_size;
    > + if (S_ISREG(ip->i_mode))
    > + ei->i_size_high = ip->i_size >> 32;
    > ei->i_atime = ip->i_atime;
    > ei->i_mtime = ip->i_mtime;
    > ei->i_ctime = ip->i_ctime;
    >

    The feature stuff needs to be handled for writing.

    The feature stuff is slightly broken for reading. Large file support is
    a read-only compatibility feature (it is indicated by the
    EXT2_FEATURE_RO_COMPAT_LARGE_FILE flag in the s_feature_ro_compat field
    in the superblock), but we didn't support it without the first hunk in
    the above patch so we should have rejected even r/o mounts of file systems
    that have this flag set. We only reject r/w mounts of such file systems.
    I suppose this isn't a problem in Linux implementations of ext2fs because
    implementations that don't support large files in ext2fs don't support
    large files anywhere, so files larger than the old limit of 4GB are handled
    as correctly as possible at read time so their presence need not prevent
    mounting.

    Bruce
    _______________________________________________
    freebsd-questions@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-questions
    To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"


  • Next message: matthew: "Re: Sending mail gets 'Relaying Denied' from off network."

    Relevant Pages

    • Re: B-Tree Index Usage
      ... I asked for feedback on the need for a re-index feature that would make ... support an enhancement request that allows this sort of thing to be ... Support translates directly to something that should be ... and no one else driving this popular model truck ...
      (comp.databases.pick)
    • Re: she might rip close, unless Rifaat upsets demonstrations in Maifys flow
      ... My convincing pool won't make before I feature it. ... When doesn't Vance exceed downstairs? ... Almost no respectable mls with regard to the crucial guerrilla were ... it indicates a discharge too red in support of her ...
      (sci.crypt)
    • Re: For Each
      ... the counter is a counter for the iteration - not the group ... I think the feature would be useful. ... Framework and having a counter in a for each loop, ... I meant the necessary changes to the framework to support: ...
      (microsoft.public.dotnet.languages.vb)
    • landing alongside chosen ulcer
      ... launch commonly if Mhammed's feature isn't tricky. ... in support of the gigantic harbour. ... searchs the sure wish under the television? ...
      (rec.music.christian)
    • Re: Is there no Good image viewing and managing software ?
      ... feature and what is functionality.. ... is great because it has universal support. ... you should be able to drag ... while I select files - I want to go into tag mode and then click away ...
      (rec.photo.digital)