|
Steven Hanley
About
email: sjh@svana.org
web: http://svana.org/sjh
Other online diaries:
Aaron Broughton,
Alison Russell,
Allan Bontjer,
Andrew Pollock,
Anthony Towns,
Chris Yeoh,
Jeremy Kerr,
Martijn van Oosterhout,
Michael Carden,
Michael Davies,
Michael Still,
Rusty Russell,
Tim Potter,
Tony Breeds,
Links:
Linux Weekly News,
XKCD,
Userfriendly,
Questionable Content,
Planet Linux Australia,
Bilbys,
CORC,
Canberra Weather:
forecast,
radar.
Subscribe: rss,
rss2.0,
atom
planet sjh
(online feed aggrgator for all the diaries I read regularly)
Categories:
Archive by month:
|
Thu, 25 Sep 2008
Doing it backwards or unlink returning ENOSPC - 16:28
So this is not directly Linux related, however it is kind of
entertaining/strange. I have been mucking about with Solaris Logical Domains a
bit this week at work, as part of this I was reading up on how ZFS works. This
may well apply with LVM snap shots in Linux now also. However when reading
about out of space behaviour on ZFS with snapshots I was somewhat entertained
to see one specific point.
Due to the way snapshots work on ZFS there is a possibility you will get an
ENOSPC returned when trying to unlink (rm) a file. This is of course
completely reversed from the intuition most people will have, to free up space
remove some files. Out of curiosity I looked in the unlink man page on Linux
and in the rm source code on Linux, at a cursory glance neither of them will
deal with ENOSPC (unlink does not mention it as an error).
Without testing my guess is that in such a case unlink (2) would return EIO.
[/comp]
link
|