Hi

Is there any way to create a file that is guaranteed to be contiguous (i.e.
not fragmented)?

Regards
Andrew

Re: How to force a file to be allocated in contiguous clusters by Don

Don
Mon Oct 15 16:06:04 PDT 2007

No there is not. You can use the defrag IOCTL's to manipulate the file
after the fact but that is all.


--
Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr
Remove StopSpam to reply


"Andrew Sha" <AndrewSha@discussions.microsoft.com> wrote in message
news:3C5813D5-5E28-437F-8F4F-2893A3F9A2DC@microsoft.com...
> Hi
>
> Is there any way to create a file that is guaranteed to be contiguous
> (i.e.
> not fragmented)?
>
> Regards
> Andrew
>



Re: How to force a file to be allocated in contiguous clusters by AndrewSha

AndrewSha
Mon Oct 15 16:29:02 PDT 2007

Thank you Don

That is what I thought


"Don Burn" wrote:

> No there is not. You can use the defrag IOCTL's to manipulate the file
> after the fact but that is all.
>
>
> --
> Don Burn (MVP, Windows DDK)
> Windows 2k/XP/2k3 Filesystem and Driver Consulting
> Website: http://www.windrvr.com
> Blog: http://msmvps.com/blogs/WinDrvr
> Remove StopSpam to reply
>
>
> "Andrew Sha" <AndrewSha@discussions.microsoft.com> wrote in message
> news:3C5813D5-5E28-437F-8F4F-2893A3F9A2DC@microsoft.com...
> > Hi
> >
> > Is there any way to create a file that is guaranteed to be contiguous
> > (i.e.
> > not fragmented)?
> >
> > Regards
> > Andrew
> >
>
>
>

Re: How to force a file to be allocated in contiguous clusters by Norman

Norman
Mon Oct 15 17:00:14 PDT 2007

If you boot the right version of Windows 98 and run the command OFORMAT then
you can format a FAT32 partition with one particular file consisting of
contiguous clusters (not fragmented) with a specified size. The purpose of
doing so is that the partition can later be converted to NTFS and have some
contiguous space available. Nonetheless notice that this feature is
available in Windows 98. I wonder what makes it so hard to do in the NT
series.


"Andrew Sha" <AndrewSha@discussions.microsoft.com> wrote in message
news:571E4137-A24A-478D-AC05-769D5309A591@microsoft.com...
> Thank you Don
>
> That is what I thought
>
>
> "Don Burn" wrote:
>
>> No there is not. You can use the defrag IOCTL's to manipulate the file
>> after the fact but that is all.
>>
>>
>> --
>> Don Burn (MVP, Windows DDK)
>> Windows 2k/XP/2k3 Filesystem and Driver Consulting
>> Website: http://www.windrvr.com
>> Blog: http://msmvps.com/blogs/WinDrvr
>> Remove StopSpam to reply
>>
>>
>> "Andrew Sha" <AndrewSha@discussions.microsoft.com> wrote in message
>> news:3C5813D5-5E28-437F-8F4F-2893A3F9A2DC@microsoft.com...
>> > Hi
>> >
>> > Is there any way to create a file that is guaranteed to be contiguous
>> > (i.e.
>> > not fragmented)?
>> >
>> > Regards
>> > Andrew
>> >
>>
>>
>>


Re: How to force a file to be allocated in contiguous clusters by Tim

Tim
Mon Oct 15 21:17:48 PDT 2007

"Norman Diamond" <ndiamond@community.nospam> wrote:
>
>If you boot the right version of Windows 98 and run the command OFORMAT then
>you can format a FAT32 partition with one particular file consisting of
>contiguous clusters (not fragmented) with a specified size. The purpose of
>doing so is that the partition can later be converted to NTFS and have some
>contiguous space available. Nonetheless notice that this feature is
>available in Windows 98. I wonder what makes it so hard to do in the NT
>series.

Nothing. On a freshly formatted NTFS disk, all of your files will consist
of contiguous sectors. It just doesn't stay that way for long.
--
Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc.

Re: How to force a file to be allocated in contiguous clusters by Jeff

Jeff
Tue Oct 16 05:35:03 PDT 2007

Having de-fragged the file, is there a way to mark the file so that it can't
be re-fragmented? IIRC, one of the after market defraggers shows some files
as "unmovable" and thus won't touch them.

If so, and if the file's length won't change over time, this may suit the
OP's needs.

"Don Burn" <burn@stopspam.windrvr.com> wrote in message
news:eDEnv$3DIHA.4752@TK2MSFTNGP04.phx.gbl...
> No there is not. You can use the defrag IOCTL's to manipulate the file
> after the fact but that is all.
>
>
> --
> Don Burn (MVP, Windows DDK)
> Windows 2k/XP/2k3 Filesystem and Driver Consulting
> Website: http://www.windrvr.com
> Blog: http://msmvps.com/blogs/WinDrvr
> Remove StopSpam to reply
>
>
> "Andrew Sha" <AndrewSha@discussions.microsoft.com> wrote in message
> news:3C5813D5-5E28-437F-8F4F-2893A3F9A2DC@microsoft.com...
>> Hi
>>
>> Is there any way to create a file that is guaranteed to be contiguous
>> (i.e.
>> not fragmented)?
>>
>> Regards
>> Andrew
>>
>
>



