You are not logged in.
Pages: 1
I have bought ssd to hold my multimedia files, which will be served, across the network, by minidlna. With the help of ChatGPT I have wrote this line in fstab for the ssd:
UUID=xxx /srv ext4 rw,noatime,nodiratime,data=ordered,barrier=1,discard,commit=60,suid,errors=remount-ro 0 2I don't have trust in ChatGPT, so I must ask is this line good for my ssd and the it's purpose?
Offline
Well, what do each of those options do?
Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD
Making lemonade from lemons since 2015.
Offline
Well, what do each of those options do?
rw=read/write,
noatime= do not update atime of the file, less write operation
nodiratime= same for dirs,
barrier = not so clear to me,
discard = not so clear to me,
commit=60 = update files on the disk in interval of 60 sec. Less frequent writes.
suid = allow suid to be set,
errors=remount-ro = what to be done in case of errors,
0 = I think this is for some old backup options and is not used today, but I am not sure.
2 = priority for fscheck
This is what I know.
Offline
I don't have trust in ChatGPT
Then stop using it.
https://wiki.archlinux.org/title/Fstab
https://wiki.archlinux.org/title/Solid_state_drive
Just use the "defaults" option, and only set other options if you actually need to.
Offline
barney wrote:I don't have trust in ChatGPT
Then stop using it.
I will stop using it.
Just use the "defaults" option, and only set other options if you actually need to.
I will read the Wiki, but as all beginners I have doubts about options.
For example, I know that noatime is good for the ssd, what is not clear to me is, if this option can brake some service. If it can, then I would be grateful if somebody would give example of such service and explain why it will fail.
Offline
Is this a 15 year old SSD? Or a bottom of the barrel, ready to fail SSD? If not, stop worrying about it, modern SSDs outlast HDDs.
Offline
I have bought ssd to hold my multimedia files, which will be served, across the network, by minidlna. With the help of ChatGPT I have wrote this line in fstab for the ssd:
UUID=xxx /srv ext4 rw,noatime,nodiratime,data=ordered,barrier=1,discard,commit=60,suid,errors=remount-ro 0 2I don't have trust in ChatGPT, so I must ask is this line good for my ssd and the it's purpose?
First of all, yes stop using ChatGPT. @stanczew has given good links for you to figure this out. ChatGTP is not good at this type of things. Rather go for Anthropic Claude.
Secondly what barney has written is pretty succinct. On top of that I would like you to reconsider adding suid as a parameter. If this SSD is only going to be serving multimedia files over the network and will not have any binary files then I would recommend that it should not be put. Rather I would recommend using nosuid instead. Putting suid is a very very very big security risk and should be done only if one knows the full consequence of doing so. I am not suggesting that you start putting nosuid on root or user or boot or var partitions. But for partitions there should be a use case on why suid is required.
noatime and nodiratime will prevent access time from being written. So if you would like to audit the system then this has to go. For performance this has to be kept in. If the entire SSD is going to serve only media files over the network then let it be in. Just be aware of the consequences.
For the option data=ordered this implies that the data is written to the disk first and then to the journal. This only has impact on journaling file systems like ext4. The consequence of using is that if there is a catastrophic data loss or power failure then the journal will not be able to help in recovering of data. The upside is that this is fast. Fast for writes. This does not impact read speeds that much. If the SSD if only going to server multimedia files then I am assuming that these files will not change much, i.e. there will be more reads than writes onto the SSD. In that case you can let it be. Just keep regular backup and/or image of the multimedia files.
For the option barrier=1 this enables write barriers. From the ext4 document link given above
(Enabling) Write barriers enforce proper on-disk ordering of journal commits, making volatile disk write caches safe to use, at some performance penalty.
Finally be aware of how the SSD is going to be used. You have a 15 year old SSD, not sure how long this will last and how much wear leveling it has undergone. If the SSD is going to have files read from it more than files written on to it then optimize it for reading and not writing. If the SSD is going to have files written more to it than files read from it, then optimize the SSD for writes. If the SSD is going to have read and write in equal measure then it has to be optimized for that.
Offline
I have removed the suid parameter, from the explanation you have give I can see that it is only security risk.
noatime and nodiratime will prevent access time from being written. So if you would like to audit the system then this has to go. For performance this has to be kept in. If the entire SSD is going to serve only media files over the network then let it be in. Just be aware of the consequences.
Here the term "audit the system" is not quite clear to me. Is this is the link to the Arch Wiki that explains it https://wiki.archlinux.org/title/Audit_framework?
For the option data=ordered this implies that the data is written to the disk first and then to the journal. This only has impact on journaling file systems like ext4. The consequence of using is that if there is a catastrophic data loss or power failure then the journal will not be able to help in recovering of data. The upside is that this is fast. Fast for writes. This does not impact read speeds that much. If the SSD if only going to server multimedia files then I am assuming that these files will not change much, i.e. there will be more reads than writes onto the SSD. In that case you can let it be. Just keep regular backup and/or image of the multimedia files.
This file system will be primary "read", so this parameter has gone from the option line.
For the option barrier=1 this enables write barriers. From the ext4 document link given above
(Enabling) Write barriers enforce proper on-disk ordering of journal commits, making volatile disk write caches safe to use, at some performance penalty.
This can be useful, because the writes on the disk will be rear.
Finally be aware of how the SSD is going to be used. You have a 15 year old SSD, not sure how long this will last and how much wear leveling it has undergone. If the SSD is going to have files read from it more than files written on to it then optimize it for reading and not writing. If the SSD is going to have files written more to it than files read from it, then optimize the SSD for writes. If the SSD is going to have read and write in equal measure then it has to be optimized for that.
The disk is new, so I have decided that only option in fstab line will be defaults,barrier=1
I am in the big change on Arch. I have been using old computer and have to watch on performance issues. I have been using Open Box under X, with some light weight applications. Now I have new computer and I have decided to use more modern WM: hyprland. Also some of previous applications have gone. Believe, Hyprland is not WM that can be learned in few days, also all the new applications have new keybindings. I have to remember a lot of new options, keybindings, new workflow. I have to read the man pages, wiki other online documentation and all that is confusing for me. I can handle all that, I am not that new in Linux, but it is time consuming. More problems are giving me new technical terms, like in case of the fstab options. I am grateful for the help. I must say that only reliable help is the "Arch Wiki" and This forum. There are also good things on Reddit, but there are, also, some bad things there.
Thanks again.
Offline
ArchEr9 wrote:noatime and nodiratime will prevent access time from being written. So if you would like to audit the system then this has to go. For performance this has to be kept in. If the entire SSD is going to serve only media files over the network then let it be in. Just be aware of the consequences.
Here the term "audit the system" is not quite clear to me. Is this is the link to the Arch Wiki that explains it https://wiki.archlinux.org/title/Audit_framework?
Audit over here refers to ability to see what has changed on the system, who/why it was changed and by whom. For example if there is a script somewhere in an obscure directory which starts to access these multimedia files then that should be a read flag. Or if a user or script or a program has used sudo/su or CAP_SYS_ADMIN capability to do some action, which you have not initiated then that is a flag going up. So to see which files have been accessed and by whom accesstime is required. noatime speeds up disk access times and also prevents unnecessary disk thrashing. So the owner of the partition has to balance it out. What is a priority, audit or speed.
And yes that link is pretty good.
I am in the big change on Arch. I have been using old computer and have to watch on performance issues. I have been using Open Box under X, with some light weight applications. Now I have new computer and I have decided to use more modern WM: hyprland. Also some of previous applications have gone. Believe, Hyprland is not WM that can be learned in few days, also all the new applications have new keybindings. I have to remember a lot of new options, keybindings, new workflow. I have to read the man pages, wiki other online documentation and all that is confusing for me. I can handle all that, I am not that new in Linux, but it is time consuming. More problems are giving me new technical terms, like in case of the fstab options. I am grateful for the help. I must say that only reliable help is the "Arch Wiki" and This forum. There are also good things on Reddit, but there are, also, some bad things there.
Thanks again.
Yeah Reddit has lots of information. But with Reddit we have to follow the russian proverb, Trust but verify. Confirm what you get from Reddit. That info might be old, or not relevant or not applicable or worse misleading. Not calling Reddit bad or crap. Respect people who contribute on Reddit.
Offline
Pages: 1