User Tools

Site Tools


nas:build_a_linux_nas:prepare_the_raid_disks

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
nas:build_a_linux_nas:prepare_the_raid_disks [2021/09/25 15:53] – [Create a Linux RAID Partition] peternas:build_a_linux_nas:prepare_the_raid_disks [2021/10/12 20:36] (current) – [Test the Disks] peter
Line 24: Line 24:
 **NOTE:**  This shows: **NOTE:**  This shows:
  
-  * **sda**:  The boot disk of the host OS.+  * **sda**:  The boot disk of the host OS. Leave this alone!
   * **sdb**:  A free disk.   * **sdb**:  A free disk.
   * **sdc**:  A free disk.   * **sdc**:  A free disk.
Line 30: Line 30:
  
 The free disks do not have any partitions yet and will be included into a RAID. The free disks do not have any partitions yet and will be included into a RAID.
 +
 +</WRAP>
 +
 +----
 +
 +===== Obtain the Serial Numbers of the Disks =====
 +
 +<code bash>
 +hdparm -i /dev/sdd | grep SerialNo
 +</code>
 +
 +returns:
 +
 +<code bash>
 +Model=ST16000NM001G-2KK103, FwRev=SB30, SerialNo=WL2091XL
 +</code>
 +
 +<WRAP important>
 +**IMPORTANT:**  Obtain the serial number for every disk; and keep a record of this somewhere safe.
 +</WRAP>
 +
 +
 +<WRAP info>
 +**NOTE:**  Many disks also have the serial number written on the disk.
 +
 +The reason for recording the serial number of each disk is that in the case of a disk failure, there needs to be a way to determine which disk has failed and needs to be replaced.
 +
 +  * The enclosure being used for the disks may not support hot-swapping and there may not be a separate light for each disk, so there may not be a straight-forward way to determine which specific disk has failed.
 +
 +</WRAP>
 +
 +----
 +
 +===== Test the Disks =====
 +
 +All hard drives, both new and old, should be tested before adding them to an array.
 +
 +See S.M.A.R.T. to view smart data and run smart tests.
 +
 +Do a short smart test:
 +
 +<code bash>
 +smartctl -t short /dev/sdb [-d sat]
 +</code>
 +
 +Do a long smart test:
 +
 +<code bash>
 +smartctl -t long /dev/sdb [-d sat]
 +</code>
 +
 +Check all smart attributes:
 +
 +<code bash>
 +smartctl -a /dev/sdb [-d sat]
 +</code>
 +
 +Do a random readwrite test:
 +
 +<code bash>
 +sudo fio --filename="/dev/sdb --name=randwrite --ioengine=sync --iodepth=1 --rw=randrw --rwmixread=50 --rwmixwrite=50 --bs=4k --direct=0 --numjobs=8 --size=300G --runtime=7200 --group_reporting
 +</code>
 +
 +<WRAP info>
 +**NOTE:** The smartmontools package might be needed to be installed:
 +
 +<code bash>
 +sudo apt install smartmontools
 +</code>
 +
 +  * **-d sat**:  Sata disks.
 +
 +See:  https://www.smartmontools.org/
  
 </WRAP> </WRAP>
Line 125: Line 198:
  
 <WRAP info> <WRAP info>
-**NOTE:** Just taking the default values uses the entire disk.+**NOTE:** This shows that there is a single partition, /dev/sdb1, using the entire disk.
 </WRAP> </WRAP>
  
Line 197: Line 270:
 ===== Partition other Disks ===== ===== Partition other Disks =====
  
-Repeat the above instructions for the other free disks.+<WRAP info> 
 +**NOTE:** Repeat the above instructions for the other free disks. 
 +</WRAP> 
  
 ---- ----
nas/build_a_linux_nas/prepare_the_raid_disks.1632585218.txt.gz · Last modified: 2021/09/25 15:53 by peter

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki