Noob question about hard drive burn in testing(yes, I read the thread)

owsleygarcia95

Dabbler
Joined
Jan 13, 2024
Messages
32
If you're getting the "Connection refused" error, you haven't enabled the SSH service on your NAS.
Ok I figured out how to enable SSH on the NAS. So I tried it again and now I'm getting this.

20240116_181630.jpg
 

owsleygarcia95

Dabbler
Joined
Jan 13, 2024
Messages
32
That's the one.

@owsleygarcia95 you'll find it under Services -> SSH.
Ok thanks. Well I've managed to create a dataset, add an additional user and set up a windows smb. Started a file transfer that I promptly ended when it was only getting about 73MB/s. Hoping that the Mellanox 10gb NICs on the way will work (I returned some intel ones because they didn't have a windows 11 driver, I kind of got it to work but read good things about Mellanox).

I'm pretty sure I just forgot to add admin under password login groups last time. Going to see if it finally works lol.
 

owsleygarcia95

Dabbler
Joined
Jan 13, 2024
Messages
32
...or root login with password?
So I finally got logged in under admin, but when I try to login under root, it says permissions denied and prompts me for a password again. I know I only made one password, so I'm not sure why admin works and root doesn't. I gave permissions to both of them.

Can I just use admin? What is the actual difference between root and admin?
 

owsleygarcia95

Dabbler
Joined
Jan 13, 2024
Messages
32
After some quick googling I think I have to add a password for the root account, since it makes admin the default user. Is this right?
 

owsleygarcia95

Dabbler
Joined
Jan 13, 2024
Messages
32
Well I finally managed to gain access through ssh under root. I just had to add a password to the root account (which it recommends against doing). Not to concerned about screwing things up as this is all just a test currently. I think I've managed to figure out everything I plan on using this for except a couple of apps and my vpn, neither of which I have attempted yet. Thank you guys very much for being so patient with me. I was doing my best to search for the answers to my questions first, but its difficult when you barely understand half the stuff you're reading lol. Hopefully I can figure the rest out with youtube videos and google. It's going to be awesome to have almost 100 TiB soon.
 
Joined
Oct 22, 2019
Messages
3,641
Hopefully I can figure the rest out with youtube videos and google. It's going to be awesome to have almost 100 TiB soon.
Be very cautious when using YouTube videos to manage and configure TrueNAS. That's all I'm going to say.

If you're going to preserve dozens of TiB, do understand that the more "top-heavy" you get, the more difficult it becomes to keep up-to-date- backup(s) of everything.
 

owsleygarcia95

Dabbler
Joined
Jan 13, 2024
Messages
32
Be very cautious when using YouTube videos to manage and configure TrueNAS. That's all I'm going to say.

If you're going to preserve dozens of TiB, do understand that the more "top-heavy" you get, the more difficult it becomes to keep up-to-date- backup(s) of everything.
Will definitely keep that in mind. I'm going to make sure I can configure everything I want to use and run all my drive tests with this test build, and then once I'm positive I can get everything I want up and running easily, I will wipe everything and do a fresh install. Should be a lot easier the second time lol.

I'm really not going to be putting any personal data on here, or anything that would be a huge deal if I lost it. It's ultimately all going to be stuff I could download again if I had to. So I'm more than happy with being able to lose up to 2 disks in a raid z2. I can't afford to backup the entire thing. If I lose 3 disks all at once, it will be a crappy day, but I won't lose anything that would cost me money or anything like that.
 

sfatula

Guru
Joined
Jul 5, 2022
Messages
608
That's wise to wipe and reinstall. Youtube videos, ugh. They are great for many things in life, but Truenas support is generally not one of them for many reasons. While it may take more effort, actually learning the different pieces you need to learn to properly manage a NAS is a better use of your time. Eventually, you won't need any videos. It's better to understand the underlying tech if at all possible. Makes fixing issues easier in the long term.
 

dak180

Patron
Joined
Nov 22, 2017
Messages
310
I have a burn in script that will run smart tests and badblocks (it automatically adjusts for disk capacity) on a list of drives that you give it automatically launching tmux sessions for each one and logging the results to files. This is best done on raw disks that are not part of pool (it will destroy any data on them)
 

PhilD13

