0

I have Ubuntu 13.10 and Windows 7 installed in dual boot on a single SSD. In addition they share an NTFS partition where I put all my data and documents. What is the optimal way to mount this NTFS partition in /etc/fstab (considering performance and minimizing wear of the SSD)?

Similar questions have been asked, but I could not find answers to this particular scenario.

As I understand it, the mount option 'discard' is not supported for NTFS and so should not be used (although it is recommended here).

Another often quoted mount option is 'noatime'. I use it for my ext4 partitions. Does it apply to NTFS?

My current /etc/fstab line is:

UUID=XXXXXXXXXXXXXXXX   /dos   ntfs   defaults,nls=utf8,uid=1000,gid=1000   0   0

1 Answer 1

1

noatime: set this option
To answer your second question first: noatime/relatime does work in NTFS according to this conversation.

discard: not avilable
According to this site there is no TRIM option on NTFS.

Moreover TRIM is in your scenario in my opinion not needed.

Let me explain: According to Wikipedia; A Trim command (commonly typeset as TRIM) allows an operating system to inform a solid-state drive (SSD) which blocks of data are no longer considered in use and can be wiped internally.

The only reason that trim is needed is to stop the SSD from moving already deleted (4k) blocks around. Something that is not bound to happen on a short term (unless disk is almost full with deleted and non-deleted files). Actually, performing a trim once a month on a regularly used SSD is probably often enough.

The need to use trim is much less often than you think.

No TRIM:
If you have a lot of big files (and very few small files) you might choose for a block size of 512kB (as big as one or several eraseblocks) therefore eliminating the need for trim altogether. As far as my knowledge about NTFS goes, NTFS can't be formatted with blocks larger than 64k but this should be practically sufficient in most cases.

mkntfs:
Command in Ubuntu that can format NTFS with a blocksize that you can specify. As far as I know Windows can't do this but reads and writes happily from/to it.

Formatting:
Important with SSD's is that the partition always begins on an erase block boundary. While normal read/write blocks are 4k, eraseblocks are often more like 128k 256k 512k. Rule of thumb is to leave a hole of 1MB counted from sector 0.

Possibly you knew this already, but it might make you choises easier. I wrote this especially with your usage scenario in mind.

5
  • Regarding 'noatime', thanks! That resolve the first part of my question.
    – ajdev8
    Nov 5, 2013 at 1:31
  • Regarding TRIM, however, I need it running online, or at least on a daily basis. So, I still need to know if it can be activated in /etc/fstab or not for NTFS, or what otherwise the best practice would be to run frequent trimming.
    – ajdev8
    Nov 5, 2013 at 1:36
  • 1
    According to this site: mjmwired.net/kernel/Documentation/filesystems/ntfs.txt there is no TRIM option on NTFS. And no, you don't need it on a daily basis. Monthly basis at the most, it is not your boot/system partition :-) Just put fstrim in a scriptfile in /etc/cron.monthly
    – thom
    Nov 5, 2013 at 1:48
  • 1
    FYI a good article about how TRIM works (except the defragmentation part which is untrue) blog.neutrino.es/2013/…
    – thom
    Nov 5, 2013 at 2:05
  • To be clear, for anybody else reading this, fstrim does not work on NTFS, see askubuntu.com/questions/372808/…, so trimming NTFS partitions seems to not be possible in Ubuntu.
    – ajdev8
    Nov 8, 2013 at 4:04

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .