Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| computers:freenas [2020/01/13 15:10] – [Replacing bad drives] localadmin | computers:freenas [2024/07/09 04:00] (current) – jon | ||
|---|---|---|---|
| Line 18: | Line 18: | ||
| ==== Replacing bad drives ==== | ==== Replacing bad drives ==== | ||
| + | Use smartctl -a /dev/(name of disk drive) to list the SMART attributes for the drive in question. Use smartctl -t short /dev/(name of disk drive) to do a basic test. | ||
| https:// | https:// | ||
| + | https:// | ||
| + | |||
| + | After new drive is installed, before resilvering the drive, break in the drive with the following: | ||
| + | |||
| + | < | ||
| + | smartctl -t conveyance | ||
| + | smartctl -t long | ||
| + | badblocks -b 4096 -ws | ||
| + | smartctl -t long</ | ||
| + | |||
| + | <note important> | ||
| + | |||
| + | This will put the drive through its paces and if it survives, it should be in great shape for use. If it fails, RMA the drive if it is under warranty. | ||
| + | |||
| + | https:// | ||
| + | |||
| + | https:// | ||
| + | |||
| + | ==== Migrating Drive Pool to new Pool ==== | ||
| + | |||
| + | https:// | ||
| + | I've had to do this twice over the years when current hard drive space was getting high. | ||
| + | |||
| + | === Pre-Staging Steps === | ||
| + | |||
| + | Run the hard drive burn-in steps above on your new drives. Once done, create a new drive pool. Why? When you create a drive pool, either you set up your pool to be redundant (mirrored), or set it for max capacity (striped). If you need to expand, your only option is to mirror, if you already have a mirrored array. If you are striped, you can mirror or stripe more. In my case, I set up for redundancy. This means when I need to expand, I have to create a new striped pool, then mirror new drives in. | ||
| + | |||
| + | === Starting Migration === | ||
| + | |||
| + | https:// | ||
| + | |||
| + | I've modified the steps below to reflect my experience on FreeNAS 11.2 U8 | ||
| + | |||
| + | == Steps == | ||
| + | This assumes that you have both pools setup and connected to the same system, but the replication steps can be done between two systems and the disks moved after replication (this would apply in the instance where the primary machine doesn' | ||
| + | |||
| + | Assumption is that " | ||
| + | |||
| + | The steps in a nutshell are replicate from oldpool to newpool, remove (or rename) oldpool, and then rename newpool to oldpool. | ||
| + | |||
| + | - The system dataset needs to be moved off of oldpool. Use the GUI to select a new location other than oldpool or newpool. | ||
| + | - Create a system config backup using the GUI. This will be needed later, because when you detach oldpool, you will lose your share, snapshot and replication settings. | ||
| + | - Use the GUI to create a snapshot of the dataset you want to move. If you want to move everything, select the root dataset. For flexibility in the future, I'd suggest checking the " | ||
| + | - Once replication is complete and you are satisfied that all data is on newpool it's time to detach both oldpool and newpool. Use the GUI to " | ||
| + | - Using the CLI (or SSH) run the following to import and rename "zpool import oldpool olderpool" | ||
| + | - Once the pools are renamed, export them at the CLI "zpool export olderpool" | ||
| + | - Using the GUI, go to the storage tab and select the import volume tab and import oldpool. This step is what enables freenas to understand and control the pool. | ||
| + | - Once the pool is imported, you can either manually recreate your shares, or you can restore from the configuration backup we made in step 2. | ||
| + | - I would verify that everything is working to your liking before doing anything with olderpool. For safety, I'd leave it un-imported until you decide you need it or want to get rid of it. If you want to get rid of the data on the disks, I would import olderpool and then once it is in freenas, select the detach volume option for old-tank and this time select the destroy data option to blank out the drives. This is the point of no return, so know what you are doing before confirming. | ||
| + | |||
| ===== Other tips outside the guides ===== | ===== Other tips outside the guides ===== | ||
| ==== SMB Shares and Microsoft Accounts ==== | ==== SMB Shares and Microsoft Accounts ==== | ||
| + | Be sure NTLMv1 is turned off on your Windows client | ||
| + | |||
| + | https:// | ||
| + | https:// | ||
| + | |||
| + | How connections work: | ||
| + | https:// | ||
| + | |||
| + | https:// | ||
| + | |||
| + | Permissions: | ||
| + | https:// | ||
| + | https:// | ||
| + | https:// | ||
| + | https:// | ||
| ==== Fixing Permissions Issues ==== | ==== Fixing Permissions Issues ==== | ||
| Revolves around using setfacl | Revolves around using setfacl | ||
| + | |||
| + | https:// | ||
| + | https:// | ||
| + | |||
| + | ==== Tailscale and using an rsync task ==== | ||
| + | |||
| + | This works with the official community release, or the TrueCharts container. Assuming you're using TrueNAS SCALE. | ||
| + | |||
| + | Install the Tailscale container inside Apps. For configuration, | ||
| + | |||
| + | Sources: | ||
| + | * https:// | ||
| + | * https:// | ||