Tag Archives: zfs

Zpool: Replace Command Example

  • ls -l /dev/disk/by-id (to identify new drives)
  • /dev/disk/by-id/wwn-0x5000c5004dd9fc1f = new drive
  • zpool status (to identify bad drives)
  •  UNAVAIL      was /dev/disk/by-id/wwn-0x5000c50050824183-part1 = bad drive
  • zpool replace -f hoppingjohndodson /dev/disk/by-id/wwn-0x5000c50050824183 /dev/disk/by-id/wwn-0x5000c5004dd9fc1f
  • replacing-1 UNAVAIL 0 0 0
    10366474612948495445 UNAVAIL 0 0 0 was /dev/disk/by-id/wwn-0x5000c50050824183-part1
    wwn-0x5000c5004dd9fc1f ONLINE 0 0 0 (resilvering)
Advertisements

ZFS: Auto Snapshot Locations

/zfs-auto-snapshot-master# make install

  • install -d /etc/cron.d
  • install -d /etc/cron.daily
  • install -d /etc/cron.hourly
  • install -d /etc/cron.weekly
  • install -d /etc/cron.monthly
  • install -m 0644 etc/zfs-auto-snapshot.cron.frequent /etc/cron.d/zfs-auto-snapshot
  • install etc/zfs-auto-snapshot.cron.hourly /etc/cron.hourly/zfs-auto-snapshot
  • install etc/zfs-auto-snapshot.cron.daily /etc/cron.daily/zfs-auto-snapshot
  • install etc/zfs-auto-snapshot.cron.weekly /etc/cron.weekly/zfs-auto-snapshot
  • install etc/zfs-auto-snapshot.cron.monthly /etc/cron.monthly/zfs-auto-snapshot
  • install -d /usr/local/share/man/man8
  • install src/zfs-auto-snapshot.8 /usr/local/share/man/man8/zfs-auto-snapshot.8
  • install -d /usr/local/sbin
  • install src/zfs-auto-snapshot.sh /usr/local/sbin/zfs-auto-snapshot