How to force a file to be allocated in contiguous clusters by J

J
Tue Oct 16 09:16:01 PDT 2007

JH> Having de-fragged the file, is there a way to mark the file
JH> so that it can't be re-fragmented?

Think. Ask yourself what operations upon a file, in what
circumstances, cause it to become fragmented when it initially isn't.

JH> If so, and if the file's length won't change over time,
JH> this may suit the OP's needs.

We have no idea what those needs are. Xe didn't tell us. Xe
described the step, not the goal. For all that we know, this is a
chocolate-covered banana.

<URL:http://catb.org./~esr/faqs/smart-questions.html#goal>
<URL:http://perl.plover.com./Questions3.html>


Re: How to force a file to be allocated in contiguous clusters by David

David
Tue Oct 16 09:21:34 PDT 2007

Don't write to the file and it won't become fragmented again.

"Jeff Henkels" <jeff@mapson.jeffhenkels.com> wrote in message
news:Of9i9D$DIHA.3916@TK2MSFTNGP02.phx.gbl...
> Having de-fragged the file, is there a way to mark the file so that it
> can't be re-fragmented? IIRC, one of the after market defraggers shows
> some files as "unmovable" and thus won't touch them.
>
> If so, and if the file's length won't change over time, this may suit the
> OP's needs.
>
> "Don Burn" <burn@stopspam.windrvr.com> wrote in message
> news:eDEnv$3DIHA.4752@TK2MSFTNGP04.phx.gbl...
>> No there is not. You can use the defrag IOCTL's to manipulate the file
>> after the fact but that is all.
>>
>>
>> --
>> Don Burn (MVP, Windows DDK)
>> Windows 2k/XP/2k3 Filesystem and Driver Consulting
>> Website: http://www.windrvr.com
>> Blog: http://msmvps.com/blogs/WinDrvr
>> Remove StopSpam to reply
>>
>>
>> "Andrew Sha" <AndrewSha@discussions.microsoft.com> wrote in message
>> news:3C5813D5-5E28-437F-8F4F-2893A3F9A2DC@microsoft.com...
>>> Hi
>>>
>>> Is there any way to create a file that is guaranteed to be contiguous
>>> (i.e.
>>> not fragmented)?
>>>
>>> Regards
>>> Andrew
>>>
>>
>>
>
>



Re: How to force a file to be allocated in contiguous clusters by Gary

Gary
Thu Oct 18 10:41:52 PDT 2007

This is from a few years bck so pardon the memory ... I think if you mark
the file as SYS tyhe defragmenter will not touch it; e.g.
"attrib yourfile.ext +s +r +h"

that, however, may be faulty menory.

--
The personal opinion of
Gary G. Little

"Jeff Henkels" <jeff@mapson.jeffhenkels.com> wrote in message
news:Of9i9D$DIHA.3916@TK2MSFTNGP02.phx.gbl...
> Having de-fragged the file, is there a way to mark the file so that it
> can't be re-fragmented? IIRC, one of the after market defraggers shows
> some files as "unmovable" and thus won't touch them.
>
> If so, and if the file's length won't change over time, this may suit the
> OP's needs.
>
> "Don Burn" <burn@stopspam.windrvr.com> wrote in message
> news:eDEnv$3DIHA.4752@TK2MSFTNGP04.phx.gbl...
>> No there is not. You can use the defrag IOCTL's to manipulate the file
>> after the fact but that is all.
>>
>>
>> --
>> Don Burn (MVP, Windows DDK)
>> Windows 2k/XP/2k3 Filesystem and Driver Consulting
>> Website: http://www.windrvr.com
>> Blog: http://msmvps.com/blogs/WinDrvr
>> Remove StopSpam to reply
>>
>>
>> "Andrew Sha" <AndrewSha@discussions.microsoft.com> wrote in message
>> news:3C5813D5-5E28-437F-8F4F-2893A3F9A2DC@microsoft.com...
>>> Hi
>>>
>>> Is there any way to create a file that is guaranteed to be contiguous
>>> (i.e.
>>> not fragmented)?
>>>
>>> Regards
>>> Andrew
>>>
>>
>>
>
>



Re: How to force a file to be allocated in contiguous clusters by Norman

Norman
Fri Oct 19 01:23:26 PDT 2007

But how do you obtain a contiguous allocation to begin with? If the file
starts out fragmented then nothing is accomplished by keeping it that way.


"Gary G. Little" <gary.g.little@seagate.com> wrote in message
news:47179721$0$7558$88260bb3@news.teranews.com...
> This is from a few years bck so pardon the memory ... I think if you mark
> the file as SYS tyhe defragmenter will not touch it; e.g.
> "attrib yourfile.ext +s +r +h"
>
> that, however, may be faulty menory.
>
> --
> The personal opinion of
> Gary G. Little
>
> "Jeff Henkels" <jeff@mapson.jeffhenkels.com> wrote in message
> news:Of9i9D$DIHA.3916@TK2MSFTNGP02.phx.gbl...
>> Having de-fragged the file, is there a way to mark the file so that it
>> can't be re-fragmented? IIRC, one of the after market defraggers shows
>> some files as "unmovable" and thus won't touch them.
>>
>> If so, and if the file's length won't change over time, this may suit the
>> OP's needs.
>>
>> "Don Burn" <burn@stopspam.windrvr.com> wrote in message
>> news:eDEnv$3DIHA.4752@TK2MSFTNGP04.phx.gbl...
>>> No there is not. You can use the defrag IOCTL's to manipulate the file
>>> after the fact but that is all.
>>>
>>>
>>> --
>>> Don Burn (MVP, Windows DDK)
>>> Windows 2k/XP/2k3 Filesystem and Driver Consulting
>>> Website: http://www.windrvr.com
>>> Blog: http://msmvps.com/blogs/WinDrvr
>>> Remove StopSpam to reply
>>>
>>>
>>> "Andrew Sha" <AndrewSha@discussions.microsoft.com> wrote in message
>>> news:3C5813D5-5E28-437F-8F4F-2893A3F9A2DC@microsoft.com...
>>>> Hi
>>>>
>>>> Is there any way to create a file that is guaranteed to be contiguous
>>>> (i.e.
>>>> not fragmented)?
>>>>
>>>> Regards
>>>> Andrew
>>>>
>>>
>>>
>>
>>
>
>


Re: How to force a file to be allocated in contiguous clusters by Gary

Gary
Mon Oct 22 07:14:56 PDT 2007

That's the rub ... you first have to allocate the contiguous chunk of LBAs,
most likely after a fresh format, or a defrag of the disk. You could write a
sniffer that could run the free chain looking for free, contiguous LBAs,
hopefully finding one that was of sufficient size. Or write the file, defrag
the disk, check the file for fragmenttation then lock it down. A contiguosly
sized file is of doubtful benefist since nearly all filles require updating
over a period of time which means you go through the sniff and hunt, defrag
process again.

You might try allocating a small partition for it, say 10% of the total gig
at the end of the disk, giving you a limited period of growth during which
you would not have to worry about fragmentation.

--
The personal opinion of
Gary G. Little

"Norman Diamond" <ndiamond@community.nospam> wrote in message
news:OKulWliEIHA.1208@TK2MSFTNGP05.phx.gbl...
> But how do you obtain a contiguous allocation to begin with? If the file
> starts out fragmented then nothing is accomplished by keeping it that way.
>
>
> "Gary G. Little" <gary.g.little@seagate.com> wrote in message
> news:47179721$0$7558$88260bb3@news.teranews.com...
>> This is from a few years bck so pardon the memory ... I think if you mark
>> the file as SYS tyhe defragmenter will not touch it; e.g.
>> "attrib yourfile.ext +s +r +h"
>>
>> that, however, may be faulty menory.
>>
>> --
>> The personal opinion of
>> Gary G. Little
>>
>> "Jeff Henkels" <jeff@mapson.jeffhenkels.com> wrote in message
>> news:Of9i9D$DIHA.3916@TK2MSFTNGP02.phx.gbl...
>>> Having de-fragged the file, is there a way to mark the file so that it
>>> can't be re-fragmented? IIRC, one of the after market defraggers shows
>>> some files as "unmovable" and thus won't touch them.
>>>
>>> If so, and if the file's length won't change over time, this may suit
>>> the OP's needs.
>>>
>>> "Don Burn" <burn@stopspam.windrvr.com> wrote in message
>>> news:eDEnv$3DIHA.4752@TK2MSFTNGP04.phx.gbl...
>>>> No there is not. You can use the defrag IOCTL's to manipulate the file
>>>> after the fact but that is all.
>>>>
>>>>
>>>> --
>>>> Don Burn (MVP, Windows DDK)
>>>> Windows 2k/XP/2k3 Filesystem and Driver Consulting
>>>> Website: http://www.windrvr.com
>>>> Blog: http://msmvps.com/blogs/WinDrvr
>>>> Remove StopSpam to reply
>>>>
>>>>
>>>> "Andrew Sha" <AndrewSha@discussions.microsoft.com> wrote in message
>>>> news:3C5813D5-5E28-437F-8F4F-2893A3F9A2DC@microsoft.com...
>>>>> Hi
>>>>>
>>>>> Is there any way to create a file that is guaranteed to be contiguous
>>>>> (i.e.
>>>>> not fragmented)?
>>>>>
>>>>> Regards
>>>>> Andrew
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>