Patron
Joined
Sep 18, 2020
Messages
203
This is from powershell and should also work in the regular comand prompt shell in windows. You can also use putty to establish the ssh connection which many do. Enter the connection all on one line. It is easy to do.

In the Truenas server you will need to Setup and enable ssh (services >> ssh) and setup a user that is allowed to use ssh. I used the default admin user in this case. Credentials >> User >> edit >> check the box for SSH password login enabled save edits

On the windows machine open a command prompt shell and at the windows comand prompt you will enter: ssh username@server-ip-address like in the example below:
PS C:\Users\burt> ssh admin@192.168.0.149

This will establish the connection to Truenas ssh with the user name entered
Enter the Truenas ssh users password as requested. Type it in, it will not show progress and cursor will not move so just know you are entering it and hit return
If the user authenticates the screen will the first time usually gripe about the authenticity of the connection and ask to accept the key
Type yes and after windows records and validates the key you will be logged in to the Truenas ssh session.

The authenticity of host '192.168.0.149 (192.168.0.149)' can't be established.
ED25519 key fingerprint is SHA256:dv/uoll+jQFZxviqQhcT0mfhkPVVsrPO0jLLWMXY0bU.
This key is not known by any other names
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added '192.168.0.149' (ED25519) to the list of known hosts.
admin@192.168.0.149's password:
Last login: Mon Jan 22 11:58:27 2024

TrueNAS (c) 2009-2023, iXsystems, Inc.
All rights reserved.
TrueNAS code is released under the modified BSD license with some
files copyrighted by (c) iXsystems, Inc.

For more information, documentation, help or support, go here:
http://truenas.com

Welcome to test Server

Warning: the supported mechanisms for making configuration changes
are the TrueNAS WebUI, CLI, and API exclusively. ALL OTHERS ARE
NOT SUPPORTED AND WILL RESULT IN UNDEFINED BEHAVIOR AND MAY
RESULT IN SYSTEM FAILURE.

admin@test[~]$

Now you can run the commands from the Truenas ssh connection or run tmux etc. on the Truenas system.

To exit the session type exit and the ssh session will end and show the windows command prompt again.
admin@test[~]$ exit

>>Before it is asked. Don't worry no data sensitive to my test system or any of my real systems or ip range is shown and the fingerprint key is also not valid<<
 

PhilD13

Patron
Joined
Sep 18, 2020
Messages
203
As a note:
On current versions of the Truenas systems, the user root is disabled by default and you have to use admin as the user or create another user and set their privileges and enable ssh for them. The ssh works fine as the admin user but some commands may possibly still need sudo in front of them and the admin password entered again to run the command. I think Truenas is still buggy in this area since the change from root to admin as the default user.

You will get something like the following if root is tried for a user for ssh for current systems.
PS C:\Users\burt> ssh root@192.168.0.149
root@192.168.0.149: Permission denied (publickey).
 

owsleygarcia95

Dabbler
Joined
Jan 13, 2024
Messages
32
That's wise to wipe and reinstall. Youtube videos, ugh. They are great for many things in life, but Truenas support is generally not one of them for many reasons. While it may take more effort, actually learning the different pieces you need to learn to properly manage a NAS is a better use of your time. Eventually, you won't need any videos. It's better to understand the underlying tech if at all possible. Makes fixing issues easier in the long term.
I know what you mean. The first time I tried to configure everything I set some whacky permissions and I couldn't even get qbittorent installed lol. Second time has gone much smoother. Downloading a TB or 2 just for the heck of it today.( I only have half my drives installed, waiting on cages that go with my case off Ali express. So I'll end up wiping this and making a single vdev.) But at the same time I would have been almost screwed without some kind of YouTube video to get me through the basics. It definitely helped to a point. But definitely needed to be supplemented with threads and the official website. I don't know. I know I figured out everything I wanted this thing to do, so I'm happy lol.
 

owsleygarcia95

Dabbler
Joined
Jan 13, 2024
Messages
32
I have a burn in script that will run smart tests and badblocks (it automatically adjusts for disk capacity) on a list of drives that you give it automatically launching tmux sessions for each one and logging the results to files. This is best done on raw disks that are not part of pool (it will destroy any data on them)
That looks pretty cool and convenient if I can figure out how to use it lol. I see that I can download the raw file, but I have no idea what to do with it after that. Could you generally explain how I would go about running this script?
 

Redcoat

