Zap's Digital Lighthouse | |||||
|
Categories:
Archives: |
|
|
home :: FreeBSD :: replaceSeagateDisk Fri, 25 Sep 2020
Replacing the external backup drive on my home server
A couple of years ago (OK, maybe more like 3 years ago), I bought a Seagate 8TB external USB disk that I added to my server for semi-offline backups. I formatted it with ZFS with neither mirroring, nor RAID, and put in place a script every Sunday night that copied the entire content of the server onto the external drive using 'rsync' in case my server had a catastrophic failure even though the 4 drives are in a RAID5 configuration. This being said, the 8TB external Seagate drive got corrupted this week, and so I just threw it away and bought a new one. As a reminder, here's what I did to install it in my server: 1) I disconnected the bad drive 2) I destroyed the datasink zpool % zpool destroy -f datasink 3) I rebooted and connected the new drive (which ended up as da0), and then: % gpart create -s gpt da0 % gpart add -t freebsd-zfs -a4k -l seagate8TB da0 % gnop create -S 4k /dev/gpt/seagte8TB % zpool create -f -m none datasink gpt/seagate8TB.nop % zpool export datasink % gnop destroy gpt/seagate8TB.nop % zpool import -d /dev/gpt datasink % zpool status % zfs set mountpoint=/localbackup datasink and, to check if the drive is setup properly for 4k blocks: % zdb | grep ashift it should be set to 12. I then ran my local backup procedure, and it copied the content of the server onto the external USB drive in about 12 hours. Crisis averted. P.S. I probably ought to mention that I take a snapshot of my ZFS partitions every hour and keep (some of) them around for a couple of years. That's a nice feature of ZFS! /FreeBSD | Posted at 21:35 | permanent link |
|