When drives in a NetApp are being obsoleted and replaced we need to make sure we securely erase all data that used to be on them. Unless you’re just going to crush your disks.
In this example we’ve got an aggregate of 14 disks (aggr0) that need to be wiped and removed from our NetApp so they can be replaced with new, much larger disks.
There are two methods that you can use to wipe disks using your NetApp. The first is to simply delete the aggregate they are a member of, turning them into spares and then running “disk zero spares” from the command line on your NetApp. This only does a single pass and only zero’s the disks. There are arguments I’ve seen where some people say this is enough. I honestly don’t know and we have a requirement to do a 7 pass wipe in our enterprise. You could run the zero command 7 times but I don’t imagine that would be as effective as option number two. The second option is to run the ‘disk sanitize’ command which allows you to specify which disks you want to erase and how many passes to perform. This is what we’re going to use.
The first thing you’ll need to do is get a license for your NetApp to enable the ‘disk sanitize’. It’s a free license (so I’ve been told) and you can contact your sales rep to get one. We got ours for free and I’ve seen forum posts from other NetApp owners saying the same thing.
There is a downside to installing the disk sanitization license. Once it’s installed on a NetApp it cannot be removed. It also restricts the use of three commands once installed:
- dd (to copy blocks of data)
- dumpblock (to print dumps of disk blocks)
- setflag wafl_metadata_visible (to allow access to internal WAFL files)
There are also a few limitations regarding disk sanitization you should know about:
- It is not supported in takeover mode for systems in an HA configuration. (If a storage system is disabled, it remains disabled during the disk sanitization process.)
- It cannot be carried out on disks that were failed due to readability or writability problems.
- It does not perform its formatting phase on ATA drives.
- If you are using the random pattern, it cannot be performed on more than 100 disks at one time.
- It is not supported on array LUNs.
- It is not supported on SSDs.
- If you sanitize both SES disks in the same ESH shelf at the same time, you see errors on the console about access to that shelf, and shelf warnings are not reported for the duration of the sanitization. However, data access to that shelf is not interrupted.
I’ve also read that you shouldn’t sanitize more then 6 disks at once. I’m going to sanitize our disks in batches of 5, 5 and 4 (14 total). I’ve also read you do not want to sanitize disks across shelves at the same time.
Licensing disk sanitization
Once you’ve got your license you’ll need to install it. Login to your NetApp via SSH and run the following:
netapp> license add <DISK SANTIZATION LICENSE>
You will not be able to remove this license, are you sure you
wish to continue? [no] yes
A disk_sanitization site license has been installed.
Disk Sanitization enabled.
Thu Apr 19 10:00:28 PDT [rc:notice]: disk_sanitization licensed
Sanitizing your disks
1. Identify what disks you want to sanitize
netapp> sysconfig -r
Aggregate aggr0 (online, raid_dp) (block checksums)
Plex /aggr0/plex0 (online, normal, active)
RAID group /aggr0/plex0/rg0 (normal)
RAID Disk Device HA SHELF BAY CHAN Pool Type RPM Used (MB/blks) Phys (MB/blks)
--------- ------ ------------- ---- ---- ---- ----- -------------- --------------
dparity 0a.16 0a 1 0 FC:A - ATA 7200 211377/432901760 211921/434014304
parity 0a.17 0a 1 1 FC:A - ATA 7200 211377/432901760 211921/434014304
data 0a.18 0a 1 2 FC:A - ATA 7200 211377/432901760 211921/434014304
data 0a.19 0a 1 3 FC:A - ATA 7200 211377/432901760 211921/434014304
data 0a.20 0a 1 4 FC:A - ATA 7200 211377/432901760 211921/434014304
data 0a.21 0a 1 5 FC:A - ATA 7200 211377/432901760 211921/434014304
data 0a.22 0a 1 6 FC:A - ATA 7200 211377/432901760 211921/434014304
data 0a.23 0a 1 7 FC:A - ATA 7200 211377/432901760 211921/434014304
data 0a.24 0a 1 8 FC:A - ATA 7200 211377/432901760 211921/434014304
data 0a.25 0a 1 9 FC:A - ATA 7200 211377/432901760 211921/434014304
data 0a.26 0a 1 10 FC:A - ATA 7200 211377/432901760 211921/434014304
data 0a.29 0a 1 13 FC:A - ATA 7200 211377/432901760 211921/434014304
data 0a.28 0a 1 12 FC:A - ATA 7200 211377/432901760 211921/434014304
Spare disks
RAID Disk Device HA SHELF BAY CHAN Pool Type RPM Used (MB/blks) Phys (MB/blks)
--------- ------ ------------- ---- ---- ---- ----- -------------- --------------
Spare disks for block or zoned checksum traditional volumes or aggregates
spare 0a.27 0a 1 11 FC:A - ATA 7200 211377/432901760 211921/434014304 (not zeroed)
Here I’ve got 13 disks in aggr0 and the 14th acting as a spare. I need to delete aggr0 to free up the disks to be sanitized.
2. Delete the aggregate the disks are part of
netapp> aggr offline aggr0
Aggregate 'aggr0' is now offline.
netapp> aggr destroy aggr0
Are you sure you want to destroy this aggregate? yes
Aggregate 'aggr0' destroyed.
3. Verify all the disks you want to sanitize are now spares
netapp> sysconfig -r
Spare disks
RAID Disk Device HA SHELF BAY CHAN Pool Type RPM Used (MB/blks) Phys (MB/blks)
--------- ------ ------------- ---- ---- ---- ----- -------------- --------------
Spare disks for block or zoned checksum traditional volumes or aggregates
spare 0a.16 0a 1 0 FC:A - ATA 7200 211377/432901760 211921/434014304 (not zeroed)
spare 0a.17 0a 1 1 FC:A - ATA 7200 211377/432901760 211921/434014304 (not zeroed)
spare 0a.18 0a 1 2 FC:A - ATA 7200 211377/432901760 211921/434014304 (not zeroed)
spare 0a.19 0a 1 3 FC:A - ATA 7200 211377/432901760 211921/434014304 (not zeroed)
spare 0a.20 0a 1 4 FC:A - ATA 7200 211377/432901760 211921/434014304 (not zeroed)
spare 0a.21 0a 1 5 FC:A - ATA 7200 211377/432901760 211921/434014304 (not zeroed)
spare 0a.22 0a 1 6 FC:A - ATA 7200 211377/432901760 211921/434014304 (not zeroed)
spare 0a.23 0a 1 7 FC:A - ATA 7200 211377/432901760 211921/434014304 (not zeroed)
spare 0a.24 0a 1 8 FC:A - ATA 7200 211377/432901760 211921/434014304 (not zeroed)
spare 0a.25 0a 1 9 FC:A - ATA 7200 211377/432901760 211921/434014304 (not zeroed)
spare 0a.26 0a 1 10 FC:A - ATA 7200 211377/432901760 211921/434014304 (not zeroed)
spare 0a.27 0a 1 11 FC:A - ATA 7200 211377/432901760 211921/434014304 (not zeroed)
spare 0a.28 0a 1 12 FC:A - ATA 7200 211377/432901760 211921/434014304 (not zeroed)
spare 0a.29 0a 1 13 FC:A - ATA 7200 211377/432901760 211921/434014304 (not zeroed)
4. Sanitize the first batch of disks (7 passes)
netapp> disk sanitize start -c 7 0a.16 0a.17 0a.18 0a.19 0a.20
WARNING: The sanitization process may include a disk format.
If the system is power cycled or rebooted during a disk format
the disk may become unreadable. The process will attempt to
restart the format after 10 minutes.
The time required for the sanitization process may be quite long
depending on the size of the disk and the number of patterns and
cycles specified.
Do you want to continue (y/n)? y
The disk sanitization process has been initiated. You will be notified via the system log when it is complete.
Thu Apr 19 11:10:41 PDT [disk.failmsg:error]: Disk 0a.20 (XXXXXXXX): message received.
Thu Apr 19 11:10:41 PDT [disk.failmsg:error]: Disk 0a.19 (XXXXXXXX): message received.
Thu Apr 19 11:10:41 PDT [disk.failmsg:error]: Disk 0a.18 (XXXXXXXX): message received.
Thu Apr 19 11:10:41 PDT [disk.failmsg:error]: Disk 0a.17 (XXXXXXXX): message received.
Thu Apr 19 11:10:41 PDT [disk.failmsg:error]: Disk 0a.16 (XXXXXXXX): message received.
Thu Apr 19 11:10:41 PDT [raid.disk.unload.done:info]: Unload of Disk 0a.20 Shelf 1 Bay 4 [NETAPP X262_SGLXY250SSX AQNZ] S/N [XXXXXXXX] has completed successfully
Thu Apr 19 11:10:41 PDT [raid.disk.unload.done:info]: Unload of Disk 0a.19 Shelf 1 Bay 3 [NETAPP X262_SGLXY250SSX AQNZ] S/N [XXXXXXXX] has completed successfully
Thu Apr 19 11:10:41 PDT [raid.disk.unload.done:info]: Unload of Disk 0a.18 Shelf 1 Bay 2 [NETAPP X262_SGLXY250SSX AQNZ] S/N [XXXXXXXX] has completed successfully
Thu Apr 19 11:10:41 PDT [raid.disk.unload.done:info]: Unload of Disk 0a.17 Shelf 1 Bay 1 [NETAPP X262_SGLXY250SSX AQNZ] S/N [XXXXXXXX] has completed successfully
Thu Apr 19 11:10:41 PDT [raid.disk.unload.done:info]: Unload of Disk 0a.16 Shelf 1 Bay 0 [NETAPP X262_SGLXY250SSX AQNZ] S/N [XXXXXXXX] has completed successfully
You can periodically check the status of the sanitization by running:
netapp> disk sanitize status
sanitization for 0a.16 is 2 % complete
sanitization for 0a.18 is 2 % complete
sanitization for 0a.19 is 2 % complete
sanitization for 0a.17 is 2 % complete
sanitization for 0a.20 is 2 % complete
When the disks have been sanitized if you want to re-use them instead of replace them run this command:
netapp> disk sanitize release disk_list
Example
netapp> disk sanitize release 0a.16 0a.17 0a.18 0a.19 0a.20
This will add the sanitized disks to the spare pool.
There are a few options you can customize when ‘disk santize’ command.
disk sanitize start [-p pattern1|-r [-p pattern2|-r [-p pattern3|-r]]] [-c cycle_count] disk_list
-p pattern1 -p pattern2 -p pattern3 specifies a cycle of one to three user-defined hex byte overwrite patterns that can be applied in succession to the disks being sanitized. The default pattern is three passes, using 0x55 for the first pass, 0xaa for the second pass, and 0x3c for the third pass.
-r replaces a patterned overwrite with a random overwrite for any or all of the passes.
-c cycle_count specifies the number of times the specified overwrite patterns will be applied. The default value is one cycle. The maximum value is seven cycles.
disk_list specifies a space-separated list of the IDs of the spare disks to be sanitized.
References (NetApp login require)