MVP
Joined
Feb 18, 2014
Messages
2,925
Could you generally explain how I would go about running this script
The explanation below is copied from a forum "oldie-but-goodie" found at https://www.truenas.com/community/threads/scripts-to-report-smart-zpool-and-ups-status-hdd-cpu-t%C2%B0-hdd-identification-and-backup-the-config.27365/


Script basics

I recommend to use PuTTY (or an UNIX system) to SSH with a full screen window (to avoid breaking long lines in the script) and the nano text editor. The CLI integrated in the web GUI is full of bugs, don't use it for more than executing a few commands to test something rapidly.

Do not put your scripts in /bin or other system directories because if you ever edit or delete one of the system script/binary inadvertently you'll don't like the result... And especially on FreeNAS I wouldn't use /bin because of the updates, the /base thing, etc. I recommend either to put your scripts on one of your pool or in a directory in the home directory of one of the users.

What I like to do on my UNIX systems is to create a directory "scripts" in my home directory to put all my scripts, the path will then look like this: /home/your_user_name/scripts/

I recommend against using special characters and/or spaces in the directories and files names, they can only bring problems. Remember too that UNIX systems are case sensitive.

So, first create a directory (if you want) to put your scripts in: mkdir scripts

Go in this directory (cd scripts) and open a new a file: nano -w your_script.sh

Copy the raw paste data of the script on pastebin (at the bottom of the page), be careful to not forget the first or last line, the best thing to do is to click on the text, do a Ctrl + A and then a Ctrl + C.

Paste the data in the file you created by right-clicking (on the UNIX systems if you highlight something it'll be copied to the clipboard and if you middle-click (right-click on Putty) you'll paste whatever is currently in the clipboard)

Check rapidly that everything is as it should, do the changes you want to make (email address, ...) then save and quit the editor (for nano: Ctrl + O then Enter, and then Ctrl + X)

Add execution rights to the file: chmod +x your_script.sh

If you need you can change the owner (and group; just omit the ":group" part if you don't need it): chown user:group your_script.sh

Now you should have a working script, you can test it like this: ./your_script.sh

Please note that several (all?) of the scripts needs root rights so use the root account to execute them.

You can now add a CRON task in the web GUI. Make sure you select "root" as the user and use the absolute path to your script as the command (for example: /root/scripts/your_script.sh).
 

owsleygarcia95

Dabbler
Joined
Jan 13, 2024
Messages
32
There's no reason not to increase it further. On the 16 TB drives I'm testing right now, I'm running with -b 65536.
Hey. I'm finally about to start these tests. I was kind of working on getting everything else working first. I've managed to get a tmux session to work fine, and started an ssh logged in as root. I was thinking about using this line, badblocks -b 8192 -c 128 -ws /dev/... that etorix mentioned, except replacing it with -b 65536, since you suggested it earlier. I assume this will speed up the test to a point?

Was just wondering one other thing. I currently have 4 drives setup in a raid z2. There's a little bit of test data on them but nothing important. Is it going to let me run the tests with data on them? It's completely fine that it's going to be destroyed. Just wondering if its going to give me issues with drives already configured in an array?
 

Etorix

Wizard
Joined
Dec 30, 2020
Messages
2,134
Badblocks does not care whether the drives are new, used, already formatted or whatever: It reads (and writes) raw sectors.

-b is block size, -c is count, i.e. the number of blocks in one go; together they define the size of the data chunk that is read/written on each operation. Too few is ineffective but bigger than the hardware can chew will slow the test. In my experiments with 10-12 TB drives, -b 4096 with -c 128 or -c 256 made little difference. If you go up to 64ki for a block, decrease 'count' accordingly.
 

owsleygarcia95

Dabbler
Joined
Jan 13, 2024
Messages
32
Badblocks does not care whether the drives are new, used, already formatted or whatever: It reads (and writes) raw sectors.

-b is block size, -c is count, i.e. the number of blocks in one go; together they define the size of the data chunk that is read/written on each operation. Too few is ineffective but bigger than the hardware can chew will slow the test. In my experiments with 10-12 TB drives, -b 4096 with -c 128 or -c 256 made little difference. If you go up to 64ki for a block, decrease 'count' accordingly.
Ok I guess I'll just go with the badblocks -b 8192 -c 128 -ws /dev/sda you suggested originally then. Thanks for the explanation.
 
Top