Netra Server X5-2 Service Manual

Exit Print View

Updated: October 2016
 
 

Unmount an NVMe Storage Drive (Oracle Linux)

  1. Log in to Oracle Linux.
  2. Remove the NVMe storage device path.
    1. Find the PCIe addresses (Bus Device Function).
      # find /sys/devices | egrep ‘nvme[0-9][0-9]?$’

      This commands returns output similar to the following:

      /sys/devices/pci0000:80/0000:80:03.0/0000:b0:00.0/0000:b1:04.0/0000:b2:00.0/misc/nvme0
      /sys/devices/pci0000:80/0000:80:03.0/0000:b0:00.0/0000:b1:05.0/0000:b4:00.0/misc/nvme1

      In this example, the PCIe addresses are highlighted in bold text.

    2. Obtain the slot number (APIC ID) for the bus address for all of the PCIe slot numbers and the corresponding bus addresses.
      # egrep –H ‘.*’ /sys/bus/pci/slots/*/address

      This command returns output similar to the following:

      /sys/bus/pci/slots/10/address:0000:b8:00
      /sys/bus/pci/slots/11/address:0000:b6:00
      /sys/bus/pci/slots/12/address:0000:b2:00 (instance nvme0, pcie slot 12, drive label nvme2)
      /sys/bus/pci/slots/13/address:0000:b4:00 (instance nvme1, pcie slot 13, drive label nvme3)

      In this example, the bus addresses for the corresponding NVMe instances are highlighted in bold text.


      Note -  In the output, the instance names for the NVMe drives do not correspond to the NVMe drive labels on the server. For example, pci/slots/12/address: 0000:b2:00 corresponds to instance nvme0. However, on the server, this drive is labeled NVMe2.
    3. Disconnect all users of the NVMe drive, and back up the NVMe drive data as needed.
      1. Use the umount command to unmount any file systems that are mounted on the device.
      2. Remove the device from any multiple device (md) and Logical Volume Manager (LVM) volume.

        If the device is a member of an LVM Volume group, it might be necessary to move data off the device using the pvmove command. Then, use the vgreduce command to remove the physical volume, and optionally, use the pvremove command to remove the LVM meta data from the disk.

      3. If the device uses multipathing, run multipath -l, and note all of the paths to the device. Then, remove the multipathed device using the multipath -f device command.
      4. Run the blockdev --flushbufs device command to flush any outstanding I/O on all paths to the device.
  3. At the BIOS prompt, detach the NVMe device driver, and power off the NVMe drive slot.
    echo 0 > /sys/bus/pci/slots/slot-number/power

    where slot-number is the slot number obtained in Step 2.

    The slot number can be a single digit or hyphenated numbers such as 0-2.

Related Information