[opensuse] Transparent Archive (TAR or Zip) Access for Linux?
Hi, Does anyone know if there's a Linux counterpart to the Windows ability to treat Zip files as if they're just directories, transparently deriving directory information and automatically extracting their contents on demand? For what I'd like to be able to do, a KDE I/O slave will not suffice, it has to be system-wide and transparent so arbitrary scripts and applications can access it. Thanks in advance for any pointers anyone has. Randall Schulz -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Randall R Schulz wrote:
Hi,
Does anyone know if there's a Linux counterpart to the Windows ability to treat Zip files as if they're just directories, transparently deriving directory information and automatically extracting their contents on demand?
For what I'd like to be able to do, a KDE I/O slave will not suffice, it has to be system-wide and transparent so arbitrary scripts and applications can access it.
Thanks in advance for any pointers anyone has.
Randall Schulz
I don't know if it'll do what you want, but Konqueror lets you browse the contents of zip files. -- Use OpenOffice.org <http://www.openoffice.org> -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Friday 29 August 2008 09:36, James Knott wrote:
Randall R Schulz wrote:
Hi,
Does anyone know if there's a Linux counterpart to the Windows ability to treat Zip files as if they're just directories, ...
For what I'd like to be able to do, a KDE I/O slave will not suffice, it has to be system-wide and transparent so arbitrary scripts and applications can access it.
...
I don't know if it'll do what you want, but Konqueror lets you browse the contents of zip files.
I thought I covered that by saying that KDE I/O slave-based solutions won't work for me and that I need to be able to access contents from "arbitrary scripts and applications." Randall Schulz -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On 2008/08/29 12:36 (GMT-0400) James Knott apparently typed:
Randall R Schulz wrote:
Does anyone know if there's a Linux counterpart to the Windows ability to treat Zip files as if they're just directories, transparently deriving directory information and automatically extracting their contents on demand?
For what I'd like to be able to do, a KDE I/O slave will not suffice, it has to be system-wide and transparent so arbitrary scripts and applications can access it.
Thanks in advance for any pointers anyone has.
I don't know if it'll do what you want, but Konqueror lets you browse the contents of zip files.
I don't know about using it for the scripts part, but mc is how I navigate and extract files from most archives. -- "Love is not easily angered. Love does not demand its own way." 1 Corinthians 13:5 NIV Team OS/2 ** Reg. Linux User #211409 Felix Miata *** http://fm.no-ip.com/ -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Friday 29 August 2008 09:28, Randall R Schulz wrote:
Hi,
Does anyone know if there's a Linux counterpart to the Windows ability to treat Zip files as if they're just directories, transparently deriving directory information and automatically extracting their contents on demand?
...
I concocted the search that answers the question, at least in part: <http://www.linux.com/feature/132196> <http://www.linux.com/feature/132196?theme=print> <http://linux.softpedia.com/get/System/Filesystems/fuse-zip-40109.shtml> It's interesting that when issuing the Google search "Compressed Archive FUSE Linux" it asks you if you really meant "Compressed Archive SUSE Linux". Randall Schulz -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Friday 29 August 2008 10:02, Randall R Schulz wrote:
On Friday 29 August 2008 09:28, Randall R Schulz wrote:
Hi,
Does anyone know if there's a Linux counterpart to the Windows ability to treat Zip files as if they're just directories, transparently deriving directory information and automatically extracting their contents on demand?
...
I concocted the search that answers the question, at least in part:
<http://www.linux.com/feature/132196> <http://www.linux.com/feature/132196?theme=print>
<http://linux.softpedia.com/get/System/Filesystems/fuse-zip-40109.shtml>
The "fuse-zip" software builds without complaint and appears to work on 10.3. I haven't tried it on my 10.0 system, which is where I'd really like to have it, but it's a start. Randall Schulz -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Friday 29 August 2008 09:28:38 am Randall R Schulz wrote:
Hi,
Does anyone know if there's a Linux counterpart to the Windows ability to treat Zip files as if they're just directories, transparently deriving directory information and automatically extracting their contents on demand?
For what I'd like to be able to do, a KDE I/O slave will not suffice, it has to be system-wide and transparent so arbitrary scripts and applications can access it.
Thanks in advance for any pointers anyone has.
Randall: That would appear to be a major redesign of how Linux and KDE (or Gnome) interact. Now, in vista and in KDE I can open compressed files as if they were a directory, perform actions (open/save/edit) on included files and then leave the compressed file with teh changes saved. If you're looking at allowing KDE/GNOME apps - such as OpenOffice, Kate, GIMP or vi to open/edit/save files in a compressed directory using the same model, I would imagine you'd have to take the functionality out of of KDE/GNOME and add it to the kernel modules that handle the disk subsystem. I just tried in OpenOffice and Kate - as well as in Word 2003 under Vista - and none of the applications were able to browse a compressed file as if it were a directory then open the contents individually. -- kai www.filesite.org || www.4thedadz.com || www.perfectreign.com remember - a turn signal is a statement, not a request -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Friday 29 August 2008 10:41, Kai Ponte wrote:
On Friday 29 August 2008 09:28:38 am Randall R Schulz wrote:
Hi,
Does anyone know if there's a Linux counterpart to the Windows ability to treat Zip files as if they're just directories, transparently deriving directory information and automatically extracting their contents on demand?
For what I'd like to be able to do, a KDE I/O slave will not suffice, it has to be system-wide and transparent so arbitrary scripts and applications can access it.
Thanks in advance for any pointers anyone has.
Randall:
That would appear to be a major redesign of how Linux and KDE (or Gnome) interact.
FUSE is the answer. Check out the other links I posted: <http://www.linux.com/feature/132196> <http://www.linux.com/feature/132196?theme=print> <http://linux.softpedia.com/get/System/Filesystems/fuse-zip-40109.shtml>
...
-- kai
Randall Schulz -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Randall R Schulz schreef:
Hi,
Does anyone know if there's a Linux counterpart to the Windows ability to treat Zip files as if they're just directories, transparently deriving directory information and automatically extracting their contents on demand?
For what I'd like to be able to do, a KDE I/O slave will not suffice, it has to be system-wide and transparent so arbitrary scripts and applications can access it.
Thanks in advance for any pointers anyone has.
Randall Schulz
Sounds like you are asking for a Filesystem in USErspace aka FUSE. Next step is to visit the FUSE project page on SourceForge (http://fuse.sourceforge.net/), and look at the list of available filesystems based on FUSE. For archives, you'll need http://fuse.sourceforge.net/wiki/index.php/ArchiveFileSystems I think you'll find what you need over there. -- Amedee -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Friday 29 August 2008 12:25, Amedee Van Gasse wrote:
Randall R Schulz schreef:
Hi,
Does anyone know if there's a Linux counterpart to the Windows ability to treat Zip files as if they're just directories, ...
Thanks in advance for any pointers anyone has.
...
Sounds like you are asking for a Filesystem in USErspace aka FUSE.
Yes, that much I realized shortly after asking.
Next step is to visit the FUSE project page on SourceForge (http://fuse.sourceforge.net/), and look at the list of available filesystems based on FUSE. For archives, you'll need http://fuse.sourceforge.net/wiki/index.php/ArchiveFileSystems
Thanks. That's more like what I expected, namely that this was an obvious thing to create. Now I just have to figure out which of the several implementations is best for me.
I think you'll find what you need over there.
Looks that way.
-- Amedee
Thanks again. Randall Schulz -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Friday 29 August 2008 12:25, Amedee Van Gasse wrote:
Randall R Schulz schreef:
Hi,
Does anyone know if there's a Linux counterpart to the Windows ability to treat Zip files as if they're just directories, transparently deriving directory information and automatically extracting their contents on demand?
...
Sounds like you are asking for a Filesystem in USErspace aka FUSE.
... http://fuse.sourceforge.net/wiki/index.php/ArchiveFileSystems
I think you'll find what you need over there.
I tried archivemount. It works beautifully. I just had to install libarchive (available via Guru's Packages for 10.0) and, for some reason, manually issue the "insmod" call for the FUSE kernel module. I wrote a little script, "am" to facilitate easy mounting and unmounting of archive files. What's more, while the capsule summary on the page to which you referred me says that archivemount handles cpio, tar.gz, tar.bz2, I find that it also handles .zip and uncompressed .tar, too. I guess it's up to libarchive which formats are handled, so presumably all those mentioned on the man page installed with libarchive are also handled: · old-style tar archives, · most variants of the POSIX “ustar” format, · the POSIX “pax interchange” format, · GNU-format tar archives, · most common cpio archive formats, · ISO9660 CD images (with or without RockRidge extensions), · Zip archives. The library automatically detects archives compressed with gzip(1), bzip2(1), or compress(1) and decompresses them transparently. I confirmed that ISO images work with archivemount. To me (and with my helper script), this is a nice convenience by comparison to mounting ISOs via a loopback device. Thanks again for the pointer. This is very useful.
-- Amedee
Randall Schulz -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Randall R Schulz a écrit :
I confirmed that ISO images work with archivemount. To me (and with my helper script), this is a nice convenience by comparison to mounting ISOs via a loopback device.
do you know than reading this list is a rewarding activity! I never understand what was this "fuse" I often see in web scripting (not by me :-). so this is "File system in USeR space". And *I have it already* installed on my openSUSE 11 (try searching fuse in yast software install)... and fuse<tab> shows a lot of things, for example fuseiso opensuse.iso /mnt... mount the iso on /mnt great!!!! i didn't know I had this at hand! thanks all for the info jdd -- Jean-Daniel Dodin Président du CULTe www.culte.org -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Fri, Aug 29, 2008 at 9:28 AM, Randall R Schulz <rschulz@sonic.net> wrote:
Hi,
Does anyone know if there's a Linux counterpart to the Windows ability to treat Zip files as if they're just directories, transparently deriving directory information and automatically extracting their contents on demand?
For what I'd like to be able to do, a KDE I/O slave will not suffice, it has to be system-wide and transparent so arbitrary scripts and applications can access it.
Others have provided answers on this thread, I just wanted to ask a question: Are you sure Vista provides this as transparently as you are requesting for Linux? Because if you open a cmd prompt and CD to a zip name Vista will slap you down. Its really only explorer that can do that, same as Konqueror. And I don't know of a Fuse extension for Vista. -- ----------JSA--------- Someone stole my tag line, so now I have this rental. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Friday 29 August 2008 16:50, John Andersen wrote:
On Fri, Aug 29, 2008 at 9:28 AM, Randall R Schulz <rschulz@sonic.net> wrote:
Hi,
Does anyone know if there's a Linux counterpart to the Windows ability to treat Zip files as if they're just directories, ...
Others have provided answers on this thread, I just wanted to ask a question:
Are you sure Vista provides this as transparently as you are requesting for Linux?
I've never used Vista, nor did I mention it. I only said "Windows." Nonetheless, I don't recall the extent of this capability, but would we be surprised if Linux did it better?
... ----------JSA---------
Randall Schulz -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Friday 29 August 2008 06:09:50 pm Randall R Schulz wrote:
On Friday 29 August 2008 16:50, John Andersen wrote:
On Fri, Aug 29, 2008 at 9:28 AM, Randall R Schulz <rschulz@sonic.net>
wrote:
Hi,
Does anyone know if there's a Linux counterpart to the Windows ability to treat Zip files as if they're just directories, ...
Others have provided answers on this thread, I just wanted to ask a question:
Are you sure Vista provides this as transparently as you are requesting for Linux?
I've never used Vista, nor did I mention it. I only said "Windows."
Nonetheless, I don't recall the extent of this capability, but would we be surprised if Linux did it better?
Nah, they're pretty much on equal par. I have vista on one of my desktops at work (Vista, openSUSE 10.3, Win2K, WinXP) and as a guest OS in my laptop. On both KDE and Vista you can open compressed files as folders, browse the contents, edit in native programs (word, openoffice..) and then save back without having to manipulate the archive file. Neither seem to allow for opening an archive file as a folder from within a file open/save dialog box. -- kai www.filesite.org || www.4thedadz.com || www.perfectreign.com remember - a turn signal is a statement, not a request -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Randall R Schulz schreef:
On Friday 29 August 2008 16:50, John Andersen wrote:
On Fri, Aug 29, 2008 at 9:28 AM, Randall R Schulz <rschulz@sonic.net> wrote:
Hi,
Does anyone know if there's a Linux counterpart to the Windows ability to treat Zip files as if they're just directories, ... Others have provided answers on this thread, I just wanted to ask a question:
Are you sure Vista provides this as transparently as you are requesting for Linux?
I've never used Vista, nor did I mention it. I only said "Windows."
As far as I know, the feature first appeared in Windows XP. Or perhaps 2000, but it doesn't matter. Those versions are no longer sold via regular channels, and Vista is the only version for desktops in the shops. But the majority of Windows installations is WinXP. The zip folders feature in Windows is controlled by zipfldr.dll. This dll is called by the explorer shell. The command prompt does not call the explorer shell, nor does it call zipfldr.dll. So that means no zip folders in the cmd prompt. Actually, windows zip folders is a lot like kio slaves, or packer plugins (wcx) in Total Commander, or whatever it is that Midnight Commander does. However Windows does also have something that can be compared to FUSE: Installable File Systems or IFS. Originally it came from OS/2... In recent Windows versions, Microsoft has moved support for FAT out of the kernel and into an IFS. Only NTFS remains in the kernel. ISO9660, Joliet, SMB/CIFS,... are all IFS. There are even a few IFS drivers not developed by Microsoft, some of you may know the Ext2fs IFS driver, with read/write support for ext2/3 in Windows.
Nonetheless, I don't recall the extent of this capability, but would we be surprised if Linux did it better?
I don't know enough about FUSE and IFS to compare, but I would think it's difficult to give a "better" label. -- Amedee -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
----- Original Message ----- From: "John Andersen" <jsamyth@gmail.com> Cc: <opensuse@opensuse.org> Sent: Friday, August 29, 2008 7:50 PM Subject: Re: [opensuse] Transparent Archive (TAR or Zip) Access for Linux?
On Fri, Aug 29, 2008 at 9:28 AM, Randall R Schulz <rschulz@sonic.net> wrote:
Hi,
Does anyone know if there's a Linux counterpart to the Windows ability to treat Zip files as if they're just directories, transparently deriving directory information and automatically extracting their contents on demand?
For what I'd like to be able to do, a KDE I/O slave will not suffice, it has to be system-wide and transparent so arbitrary scripts and applications can access it.
Others have provided answers on this thread, I just wanted to ask a question:
Are you sure Vista provides this as transparently as you are requesting for Linux?
Because if you open a cmd prompt and CD to a zip name Vista will slap you down. Its really only explorer that can do that, same as Konqueror. And I don't know of a Fuse extension for Vista.
Same on XP. The request is a nice idea but it was wrong to claim that Windows does it and expect to find it in Linux because it existed in Windows when in fact it does not. I laughed when I read that because I knew it was only an application, explorer, not magic-everywhere, exactly like konqueror. But color me surprised when something more than midnight commander and other explorer-alikes turned up after all. There is a thig called compressed folder in Windows but it's not a zip file. -- Brian K. White brian@aljex.com http://www.myspace.com/KEYofR +++++[>+++[>+++++>+++++++<<-]<-]>>+.>.+++++.+++++++.-.[>+<---]>++. filePro BBx Linux SCO FreeBSD #callahans Satriani Filk! -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Friday 29 August 2008 19:43, Brian K. White wrote:
...
... I laughed when I read that ...
I'm pleased to have indebted you to me for the provision of laughter.
...
-- Brian K. White
RRS -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Randall R Schulz wrote:
... I laughed when I read that ...
I'm pleased to have indebted you to me for the provision of laughter.
Sidenote: :-) -- there really isn't enough laughter in life these days... Ever noticed how much of our 'humor' involves putting someone or something else "down"? Certainly "clowns" exploit this easy source of getting laughs, but it's odd that a small percentage of what we find humorous doesn't involve someone or something else's discomfiture or mistake. But that's a philosophical issue for another place, perhaps. (* look at the silly linda getting all serious over philosophical roots of what we find humorous...*) ... (* ok, some are more easily amused than others...*) (* but being easily amused can be a good thing: you are more often amused? *) :-) The real Question (missing feature in Linux?): Windows (NT-based) does have transparent, on-the-fly compression that can be enabled on NTFS. The transparent compress/decompress works with with all apps. If one enables compression for a volume, NT will look for "opportunities" to save space on on fixed-block sizes that are 16 times the Cluster size up to a max "compression unit", "CU", of 64k. This implicitly makes 4k the largest cluster size that will still allow file compression to be enabled on NTFS. NT requires that compression save at least 1 cluster, or it doesn't bother, but a file of all one's, for example, could be stored in about 1/16th the cluster space of a non-compressed file (a file of all 'zero's, can get better savings with "sparse files"). But this means each integral "CU" is checked for possible compression savings -- so data files might have some ranges compressed, but not others. The fact that NT implements compression in "CU"-sized chunks means there is very little hit in speed for random-access. Obviously, the speed hit, will "vary" by the ratio of CPU-power:disk speed...with a speed hit being more noticeable if the drive is a 15K RPM SAS(scsi)-based RAID compared to a slower IDE-based non-raid systems. On linux, I don't know of an implementation that does this as transparently as NT does with NTFS. Since the clusters are marked 'compressed' in the file system, there likely has to be some flag available on a "per-CU" basis in the NTFS meta information. On a data-read of a compressed section, NTFS decompresses the contents of the CU AND allocates the full, uncompressed file-space needed by the "CU" as *backing store* for the data that's decompressed into the block buffer. If the data isn't modified, the backing store doesn't get written to, so the CU stays compressed. If the user modifies the data, the modified data can be automatically written back to disk into the sectors that were allocated for backing store of the memory mapped file. At *some* point, (in writing), NT will try to compress the data in the CU to check for space savings of a cluster or more. Anyway -- I suppose the actual linux implementation is left as an exercise for the user...? :-) -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Sat, 30 Aug 2008 12:28:54 -0700, Linda Walsh wrote:
On linux, I don't know of an implementation that does this as transparently as NT does with NTFS.
It might be transparent, but it costs heavily in CPU power and fragmentation. Philipp -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
----- Original Message ----- From: "Linda Walsh" <suse@tlinx.org> To: <opensuse@opensuse.org> Cc: "Randall R Schulz" <rschulz@sonic.net> Sent: Saturday, August 30, 2008 3:28 PM Subject: [opensuse] Re: Transparent content compression for space savings on linux like on NTFS?
Randall R Schulz wrote:
... I laughed when I read that ...
I'm pleased to have indebted you to me for the provision of laughter.
Sidenote: :-) -- there really isn't enough laughter in life these days... Ever noticed how much of our 'humor' involves putting someone or something else "down"? Certainly "clowns" exploit this easy source of getting laughs, but it's odd that a small percentage of what we find humorous doesn't involve someone or something else's discomfiture or mistake. But that's a philosophical issue for another place, perhaps. (* look at the silly linda getting all serious over philosophical roots of what we find humorous...*) ... (* ok, some are more easily amused than others...*) (* but being easily amused can be a good thing: you are more often amused? *) :-)
The real Question (missing feature in Linux?):
Windows (NT-based) does have transparent, on-the-fly compression that can be enabled on NTFS. The transparent compress/decompress works with with all apps. If one enables compression for a volume, NT will look for "opportunities" to save space on on fixed-block sizes that are 16 times the Cluster size up to a max "compression unit", "CU", of 64k. This implicitly makes 4k the largest cluster size that will still allow file compression to be enabled on NTFS.
NT requires that compression save at least 1 cluster, or it doesn't bother, but a file of all one's, for example, could be stored in about 1/16th the cluster space of a non-compressed file (a file of all 'zero's, can get better savings with "sparse files"). But this means each integral "CU" is checked for possible compression savings -- so data files might have some ranges compressed, but not others. The fact that NT implements compression in "CU"-sized chunks means there is very little hit in speed for random-access. Obviously, the speed hit, will "vary" by the ratio of CPU-power:disk speed...with a speed hit being more noticeable if the drive is a 15K RPM SAS(scsi)-based RAID compared to a slower IDE-based non-raid systems.
On linux, I don't know of an implementation that does this as transparently as NT does with NTFS. Since the clusters are marked 'compressed' in the file system, there likely has to be some flag available on a "per-CU" basis in the NTFS meta information. On a data-read of a compressed section, NTFS decompresses the contents of the CU AND allocates the full, uncompressed file-space needed by the "CU" as *backing store* for the data that's decompressed into the block buffer. If the data isn't modified, the backing store doesn't get written to, so the CU stays compressed. If the user modifies the data, the modified data can be automatically written back to disk into the sectors that were allocated for backing store of the memory mapped file. At *some* point, (in writing), NT will try to compress the data in the CU to check for space savings of a cluster or more.
Anyway -- I suppose the actual linux implementation is left as an exercise for the user...? :-)
I think the OP already knew about compressed filesystems. The question was not about compressed filesystems. It was about treating a zip file as a directory. As for laughter, I laughed yet again when I saw how he chose to react to my admitting I was wrong for laughinging. And I am indebted to him as he says, not for the laughter so much as for the research, since he was the one who came up with the fuse answer in the first place. Although I don't think I have much use for mounting an archive as a filesystem, it's interesting to know about none the less. Maybe it's slightly fewer keystrokes for working on initrd's which are now cpio files instead of ext2 filesystems. -- Brian K. White brian@aljex.com http://www.myspace.com/KEYofR +++++[>+++[>+++++>+++++++<<-]<-]>>+.>.+++++.+++++++.-.[>+<---]>++. filePro BBx Linux SCO FreeBSD #callahans Satriani Filk! -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Sunday 31 August 2008 18:22, Brian K. White wrote:
...
I think the OP already knew about compressed filesystems. The question was not about compressed filesystems. It was about treating a zip file as a directory.
Correct.
.... Although I don't think I have much use for mounting an archive as a filesystem, it's interesting to know about none the less. Maybe it's slightly fewer keystrokes for working on initrd's which are now cpio files instead of ext2 filesystems.
In my case, the need arose when I devised a set of scripts (additions to existing ones, actually) to facilitate large-scale experimentation within a very large space of options and search heuristics for a theorem-proving system. Prior to this, we'd alter the options or the search heuristic and run test after test. Sometimes we'd hit on a propitious combination and later not be able to recreate it. So I augmented the invocation scripts to maintain a log of compressed test results. Each run of the prover generally produces many files, including HTML renderings of the proofs discovered or, failing a successful attempt, the statistics describing the unsuccessful effort. With that scheme in place, I wanted a convenient way to access this history of our experiments. I started by trying to create some scripts that would help, but they proved cumbersome, so I asked about better-integrated, more transparent solutions, with reference to my recollection about a similar capability integrated via Windows Explorer. The "archivemount" command (relying as it does on the libarchive library and on FUSE) was nearly ideal. The only thing I could possibly wish for beyond what it provides is some kind of automatically triggered invocation (akin to NFS auto-mounting), but given the huge number of archives I have to deal with, that probably would entail its own set of complications and down-sides. E.g., knowing when to unmount an archive that is no longer in use. I have one experimental log which currently has 122 gzip-compressed TAR archives, and archivemount can simultaneously provide them all (not that I'd typically do that, but it was easy enough to try with a wild-card invocation). Each one requires a running instance of the archivemount program. One final gap is the following. Compare the (elided) output of "mount" with that of "df." ("am" is my cover script for invoking archivemount): % am log/latest.tar.gz % mount LABEL=Root10 on / type xfs (rw) ... /dev/sda1 on /repo type reiserfs (rw) /dev/sdb1 on /root93 type xfs (rw) /dev/sdd1 on /root91 type xfs (rw) /dev/sdd2 on /home type xfs (rw) /dev/sdd3 on /dar type xfs (rw) ... archivemount on /dar/tau/tst/New/log/latest type fuse (rw,nosuid,nodev,user=rschulz) % df Filesystem 1K-blocks Used Available Use% Mounted on LABEL=Root10 35895684 17805508 18090176 50% / /dev/sda1 293008588 106776492 186232096 37% /repo /dev/sdb1 20962560 11336984 9625576 55% /root93 /dev/sdd1 11962304 6421104 5541200 54% /root91 /dev/sdd2 11961344 8485132 3476212 71% /home /dev/sdd3 11961344 4456652 7504692 38% /dar df: `/dar/tau/tst/New/log/latest': Function not implemented I gather from this that archivemount does not implement a file-system switch function used by the "df" command.
-- Brian K. White
Randall Schulz -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
----- Original Message ----- From: "Randall R Schulz" <rschulz@sonic.net> To: <opensuse@opensuse.org> Sent: Sunday, August 31, 2008 10:23 PM Subject: Re: [opensuse] Re: Transparent content compression for space savings on linux like on NTFS?
On Sunday 31 August 2008 18:22, Brian K. White wrote:
Although I don't think I have much use for mounting an archive as a filesystem, it's interesting to know about none the less. Maybe it's slightly fewer keystrokes for working on initrd's which are now cpio files instead of ext2 filesystems.
In my case, the need arose when I devised a set of scripts (additions to existing ones, actually) to facilitate large-scale experimentation [...] So I augmented the invocation scripts to maintain a log of compressed test results. Each run of the prover generally produces many files,
Wow interesting. So, is there a special reason why you want these in individual archives instead of simply in directories? Sounds to me like a compressed filesystem is your better answer after all. I have something similar where I have a lot of different automated EDI transaction scripts spawned many times a day by cron or by apache or postfix, or by local users in my application. Sometimes a script will involve importing or exporting or a several step process of both, and sometimes the other side is a big company with not-so-great IT staff, and sometimes the transactions involve big consequences, and sometimes disputes arise where the other side claims we never sent them a file or that we sent them a file with bad data etc.. Or that they sent us a file with such & such data in it that we failed to react to... Of course sometimes it is us and sometimes it is them and sometimes it is a weakness in the procedure they specified we use, sometimes the program and scripts all worked perfectly but the customer put in bad data, and sometimes it is the simple fact that the internet isn't perfect. So over time by now I have most of these scripts maintaining logs that are comprised of the entire working directory and all work files for the transction. The script starts by creating a new unique directory and then doing all work within it, never deleting any temp or data import/export files, capturing stdout and stderr and sometimes other diagnostic info from each command into seperate files. And then just leaving the whole directory there when done. So when such disputes arise now, there is a lot more evidense to look at. I have a cron job the just runs a simple find command to delete all files/dirs older than X days, or sometimes I have the find command right in the script so that script maintains it's own history and tims off any old data every time the script runs. The total data set is lots of files but it's all organized into trees and dirs and it's no hassle to go look at any particular transaction, or all the transactions for a given time frame etc, and the total data size isn't straining the disk space. But the point of all this was, if I had more data, or wanted to keep it longer or forever such that I wanted to compress it all, and, if I really needed immediate convenient random access to all of it (not just the most recent X days/months worth) then I think I would still want this to be a compressed filesystem instead of individual archive files. If I ever wanted one or some logical grouping of them in archive form to mail to someone, that's easy enough to do in one command. About the only reason I can see for really wanting them to be maintaned in the form of archives is if you had say an internal web/ftp/samba share, and you needed to provide a simple browseable list for other people to grab an archive file instead of browseable access to the equivalent directories. (maybe some are using interfaces that don't allow them to download a group of files or a directory all at once easily) Another approach if you don't need immediate/convenient random access to old files, even if you don't want to delete them, is just leave the dirs on the regular filesystem and and have a find command that turns old dirs into tar.bz2's instead of deleting them. Thats still a simple command and is maybe a simpler system than having a seperate cmpressed filesystem. Then you could use fuse or just traditional unpacking or a front-end like kio to access the old ones since it would be uncommon enough not to matter much, and the ones you access more often are just plain files in plain dirs, no special access hoops to jump though and full normal filesystem functionality a-la the df hitch you discovered. -- Brian K. White brian@aljex.com http://www.myspace.com/KEYofR +++++[>+++[>+++++>+++++++<<-]<-]>>+.>.+++++.+++++++.-.[>+<---]>++. filePro BBx Linux SCO FreeBSD #callahans Satriani Filk! -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Sunday 31 August 2008 20:44, Brian K. White wrote:
...
So, is there a special reason why you want these in individual archives instead of simply in directories? Sounds to me like a compressed filesystem is your better answer after all.
There are number of periodic tasks on my system (daily system security checks, updatedb, backups every 6 hours, Google Desktop), that are fairly sensitive to the number of files, so I try not to proliferate things like this unnecessarily. Many of these files are small, so putting them in an archive saves space (internal file system fragmentation) independent of any compression in the archive file format. I often manually create similar archives when I want to send results to a colleague, so this way I just have them all and they're the primary repository, not something derivative. I'm wary of the overhead of transparent automatic compression if the granularity of control is coarse. (On windows, I'd do things like selectively compress my archive mailbox files but not those that were the "active" ones receiving new email from my many list subscriptions on an ongoing basis.)
...
Another approach if you don't need immediate/convenient random access to old files, even if you don't want to delete them, is just leave the dirs on the regular filesystem and and have a find command that turns old dirs into tar.bz2's instead of deleting them. Thats still a simple command and is maybe a simpler system than having a seperate cmpressed filesystem. Then you could use fuse or just traditional unpacking or a front-end like kio to access the old ones since it would be uncommon enough not to matter much, and the ones you access more often are just plain files in plain dirs, no special access hoops to jump though and full normal filesystem functionality a-la the df hitch you discovered.
That, or something like it (moving stuff off the fast but smaller work drive onto the bigger but slower archive drive, e.g.), may be necessary eventually, because as it stands, stuff is just going to pile up with this new pervasive recording scheme, though the script does have options to suppress it when the user deems that appropriate.
-- Brian K. White
Randall Schulz -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Sat, August 30, 2008 21:28, Linda Walsh wrote:
The real Question (missing feature in Linux?):
Windows (NT-based) does have transparent, on-the-fly compression that can be enabled on NTFS. The transparent compress/decompress works with with all apps. If one enables compression for a volume, NT will look for "opportunities" to save space on on fixed-block sizes that are 16 times the Cluster size up to a max "compression unit", "CU", of 64k. This implicitly makes 4k the largest cluster size that will still allow file compression to be enabled on NTFS.
NT requires that compression save at least 1 cluster, or it doesn't bother, but a file of all one's, for example, could be stored in about 1/16th the cluster space of a non-compressed file (a file of all 'zero's, can get better savings with "sparse files"). But this means each integral "CU" is checked for possible compression savings -- so data files might have some ranges compressed, but not others. The fact that NT implements compression in "CU"-sized chunks means there is very little hit in speed for random-access. Obviously, the speed hit, will "vary" by the ratio of CPU-power:disk speed...with a speed hit being more noticeable if the drive is a 15K RPM SAS(scsi)-based RAID compared to a slower IDE-based non-raid systems.
On linux, I don't know of an implementation that does this as transparently as NT does with NTFS. Since the clusters are marked 'compressed' in the file system, there likely has to be some flag available on a "per-CU" basis in the NTFS meta information. On a data-read of a compressed section, NTFS decompresses the contents of the CU AND allocates the full, uncompressed file-space needed by the "CU" as *backing store* for the data that's decompressed into the block buffer. If the data isn't modified, the backing store doesn't get written to, so the CU stays compressed. If the user modifies the data, the modified data can be automatically written back to disk into the sectors that were allocated for backing store of the memory mapped file. At *some* point, (in writing), NT will try to compress the data in the CU to check for space savings of a cluster or more.
Anyway -- I suppose the actual linux implementation is left as an exercise for the user...? :-)
You should take a look at ZFS which implements LZJB. From the Wikipedia article on ZFS: Variable block sizes ZFS uses variable-sized blocks of up to 128 kilobytes. The currently available code allows the administrator to tune the maximum block size used as certain workloads do not perform well with large blocks. Automatic tuning to match workload characteristics is contemplated.[citation needed] If data compression (LZJB) is enabled, variable block sizes are used. If a block can be compressed to fit into a smaller block size, the smaller size is used on the disk to use less storage and improve IO throughput (though at the cost of increased CPU use for the compression and decompression operations). ZFS is currently available in OpenSolaris, BSD and Mac OS X. Because of a license issue, ZFS cannot be implemented in the Linux kernel, but technically it would be a Simple Matter Of Programming. However there is a FUSE (yes, FUSE again) implementation of ZFS. -- Amedee -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
participants (10)
-
Amedee Van Gasse
-
Brian K. White
-
Felix Miata
-
James Knott
-
jdd sur free
-
John Andersen
-
Kai Ponte
-
Linda Walsh
-
Philipp Thomas
-
Randall R Schulz