LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   ntfs-3g defrag? (https://www.linuxquestions.org/questions/linux-newbie-8/ntfs-3g-defrag-928373/)

arashi256 02-08-2012 03:39 PM

ntfs-3g defrag?
 
Is there any way to defrag NTFS drive partitions mounted as ntfs-3g? I assume fragmentation still happens to NTFS formatted drives under Linux.

Doc CPU 02-08-2012 04:35 PM

Hi there,

Quote:

Originally Posted by arashi256 (Post 4597452)
Is there any way to defrag NTFS drive partitions mounted as ntfs-3g?

no, AFAIK not. And that's not a matter of the ntfs-3g driver, as defragmentation is also just reading and writing sectors. But I don't know any Linux tool that would do the job of working out which sectors to read and where to write them.

Quote:

Originally Posted by arashi256 (Post 4597452)
I assume fragmentation still happens to NTFS formatted drives under Linux.

You bet. It also does on NTFS partitions under native Windows, and massively so. And fragmentation degrades performance noticeably.
But I wouldn't care too much about that. Using NTFS formatted volumes in Linux is usually just a stopgap solution, so you'd better defrag them while they're connected to a Windows host. And do it frequently, at least every other week on regularly used drives.

[X] Doc CPU

arashi256 02-08-2012 04:46 PM

Thank you for your reply. Well, that's rather depressing news frankly. Is it technically not possible or does Windows have some kind of secret sauce to handle NTFS?

rkelsen 02-08-2012 05:46 PM

Quote:

Originally Posted by arashi256 (Post 4597500)
Is it technically not possible or does Windows have some kind of secret sauce to handle NTFS?

Yes. NTFS is proprietary, and Microsoft ain't sharing the recipe.

Doc CPU 02-09-2012 04:43 AM

Hi there,

Quote:

Originally Posted by rkelsen (Post 4597537)
NTFS is proprietary, and Microsoft ain't sharing the recipe.

exactly, and the guys who created ntfs-3g did an excellent job here, because they hadn't any specification to adhere to.
All they found out is based on tedious debugging and reverse engineering, and probably lots of try & error. We should be awestruck at how fine it works.

Isn't there another NTFS driver implementation for Linux that runs the native Windows driver in a virtualized environment "just like that", the same way as they do with the NDIS wrapper for Windows WLAN drivers? - Well, it wouldn't make a difference for the OP's question, though.

[X] Doc CPU

sag47 02-09-2012 08:07 AM

Quote:

Originally Posted by rkelsen (Post 4597537)
Yes. NTFS is proprietary, and Microsoft ain't sharing the recipe.

I second the notion that this is correct. Most of the proprietary defragging tools use a Microsoft API to automatically defrag. Then it is handled by the operating system. Here's some articles related to that.

http://www.mydefrag.com/forum/index.php?topic=1517.0
http://www.mydefrag.com/FAQDownloadA...Available.html


All times are GMT -5. The time now is 04:48 PM.