Hi, On Sun, Feb 11, 2024 at 11:00:07AM +0100, Kamil Jońca wrote: > ID# ATTRIBUTE_NAME FLAGS VALUE WORST THRESH FAIL RAW_VALUE > 246 Total_LBAs_Written -O--CK 100 100 000 - 14380174325 > [...] > --8<---------------cut here---------------end--------------->8--- > > Do I unterstand correctly, that to have TB written I should take > "Total_LBAs_Written" > and divide it by 1024*1024*2 ?
In theory yes. The raw value of attribute 246 is supposed to be the number of LBAs written where an LBA is the logical sector size, in your case 512 bytes. However, I have a number of devices where 246 is not in units of 512 bytes. Aside from the usual 512b I have seen units of - 512,000 bytes - 1GiB (!) - 1MiB - 32MiB So your process is correct but you will want to check what units your drives actually increment in. If possible, write a known quantity to one of them and see how much it goes up by. The documentation for your drives may also let you know this, or let you know another SMART attribute you can use for this purpose. > 2nd question. > I have read about "trim/discard" operations in SSD context and I am not > sure how to setup these here. These days just don't do anything. There is a systemd timer called fstrim.timer on default Debian that activates periodically and does offline discard on every mounted filesystem, and this is probably the best way. You can instead put "discard" in the mount options of most filesystems and then they will do online discard as they go, but there is not usually any need to do this. Also LVM has a discard option. It is on by default and all this does is trigger a discard when you remove an LV. Again that is best left on by default. Thanks, Andy -- https://bitfolk.com/ -- No-nonsense VPS hosting