четверг, 22 сентября 2016 г.

Unmounting a LUN using the vSphere Client


Unmounting a LUN using the vSphere Client

To detach a storage device using the vSphere Client, see the Detach Storage Devices section in the vSphere 5.0 Storage Guide.

Caution: You must successfully unmount the datastore using the documented method prior to completing the steps described below. For more information, see the Unmount VMFS or NFS Datastores section in the vSphere 5.0 Storage Guide.

To unmount a LUN from an ESXi 5.0 host using the vSphere Client:
  1. If the LUN is an RDM, skip to step 2. Otherwise, in the Configuration tab of the ESXi host, click Storage. Right-click the datastore being removed and click Unmount.

    A Confirm Datastore Unmount window appears. When the prerequisite criteria have been passed, click OK.

    Note: To unmount a datastore from multiple hosts in the vSphere Client, click Hosts and Clusters > Datastores and Datastore Clusters view (Ctrl+Shift+D). Perform the unmount task and select the appropriate hosts that should no longer access the datastore to be unmounted.

  2. Click the Devices view (under Configuration > Storage):



  3. Right-click the NAA ID of the LUN (as noted above) and click Detach. A Confirm Device Unmount window is displayed. When the prerequisite criteria are passed, click OK. Under the Operational State of the Device, the LUN is listed as Unmounted.

    Note: The Detach function must be performed on a per-host basis and does not propagate to other hosts in vCenter Server. If a LUN is presented to an initiator group or storage group on the SAN, the Detach function must be performed on every host in that initiator group before unmapping the LUN from the group on the SAN. Failing to follow this step results in an all-paths-down (APD) state for those hosts in the storage group on which Detach was not performed for the LUN being unmapped.

  4. Confirm if the LUN is successfully detached. The LUN can then be safely unpresented from the SAN. For more information, contact your storage array vendor.
  5. Perform a rescan on all ESXi hosts which had visibility to the LUN. The device is automatically removed from the Storage Adapters.
When the device is detached, it stays in an unmounted state even if the device is re-presented (that is, the detached state is persistent). To bring the device back online, the device must be attached.

If you want the device to permanently decommission from an ESXi host, manually remove the NAA entries from the host configuration:
  1. To list the permanently detached devices, run this command:

    # esxcli storage core device detached list

    You see output similar to:

    Device UID State
    ------------------------------------ -----
    naa.50060160c46036df50060160c46036df off
    naa.6006016094602800c8e3e1c5d3c8e011 off


  2. To permanently remove the device configuration information from the system, run this command:

    # esxcli storage core device detached remove -d NAA_ID

    For example:

    # esxcli storage core device detached remove -d naa.50060160c46036df50060160c46036df

среда, 21 сентября 2016 г.

Soft RAID, замена HDD

После выключения не грузилась OS, не собирался RAID1 раздел boot.
Попробовал

mdadm --assemble --force /dev/md126

ни чего не изменилось, тогда 

mdadm --run /dev/md126 

раид поднялся, одного диска не хватает . Не понял почему при наличии исправного sda (sdc вышел из строя)  /boot не поднялся, а при этом / (root на sda2) поднялся нормально.


И собственно по замене диска
 

sfdisk -d /dev/sda | sfdisk /dev/sdc
mdadm --manage /dev/md126 --add /dev/sdc1
mdadm --manage /dev/md127 --add /dev/sdc2
grub2-install /dev/sdc