mgutt Posted August 5, 2022 Share Posted August 5, 2022 The bash command history will be lost after a reboot. Instead I like to see a symlink to the usb flash drive to have a persistent history. Workaround in my Go-File until this is not realized: # ------------------------------------------------- # Persistent bash history # ------------------------------------------------- if [[ ! -L ~/.bash_history ]]; then rm ~/.bash_history ln -s /boot/config/ssh/.bash_history ~/.bash_history fi 2 1 Quote Link to comment
vakilando Posted August 5, 2022 Share Posted August 5, 2022 +1 Seems very usefull to me! Thank you mgutt for the workaround! Quote Link to comment
MAM59 Posted August 6, 2022 Share Posted August 6, 2022 although working, I think it is a bad idea. Using a path to the flash ends up into continous writes to the flash drive setting it to a higher risk of failure. Use a path to the cache drive or something instead. Quote Link to comment
mgutt Posted August 6, 2022 Author Share Posted August 6, 2022 36 minutes ago, MAM59 said: Using a path to the flash ends up into continous writes to the flash drive setting it to a higher risk of failure. My bash history file has a size of 3 kB after 3 month. It's impossible to kill a flash drive by that. Quote Link to comment
MAM59 Posted August 6, 2022 Share Posted August 6, 2022 it does not matter how big it is, just how often it is written does the trick. Quote Link to comment
mgutt Posted August 6, 2022 Author Share Posted August 6, 2022 Which is still a tiny amount. PS it would be even possible to import/export the file on specific events like array start/stop, but I don't think it's worth the effort. Quote Link to comment
SimonF Posted August 6, 2022 Share Posted August 6, 2022 Or use a path to a cache only share if they have a cache drive? Quote Link to comment
mgutt Posted August 6, 2022 Author Share Posted August 6, 2022 43 minutes ago, SimonF said: Or use a path to a cache only share if they have a cache drive? Not possible and not worth it. (there isn't a dir present on a pool which is used by Unraid, not everyone has a pool, not everyone is using a pool as cache, not all use the name "cache", a pool is not usable all the time, ....) Again, we are talking about 0 to 500 (?) writes per year. Most users never use the terminal at all. I don't really understand why this is even worth a discussion. Quote Link to comment
MAM59 Posted August 6, 2022 Share Posted August 6, 2022 17 minutes ago, mgutt said: I don't really understand why this is even worth a discussion. Flash is vulnarable and UNRAID is picky about it. I had the bad experience of a killed usb flash, I have no intention to redo the procedure. So, USB-2 speed, no writes unless really necessary (and a history is the least important thing to risk my precious flash drive) Free UNRAID from beeing Flash-Bound(and really BOUND!), and we can talk about it. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.