[Ocfs-users] Re: About compression of files on OCFS

Bryce philip.copeland at oracle.com
Mon Aug 1 05:46:25 CDT 2005


umm provisionally,.. yes

you could do something like
  dd --o_direct=65536,0 if=big_file of=/dev/stdout | gzip -cd - | dd 
--o_direct=0, 65536 of= compressed_file
(havn't a box to hand that I can quickly verify that with though)

Basically read your file using o_direct methods, but spew the results as 
a *stream* (note the "xxx,0") to /dev/stdout which gzip can read happily 
since it cannot operate in a block manner. This is turn is squirted to 
standard output as a stream to another dd process which can accept the 
input as a stream (note the "0,xxx" reversal) and be written out as an 
o_direct file. The last block of data will be written out padded with 
zeros and is then truncated to the correct file size. HOWEVER be aware 
that the resulting file will very likely NOT be block aligned and you 
will have to use a non o_direct method to operate on it again eg for 
moving to a differing volume.



Herbert wrote:

>
> Since dd can use o_direct, would it be possible to pipe the compressed 
> output into dd which then writes it to an OCFS file with o_direct?
>
> Thanks,
> Herbert.
>
> Sunil Mushran wrote:
>
>> Again, it's not the act of compression but rather the mode of r/w.
>> If one writes a compress tool which is o_direct, then I see no issue.
>>
>> Kenichiro Ochi wrote:
>>
>>> Sunil
>>> Thank you for your prompt reply.
>>> I really appreciate it.
>>>
>>> Please let me know if you know.
>>> Do you know the documentation which shows as follwing.
>>> - It is not supported that archive logfiles on OCFS are compressed.
>>>
>>> Thank you in advance.
>>>
>>> Thanks.
>>> Kenichiro
>>>
>>>
>>> On Thu, 28 Jul 2005 12:05:16 -0700
>>> Sunil Mushran <Sunil.Mushran at oracle.com> wrote:
>>>
>>>  
>>>
>>>> The issue is not the type of files, rather the mode the files are r/w.
>>>> OCFS (Release 1) is supported only for o_direct operations.
>>>> gzip, etc. do bufferred reads and hence is an issue.
>>>>
>>>> Kenichiro Ochi wrote:
>>>>
>>>>  
>>>>
>>>>> Hi, Experts.
>>>>> I'm Kenichiro Ochi, the support engineer of Oracle Japan.
>>>>>
>>>>> I would like to ask you the following questions about supported 
>>>>> files on OCFS.
>>>>> I know OCFS VER 1.X only supports Oracle datafiles (including 
>>>>> archive logfiles).
>>>>>
>>>>> My customer has one question.
>>>>>
>>>>> - Is it supported that archive logfiles on OCFS are compressed 
>>>>>  (using compress, gzip command etc) ?
>>>>>  In other words, is it allowed that there are compressed files(.Z, 
>>>>> .zip etc) on OCFS ?
>>>>>
>>>>> I would appreciate it if I could receive feedback on it at your 
>>>>> earliest convenience.
>>>>>
>>>>> Since I'm not in the mailing list, please reply directly back to me.
>>>>> Thank you in advance.
>>>>>
>>>>> Thanks
>>>>> Kenichiro
>>>>>
>>>>>
>




More information about the Ocfs-users mailing list