Seige Posted June 7, 2018 Share Posted June 7, 2018 Hi, I recently installed a second SSD and created a btrfs cache pool. After a while I noticed performance degradation and came across several suggestions by @johnnie.black. After running: btrfs balance start --full-balance /mnt/cache and fstrim -v /mnt/cache performance was back to normal. Hence, I wanted to add a weekly script with: btrfs balance start -dusage=75 /mnt/cache This leads to the following error message: "ERROR: cannot access '/mnt/cache': No such file or directory" while the original command still works. Running " btrfs device stats /mnt/cache" only worked once, usually I get "ERROR: cannot check /mnt/cache: No such file or directory" and "ERROR: '/mnt/cache' is not a mounted btrfs device". Not sure what is going on here. Any help is much appreciated. My diagnostics file: EDIT: link removed Thanks! Seige Link to comment
JorgeB Posted June 7, 2018 Share Posted June 7, 2018 Command looks correct, array needs to be started, besides that look for an extra space or some other character. Link to comment
Seige Posted June 7, 2018 Author Share Posted June 7, 2018 Thanks for the quick response! I have copy pasted both commands from some of your posts. At the moment both commands work, but e.g. btrfs fi df /mnt/cache Does lead to the same "ERROR: cannot access '/mnt/cache': No such file or directory" Could it be that these commands cannot be executed one after another? Link to comment
JorgeB Posted June 7, 2018 Share Posted June 7, 2018 1 minute ago, Seige said: Could it be that these commands cannot be executed one after another? There should be no problem with that. Link to comment
Seige Posted June 7, 2018 Author Share Posted June 7, 2018 10 minutes ago, johnnie.black said: There should be no problem with that. Maybe putty does not like copy pasting from the web browser. I carefully ran it through Notepad++ and double checked all characters and seems to work for balance and stats. But command btrfs fi df /mnt/cache still produces the error. Also tried the build in web terminal, same results. I feel rather inapt EDIT: It seems to work, when I type it manually. Not sure where this is coming from, never had any issues with copy paste before. Link to comment
pwm Posted June 7, 2018 Share Posted June 7, 2018 It's sometimes possible to get into troubles because of differences in line endings between Linux and Windows. Windows uses a two-character sequence (carriage return + line feed) while Linux just uses the second character. This means it's possible to paste a carriage return from the windows machine that ends up as a hidden character at the end of the pasted command. And then follows the line feed that Linux sees as the real end of the line. So your command could end up as: btrfs fi df /mnt/cache^r where ^r is that hidden carriage return character. And btrfs can then treat this hidden character as an additional character belonging to the mount path. If the above is what happens, then it can make a difference how you make your copy/paste selection on the Windows side. When using the mouse to mark things for copying on Windows, it can often be a good idea to start from the right hand side of the line to copy and mark to the left. Then you avoid the selection logic in the program from also including the line ending in the selection. A number of programs will include the line ending when you select from left-to-right. You'll notice because directly when you paste on the Linux command line, Linux will execute the pasted line instead of waiting for you to press enter. Link to comment
Seige Posted June 8, 2018 Author Share Posted June 8, 2018 Thank you @pwm for your additional explanation! I was not familiar with this, but it looks like that this is exactly what happened. I was able to replicate the issue depending on the way I use copy/paste from inside of windows. Link to comment
pwm Posted June 8, 2018 Share Posted June 8, 2018 5 minutes ago, Seige said: Thank you @pwm for your additional explanation! I was not familiar with this, but it looks like that this is exactly what happened. I was able to replicate the issue depending on the way I use copy/paste from inside of windows. The IT world is full of black magic. Until you know what happens it can be almost impossible to figure out the almost random outcomes. And as software developer, it isn't always possible or practical to catch and hide all the strange magic from end users. In the end, we'll just have to help each other. Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.