Quantcast
Channel: Active questions tagged zfs - Server Fault
Viewing all articles
Browse latest Browse all 138

ESXi 6.5 Raw Device Mapping for SATA Disk Unusable

$
0
0

I have an old server running ESXi 6.5 (the latest version the hardware is compatible with) and have added two hard drives to a SATA controller on the host that I want to expose to an Ubuntu guest serving as a NAS.

I first SSH'd to the ESXi host and added the raw device mappings:

[root@localhost:~] vmkfstools -z /vmfs/devices/disks/t10.ATA_____WDC_WD120EFBX2D68B0EN0___________________D7HEA60N____________ "/vmfs/volumes/SSD_Data/Ubuntu/WD120EFBX2D68B0EN0_D7HEA60N.vmdk"[root@localhost:~] vmkfstools -z /vmfs/devices/disks/t10.ATA_____WDC_WD120EFBX2D68B0EN0___________________D7HEMD6N____________  "/vmfs/volumes/SSD_Data/Ubuntu/WD120EFBX2D68B0EN0_D7HEMD6N.vmdk"

Then I added a new SCSI controller to the VM, and added two "existing hard disks" pointing to the VMDK files above to that SCSI controller and booted up the guest.

The guest sees the drives:

# lsblk -lsdk     8:160  0  10.9T  0 disksdl     8:176  0  10.9T  0 disk# ls -la /dev/disk/by-id/lrwxrwxrwx 1 root root    9 Mar 12 18:32 scsi-SATA_WDC_WD120EFBX-68_D7HEA60N -> ../../sdklrwxrwxrwx 1 root root    9 Mar 12 18:26 scsi-SATA_WDC_WD120EFBX-68_D7HEMD6N -> ../../sdl

However adding them to the existing zpool as a new mirror fails:

# zpool add -f Main mirror /dev/disk/by-id/scsi-SATA_WDC_WD120EFBX-68_D7HEA60N /dev/disk/by-id/scsi-SATA_WDC_WD120EFBX-68_D7HEMD6Ncannot label 'sdk': try using parted(8) and then provide a specific slice: -2

It seems like the raw device mapping isn't working properly and the drives aren't actually usable by the guest OS like I want:

# gdisk /dev/disk/by-id/scsi-SATA_WDC_WD120EFBX-68_D7HEA60NGPT fdisk (gdisk) version 1.0.8Warning! Read error 5; strange behavior now likely!Warning! Read error 5; strange behavior now likely!Partition table scan:  MBR: not present  BSD: not present  APM: not present  GPT: not presentCreating new GPT entries in memory.Command (? for help): wFinal checks complete. About to write GPT data. THIS WILL OVERWRITE EXISTINGPARTITIONS!!Do you want to proceed? (Y/N): YOK; writing new GUID partition table (GPT) to /dev/disk/by-id/scsi-SATA_WDC_WD120EFBX-68_D7HEA60N.Unable to save backup partition table! Perhaps the 'e' option on the experts'menu will resolve this problem.Warning! An error was reported when writing the partition table! This errorMIGHT be harmless, or the disk might be damaged! Checking it is advisable.

Did I miss a step somewhere to make the drives usable by the guest? Is what I am trying to do possible?


Viewing all articles
Browse latest Browse all 138

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>