Skip to content

Instantly share code, notes, and snippets.

View tosih's full-sized avatar
😰

Sohail Ahmed tosih

😰
View GitHub Profile
@tosih
tosih / zfs_replace_disk.sh
Created June 7, 2019 20:12
Steps used to hot swap a failing disk in my OSX ZFS pool
#!/usr/bin/env bash
# Export pool to reimport with the less safe (because they vary) BSD disk names in /dev,
zpool export Data
zpool import -d /dev Data
# Take down faulty disk
zpool offline Data /dev/<faulty_disk>
# Replace physical disk

Keybase proof

I hereby claim:

  • I am tosih on github.
  • I am tosih (https://keybase.io/tosih) on keybase.
  • I have a public key ASBPR2NeZEMn6ngXNwc8HWRgWynXAP45_iM2XcTImx99uAo

To claim this, I am signing this object:

@tosih
tosih / parseCIDRRange.js
Created January 6, 2017 22:22 — forked from binarymax/parseCIDRRange.js
JavaScript function to parse a CIDR Range string into beginning and ending IPv4 Addresses
//MIT License
//Copyright (c) 2013, Max Irwin
//Parses a CIDR Range into beginning and ending IPv4 Addresses
//For example: '10.0.0.0/24'
//Returns ['10.0.0.0', '10.0.0.255']
var parseCIDR = function(CIDR) {
//Beginning IP address
var beg = CIDR.substr(CIDR,CIDR.indexOf('/'));