> -----Original Message-----
> From: [email protected] [mailto:openafs-info-
> [email protected]] On Behalf Of Jeffrey Altman
> Sent: Sunday, October 27, 2013 3:42 AM
> To: [email protected]
> Subject: Re: [OpenAFS] not enough space in target directory
> 
> On 10/22/2013 12:18 PM, Dyer, Rodney wrote:
> >
> > (Note: In my history as a programmer, we would just open the file for
> 'write' and keep writing until we run out of space with a 'out of space' error
> occurs from the 'C' calls.  I think the error was ENOSPC, 'No space left on
> device'. )
> 
> I have just explained the problem with this approach.

We have a problem then, as there is no way that I know of to check what space 
is left on the device first, then begin writing with a lock on the free space 
you want.  Between the time that you've checked the free space, and you begin 
writing, you may have lost the space to another user.  To solve this problem 
you would need to try and allocate all the space needed first, then write into 
it.
 
> 
> > If you don't care about losing data, one solution is to 'symlink' the cell 
> > into
> the C: drive, as follows...
> >
> >      C:\>mklink /d c:\afs \\afs\root.afs
> >
> >      A DIR of c:\ will then return what is available on your C: drive.
> 
> Which is great until the free space on the C: drive drops to nothing
> because of shadow volume snapshots, pagefile increases, or other
> reasons.   Current free space on my C: disk.
> 
>          618,112 bytes free
>               99.9 % in use
> 
> It was 5GB free about 12 hours ago.  During disk backups the volume
> checkpoint and NTFS journal uses up all of the free space.
> 
> All you are doing is trading one problem for another.

That was not really the point.  This was simply an alternative to someone 
wanting to deliberately live life in the edge (with possible failure).
You could always use a spare drive, or partition where you never wrote files in 
to symlink AFS.

> > This is a VERY annoying problem.
> 
> Yes it is and the correct way to get it fixed is to file bug reports
> with the application vendors.  Asking the AFS redirector to break the
> rules only makes matters worse.

So you must be saying this problem is also prevalent with other file systems 
such as those that represent themselves as CIFS like NetApp, and even 
Microsoft's own DFS?

> 
> > I wish AFS would prevent you from writing more into a volume than the
> quota size that you were allocated.  In that case returning ENOSPC, 'No space
> left on device' should be applicable.
> 
> The AFS file server does prevent you from writing more into a volume
> than the quota size and the AFS redirector queries the file server after
> each 1MB of data is written on a given file to update its estimates.
> But the AFS redirector cannot return an error on a WriteFile() request
> it has not yet been asked to perform.
> 
> Whether or not the AFS redirector returns out of space errors is
> irrelevant.  The applications that have issues are having issues because
> they are attempting to work around issues with other file systems by
> querying the free space or the volume attributes and are doing so
> incorrectly.

That's certainly a huge list of vendors, and programmers everywhere.  I don't 
know any graduates who get trained in such obscure file system level 
information.

Rodney

Reply via email to