Fusion-IO ioDrive2のデータ完全削除

# 概要
Fusion-IO ioDrive2はESXi 6.7までしか対応していません。
丁度ヤフオクでIntel DC P3605の1.6TB版を購入（二枚目）したため、ioDriveとお別れすべく、データ完全削除コマンドを実行してみました。

# 検証環境
ioDrive2 PCIe SSD-1.2TB
OS: VMware ESXi 6.7U3

# マニュアル
富士通社のマニュアルが公開されていましたので、こちらを参考にしました。
https://www.fujitsu.com/jp/Images/CA92344-0310-03_ioMemory_VSL_User_Guide_for_Linux.pdf

# 操作

## サーバにログイン
ESXiにログインします。

## 状態確認
```
[root@localhost:~] fio-status -a

Found 1 ioMemory device in this system
Driver version: 3.2.16 build 1731

Adapter: Single Controller Adapter
        Fusion-io ioDrive2 1.205TB, Product Number:F00-001-1T20-CS-0001, SN:1213D1381, FIO SN:1213D1381
        ioDrive2 Adapter Controller, PN:PA004137009
        External Power: NOT connected
        PCIe Bus voltage: avg 12.12V
        PCIe Bus current: avg 0.72A
        PCIe Bus power: avg 8.67W
        PCIe Power limit threshold: 24.75W
        PCIe slot available power: unavailable
        Connected ioMemory modules:
          fct0: Product Number:F00-001-1T20-CS-0001, SN:1213D1381

fct0    Attached
        ioDrive2 Adapter Controller, Product Number:F00-001-1T20-CS-0001, SN:1213D1381
        ioDrive2 Adapter Controller, PN:PA004137009
        SMP(AVR) Versions: App Version: 1.0.29.0, Boot Version: 0.0.8.1
        Located in slot 0 Center of ioDrive2 Adapter Controller SN:1213D1381
        Powerloss protection: protected
        PCI:01:00.0
        Vendor:1aed, Device:2001, Sub vendor:1aed, Sub device:2001
        Firmware v7.1.15, rev 110356 Public
        1205.00 GBytes device size
        Format: v500, 2353515625 sectors of 512 bytes
        PCIe slot available power: 75.00W
        PCIe negotiated link: 4 lanes at 5.0 Gt/sec each, 2000.00 MBytes/sec total
        Internal temperature: 49.22 degC, max 51.19 degC
        Internal voltage: avg 1.02V, max 1.02V
        Aux voltage: avg 2.50V, max 2.51V
        Reserve space status: Healthy; Reserves: 100.00%, warn at 10.00%
        Active media: 100.00%
        Rated PBW: 17.00 PB, 97.98% remaining
        Lifetime data volumes:
           Physical bytes written: 343,687,366,812,072
           Physical bytes read   : 463,994,417,814,752
        RAM usage:
           Current: 699,921,280 bytes
           Peak   : 720,995,840 bytes
        Contained VSUs:
          fioiom0:      ID:0, UUID:f9ff6dba-4b03-7747-9cf8-75eefab88657

fioiom0 State: Online, Type: block device
        ID:0, UUID:f9ff6dba-4b03-7747-9cf8-75eefab88657
        1205.00 GBytes device size
        Format: 2353515625 sectors of 512 bytes

```

書き込み耐久性(PBW)は圧倒的な17PBで、またほとんど使っていません。（もったいない・・・）
```
        Rated PBW: 17.00 PB, 97.98% remaining
```

### ESXiから削除
予め、ESXiのデータストアとしてマウントされているため、アンマウント及び削除を行います。

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/3789581/5bcd02a2-667f-965f-3d45-4722b83187e0.png)

### デタッチ
削除前に、デタッチし状態を確認します。

