Skip to content

Instantly share code, notes, and snippets.

@0mkara
Last active April 16, 2020 03:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 0mkara/1803865565470799702bc45d8c761e4c to your computer and use it in GitHub Desktop.
Save 0mkara/1803865565470799702bc45d8c761e4c to your computer and use it in GitHub Desktop.
Quick ZFS pool with new HGST 4 TB
  • List all disks
sudo fdisk -l
Disk /dev/sda: 3.7 TiB, 4000787030016 bytes, 7814037168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 33BC5101-ACC1-0C4D-B97B-28AAE1F5B38D
  • Create zfs pool
zpool create -f serverpool /dev/sda
zfs set mountpoint=/serverstore serverpool
zfs mount -a
zfs unmount serverpool
zfs list
@0mkara
Copy link
Author

0mkara commented Apr 16, 2020

  • Obtain disk information
lsblk -o "NAME,MAJ:MIN,RM,SIZE,RO,FSTYPE,MOUNTPOINT,UUID"
smartctl -a /dev/yourdrive

Output >

=== START OF INFORMATION SECTION ===
Device Model:     WDC WD40EFRX-68WT0N0
Serial Number:    WD-WCC4E4LA4965
LU WWN Device Id: 5 0014ee 261ca5a3f
Firmware Version: 82.00A82
User Capacity:    4,000,787,030,016 bytes [4.00 TB]
Sector Sizes:     512 bytes logical, 4096 bytes physical
Rotation Rate:    5400 rpm
Device is:        Not in smartctl database [for details use: -P showall]
ATA Version is:   ACS-2 (minor revision not indicated)
SATA Version is:  SATA 3.0, 6.0 Gb/s (current: 6.0 Gb/s)
Local Time is:    Sun Apr  3 10:59:55 2016 CEST
SMART support is: Available - device has SMART capability.
SMART support is: Enabled
  • Add a disk to pool to create a mirror
sudo zpool attach serverpool ata-HGST_HUS726T4TALA6L4_V6H98V1S ata-HGST_HUS726T4TALA6L4_V6HD9JDS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment