Comment 18 for bug 1835954

Revision history for this message
Igor Gnip (igorgnip) wrote :

Hi Guilherme,

yes, executing wipefs -a /dev/nvme?n? should do what is required and inform kernel of change.
Haven't tried it out yet.

Also I would try to rescan controller before invoking nvme-cli to play safe.

    def rescan(cls, kname):
        path = '/sys/block/%s/device/rescan_controller' % kname.decode('utf-8')
        with open(path, "wb", 0) as fp:
            fp.write(b'1\n')
            fp.flush()
            fp.close()

I was not able to confirm there actually is any difference (yet).