```
[root@localhost:~] fio-detach /dev/fct0

WARNING: Please verify that device /dev/fct0 is no longer in use, and unmounted, before continuing.
         Detaching a device in use can cause system instability and kernel crashes.

Do you wish to continue [y/n]? y
Unclaiming eui.f9ff6dba4b037747002471eefab88657...done
Detaching: [====================] (100%) |
 fioiom0 - detached.
[root@localhost:~] fio-status -a

Found 1 ioMemory device in this system
Driver version: 3.2.16 build 1731

Adapter: Single Controller Adapter
        Fusion-io ioDrive2 1.205TB, Product Number:F00-001-1T20-CS-0001, SN:1213D1381, FIO SN:1213D1381
        ioDrive2 Adapter Controller, PN:PA004137009
        External Power: NOT connected
        PCIe Bus voltage: avg 12.11V
        PCIe Bus current: avg 0.71A
        PCIe Bus power: avg 8.93W
        PCIe Power limit threshold: 24.75W
        PCIe slot available power: unavailable
        Connected ioMemory modules:
          fct0: Product Number:F00-001-1T20-CS-0001, SN:1213D1381

fct0    Detached
        ioDrive2 Adapter Controller, Product Number:F00-001-1T20-CS-0001, SN:1213D1381
        ioDrive2 Adapter Controller, PN:PA004137009
        SMP(AVR) Versions: App Version: 1.0.29.0, Boot Version: 0.0.8.1
        Located in slot 0 Center of ioDrive2 Adapter Controller SN:1213D1381
        Powerloss protection: protected
        PCI:01:00.0
        Vendor:1aed, Device:2001, Sub vendor:1aed, Sub device:2001
        Firmware v7.1.15, rev 110356 Public
        1205.00 GBytes device size
        Format: v500, 2353515625 sectors of 512 bytes
        PCIe slot available power: 75.00W
        PCIe negotiated link: 4 lanes at 5.0 Gt/sec each, 2000.00 MBytes/sec total
        Internal temperature: 49.22 degC, max 51.19 degC
        Internal voltage: avg 1.02V, max 1.02V
        Aux voltage: avg 2.50V, max 2.51V
        Reserve space status: Healthy; Reserves: 100.00%, warn at 10.00%
        Active media: 100.00%
        Rated PBW: 17.00 PB, 97.98% remaining
        Lifetime data volumes:
           Physical bytes written: 343,688,895,014,768
           Physical bytes read   : 463,995,381,989,288
        RAM usage:
           Current: 12,280,000 bytes
           Peak   : 720,995,840 bytes
```

### 完全削除（クリア）
マニュアルによると、クリアとパージの2つの削除モードがあり、デフォルトではクリアのようです。以下のようにクリアを実行して状態を確認します。

```
[root@localhost:~] fio-sure-erase /dev/fct0
WARNING: sanitizing will destroy any existing data on the device!
Do you wish to continue [y/n]? y
Erasing blocks: [====================] (100%) -
Success: Fusion-io ioDrive2 1.205TB PN:F00-001-1T20-CS-0001 SN:1213D1381 FIO-SN:1213D1381 Device:/dev/fct0
[root@localhost:~] fio-status -a

Found 1 ioMemory device in this system
Driver version: 3.2.16 build 1731

Adapter: Single Controller Adapter
        Fusion-io ioDrive2 1.205TB, Product Number:F00-001-1T20-CS-0001, SN:1213D1381, FIO SN:1213D1381
        ioDrive2 Adapter Controller, PN:PA004137009
        External Power: NOT connected
        PCIe Bus voltage: avg 12.10V
        PCIe Bus current: avg 0.73A
        PCIe Bus power: avg 9.68W
        PCIe Power limit threshold: 24.75W
        PCIe slot available power: unavailable
        Connected ioMemory modules:
          fct0: Product Number:F00-001-1T20-CS-0001, SN:1213D1381

fct0    Detached
        ioDrive2 Adapter Controller, Product Number:F00-001-1T20-CS-0001, SN:1213D1381
        ioDrive2 Adapter Controller, PN:PA004137009
        SMP(AVR) Versions: App Version: 1.0.29.0, Boot Version: 0.0.8.1
        Located in slot 0 Center of ioDrive2 Adapter Controller SN:1213D1381
        Powerloss protection: protected
        PCI:01:00.0
        Vendor:1aed, Device:2001, Sub vendor:1aed, Sub device:2001
        Firmware v7.1.15, rev 110356 Public
        1205.00 GBytes device size
        Format: v500, 2353515625 sectors of 512 bytes
        PCIe slot available power: 75.00W
        PCIe negotiated link: 4 lanes at 5.0 Gt/sec each, 2000.00 MBytes/sec total
        Internal temperature: 49.22 degC, max 51.19 degC
        Internal voltage: avg 1.02V, max 1.02V
        Aux voltage: avg 2.50V, max 2.51V
        Reserve space status: Healthy; Reserves: 100.00%, warn at 10.00%
        Active media: 100.00%
        Rated PBW: 17.00 PB, 97.98% remaining
        Lifetime data volumes:
           Physical bytes written: 343,688,897,582,632
           Physical bytes read   : 464,001,371,149,088
        RAM usage:
           Current: 12,280,000 bytes
           Peak   : 720,995,840 bytes
```

#### 注意点
デタッチしない状態で実行すると、以下のエラーが出て中断します。

```
[root@localhost:~] fio-sure-erase /dev/fct0
WARNING: sanitizing will destroy any existing data on the device!
Do you wish to continue [y/n]? y
Erasing blocks: [====================] (100%)
Error: Device '/dev/fct0' is not in a valid state.
   Sure erase requires the device to be detached.
Failure: Fusion-io ioDrive2 1.205TB PN:F00-001-1T20-CS-0001 SN:1213D1381 FIO-SN:1213D1381 Device:/dev/fct0
```

### 取り外し
以上でioDrive2の完全消去が完了しましたので、サーバから取り外しを行います。