Resizing an NTFS partition........
Alan McKinnon
alan at linuxholdings.co.za
Sat Apr 29 19:12:06 UTC 2006
On Saturday 29 April 2006 10:58, Chanchao wrote:
> .........just works. :-)
>
> I couldn't believe it.. For an operating system that doesn't allow
> you to save a simple file to an NTFS drive "because it's not open &
> free but patented by evil MS who doesn't release the
> specifications, boo hoo hoo hoo, so we can not be
> 100000000000000000000000% sure that it would work so we're not
> doing it at all, so there. snif.".
It's not like that at all and you are misrepresenting the reality.
NTFS is a horrendously complex file system and the
reverse-engineering effort has not uncovered all the complexities and
subtle interactions. In the absense of a simple engineering
specification document, the developers can never be sure they have
discovered everything that needs to be done. Therefore, in the
interests of saving YOUR data, the developers recommend you consider
NTFS read-only with minimal write abilities (i.e. no increase or
decrease in file length).
So next time you want to disparage the efforts of the ntfs driver
team, grant them the courtesy of not considering them a bunch of
crying children, OK?
You can read what Hans Reiser has to say about NTFS at
http://www.namesys.com if you want to know a little more
> Anyway, from that kind of system I was pleasantly surprised that it
> WOULD do a considerably more complex partition resizing operation
> without any fuss whatsoever.. :) And I know there were still files
> physically in the area that would be 'cut' so it must have moved
> those around first..
Resizing a file system is many times simpler than write access to the
file system it contains. When resizing a file system, all you really
need concern yourself with is the tree structure of the inodes. These
structures are well known and the underlying basis of binary and B+
trees are generally taught around Comp Sci 102.
The major problem with NTFS is not it's inodes, but it's journal -
data added to it gets out of sync with what's on the disk (for
reasons that I've never understood and can find no docs on either.
Maybe the NTFS driver developers have the same problem). This is why
NTFS corruption under Linux takes a while to show up.
When resizing a partition, it cannot be mounted, so the journal can be
thrown away and ignored. If any files are using inodes in the part of
the partition to be resized, they can be moved to other inodes - this
is not an especially hard problem (relatively speaking).
So it's not surprising that ntfs-resize was one of the first apps in
ntfs-utils that worked right.
--
If only you and dead people understand hex,
how many people understand hex?
Alan McKinnon
alan at linuxholdings dot co dot za
+27 82, double three seven, one nine three five
More information about the ubuntu-users
mailing list