Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
06-11-2015, 02:29 PM
|
#1
|
LQ Newbie
Registered: Jan 2014
Distribution: Mint
Posts: 22
Rep:
|
Upgrading ntfs-3g for TRIM support without changing system?
I have some new SSDs with data on them formatted as NTFS (they are multi-purpose), and would like to TRIM in Linux to improve their lifespan and performance (they are also accessed from Windows XP which doesn't support TRIM). ntfs-3g added support for FSTRIM ioctl in 2015.3.14 (March 31, 2015).
I am using Linux Mint 17.1 and obviously it doesn't support TRIM on its native ntfs-3g, my question is if there is a way to update the new ntfs-3g without affecting my system or making system-wide changes. I don't want to recompile/rebuild kernel or any other system-wide change, just to issue fstrim once in a while and have it work, do I have to make system changes at all?
Basically I'd rather not take the risk of screwing up my system (I rely on other NTFS mount points right now that are crucial), I'd rather live without TRIM than that, however if there's an easy way to have the new ntfs-3g live alongside the other just for TRIM (I have no qualms with the native ntfs-3g I currently have other than lack of TRIM), I'd feel stupid without asking.
(yes, I can unmount the native ntfs-3g on the specific SSD and mount it with new ntfs-3g, if that was a concern, then trim it, and mount it back to native etc; I really don't mind as long as it makes it possible to not affect my native ntfs-3g built in kernel -- safety is my primary concern right now).
Thanks for help in advance.
Last edited by kktsuri; 06-11-2015 at 02:30 PM.
|
|
|
06-11-2015, 07:55 PM
|
#2
|
LQ Veteran
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,253
|
I would have to say any potential benefit isn't worth the grief.
Usually you would just add a ppa from a dev that has something available, but even that is the 2014.2.1 code.
FWIW Fedora 22 has the code you mentioned, so with luck the Ubuntu/Mint devs will get something out soon-ish. Mint tends to be a little behind the curve on package releases.
|
|
|
06-12-2015, 04:08 AM
|
#3
|
Moderator
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
|
Quote:
Originally Posted by kktsuri
I really don't mind as long as it makes it possible to not affect my native ntfs-3g built in kernel
|
Just to clarify that, ntfs-3g is not a kernel module nor is it inbuilt into the kernel, it isn't part of the kernel at all. If you want to use a newer version than your distro provides the proper way is to replace the distro delivered package with a newer on, a method called backporting. Here is info on how that is done on Debian based distros: https://wiki.debian.org/SimpleBackportCreation
|
|
1 members found this post helpful.
|
06-12-2015, 09:25 AM
|
#4
|
LQ Newbie
Registered: Jan 2014
Distribution: Mint
Posts: 22
Original Poster
Rep:
|
Oh I had no idea, always thought it's integrated in the kernel.
I could even try compile it (although not knowledgeable there), but if it's not part of kernel then, can I just extract the .deb packages manually with dpkg? If they won't run from other locations I can just backup all the files I replace, replace them with new versions, and they'll work? No need to do any kernel integration or anything?
Thanks again.
|
|
|
06-12-2015, 09:48 AM
|
#5
|
Moderator
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
|
Quote:
Originally Posted by kktsuri
I could even try compile it (although not knowledgeable there), but if it's not part of kernel then, can I just extract the .deb packages manually with dpkg? If they won't run from other locations I can just backup all the files I replace, replace them with new versions, and they'll work?
|
Yes, you could do that, but it is not recommended to do it that way, backporting, as per the link above, is.
Quote:
No need to do any kernel integration or anything?
|
No.
|
|
1 members found this post helpful.
|
06-12-2015, 10:48 AM
|
#6
|
LQ Newbie
Registered: Jan 2014
Distribution: Mint
Posts: 22
Original Poster
Rep:
|
I will take a look at backporting then and see if I can get hand on it.
|
|
|
06-12-2015, 11:11 AM
|
#7
|
Senior Member
Registered: Mar 2005
Location: Earth bound to Helios
Distribution: Custom
Posts: 2,524
|
You can build and install the ntfs-3g from source in a custom directory and use that binary for mounting.
|
|
1 members found this post helpful.
|
06-12-2015, 11:27 AM
|
#8
|
LQ Newbie
Registered: Jan 2014
Distribution: Mint
Posts: 22
Original Poster
Rep:
|
Well, I couldn't find an updated .deb package or PPA, so I went with compiling. It was easier than I thought, I guess because it requires almost no development dependencies (only the basics, which I already have via build-essentials)
It works, thanks alot guys.
I forgot to mention how I solved it with your help. In case anyone else needs it. I just used the --prefix=/tmp/ntfs-3g and --exec-prefix=/tmp/ntfs-3g when using configure, like:
cd to source directory
Code:
./configure --prefix=/tmp/ntfs-3g --exec-prefix=/tmp/ntfs-3g
make
make install
This installed them in /tmp/ntfs-3g. Running /tmp/ntfs-3g/bin/ntfs-3g didn't work as it didn't find the library, so I made a script to run this ntfs-3g for mounting for trim only:
Code:
#!/bin/sh
LD_LIBRARY_PATH=/tmp/ntfs-3g/lib:$LD_LIBRARY_PATH /tmp/ntfs-3g/bin/ntfs-3g "$@"
Of course replace the /tmp/ntfs-3g with where you install it (this is just for demonstration) since my tmp is tmpfs so it won't be wise to keep it there.
I like how I can install libraries anywhere and just point them with LD_LIBRARY_PATH, to keep it from the system
Last edited by kktsuri; 06-12-2015 at 12:34 PM.
|
|
|
All times are GMT -5. The time now is 06:47 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|