How To Mount USD External Storage Drive on to ESXi 5.5 Host for VM backup - usb

How To Mount USD External Storage Drive on to ESXi 5.5 Host for VM backup
After USB Drive plugin, "esxcli storage core device list" shows there is a usb drive attached. But unable to access it.
"esxcli storage core device list "
mpx.vmhba38:C0:T0:L0
Display Name: Local USB Direct-Access (mpx.vmhba38:C0:T0:L0)
Has Settable Display Name: false
Size: 1907729
Device Type: Direct-Access
Multipath Plugin: NMP
Devfs Path: /vmfs/devices/disks/mpx.vmhba38:C0:T0:L0
Vendor: Seagate
Model: BUP Slim BL
Revision: 0108
SCSI Level: 2
Is Pseudo: false
Status: on
Is RDM Capable: false
Is Local: true
Is Removable: true
Is SSD: false
Is Offline: false
Is Perennially Reserved: false
Queue Full Sample Size: 0
Queue Full Threshold: 0
Thin Provisioning Status: unknown
Attached Filters:
VAAI Status: unsupported
Other UIDs: vml.0000000000766d68626133383a303a30
Is Local SAS Device: false
Is USB: true
Is Boot USB Device: false
No of outstanding IOs with competing worlds: 32
"esxcli storage core path list -d mpx.vmhba38:C0:T0:L0"
usb.vmhba38-usb.0:0-mpx.vmhba38:C0:T0:L0
UID: usb.vmhba38-usb.0:0-mpx.vmhba38:C0:T0:L0
Runtime Name: vmhba38:C0:T0:L0
Device: mpx.vmhba38:C0:T0:L0
Device Display Name: Local USB Direct-Access (mpx.vmhba38:C0:T0:L0)
Adapter: vmhba38
Channel: 0
Target: 0
LUN: 0
Plugin: NMP
State: active
Transport: usb
Adapter Identifier: usb.vmhba38
Target Identifier: usb.0:0
Adapter Transport Details: Unavailable or path is unclaimed
Target Transport Details: Unavailable or path is unclaimed
Maximum IO Size: 122880
Note: I stopped usbarbitrator.
/etc/init.d/usbarbitrator status
usbarbitrator is not running
Please advice.

There are very few USB drives that work directly against an ESXi host, and versions prior to 6.0 had a very strict ruleset against mounting unsupported devices.
I'm assuming you're attempting to mount the USB drive as a VMFS volume, which is unsupported regardless of what version, however there is a list of supported devices that work for passthrough activities. I would assume these could be used as VMFS mounts as well: https://kb.vmware.com/kb/1021345
While it looks like you're following the proper steps, here's a detailed list that may help: https://kb.vmware.com/s/article/2065934
Alternatively, since USB performance is generally pretty slow on ESXi hosts, you could also perform your backup activities on the VM and then SCP the files off the ESXi host to the USB drive.

Related

How to use EKS with suitable volumes and resolve subnet IP insufficient issue on AWS?

I deployed an application in EKS. The deployment always pending, when I checked the events found these issues.
$ kubectl get events
LAST SEEN TYPE REASON OBJECT MESSAGE
89s Warning FailedScheduling pod/awx-demo-111111111-122222 running PreBind plugin "VolumeBinding": binding volumes: provisioning failed for PVC "awx-demo-projects-claim"
49m Warning FailedDeployModel ingress/awx-demo-ingress Failed deploy model due to InvalidSubnet: Not enough IP space available in subnet-031f9c702bc474e8f. ELB requires at least 8 free IP addresses in each subnet.
status code: 400, request id: 11111111-2222-3333-4444-555555555555
32m Warning FailedDeployModel ingress/awx-demo-ingress Failed deploy model due to InvalidSubnet: Not enough IP space available in subnet-01322i912fas0123na. ELB requires at least 8 free IP addresses in each subnet.
status code: 400, request id: 11111111-2222-3333-4444-555555555515
15m Warning FailedDeployModel ingress/awx-demo-ingress Failed deploy model due to InvalidSubnet: Not enough IP space available in subnet-031f9c702bc474e8f. ELB requires at least 8 free IP addresses in each subnet.
status code: 400, request id: 11111111-2222-3333-4444-555555555525
89s Normal WaitForPodScheduled persistentvolumeclaim/awx-demo-projects-claim waiting for pod awx-demo-111111111-122222 to be scheduled
21m Warning ProvisioningFailed persistentvolumeclaim/awx-demo-projects-claim Failed to provision volume with StorageClass "gp2": invalid AccessModes [ReadWriteMany]: only AccessModes [ReadWriteOnce] are supported
It seems there are device issue and subnet issue. I created the EKS cluster and node group with these configurations:
resource "aws_eks_cluster" "this" {
encryption_config {
resources = ["secrets"]
provider {
key_arn = aws_kms_key.this.arn
}
}
enabled_cluster_log_types = ["api", "authenticator", "audit", "scheduler", "controllerManager"]
name = local.cluster_name
version = "1.20"
role_arn = aws_iam_role.eks_cluster.arn
vpc_config {
subnet_ids = [
data.aws_ssm_parameter.private_subnet_0_id.value,
data.aws_ssm_parameter.private_subnet_1_id.value,
]
security_group_ids = [aws_security_group.this.id]
endpoint_public_access = true
}
depends_on = [
aws_iam_role_policy_attachment.eks_cluster_policy,
aws_iam_role_policy_attachment.eks_vpc_resource_controller,
aws_iam_role_policy_attachment.eks_service_policy,
]
tags = merge(
local.tags,
)
}
resource "aws_eks_node_group" "this" {
cluster_name = local.cluster_name
node_group_name = local.node_group_name
node_role_arn = aws_iam_role.eks_nodes.arn
instance_types = ["m5.2xlarge"]
subnet_ids = [
data.aws_ssm_parameter.private_subnet_0_id.value,
data.aws_ssm_parameter.private_subnet_1_id.value,
]
scaling_config {
desired_size = 2
max_size = 2
min_size = 2
}
lifecycle {
ignore_changes = [scaling_config[0].desired_size]
}
depends_on = [
aws_iam_role_policy_attachment.eks_worker_node_policy,
aws_iam_role_policy_attachment.eks_cni_policy,
aws_iam_role_policy_attachment.ec2_container_register_readonly,
]
tags = merge(
local.tags,
)
}
I didn't define the volume type for EBS, maybe it's using the default setting. How to fix the issue?
For the VPC has insufficient IP addresses issue, if create a new subnet for EKS to use, is it necessary to delete the EKS cluster or node group?
By the way, the deployment I used was https://raw.githubusercontent.com/ansible/awx-operator/0.13.0/deploy/awx-operator.yaml.
The install was used https://github.com/ansible/awx-operator#basic-install.
#miantian, Continuing our discussion from the comments:
A subnet size cannot just be increased. If you change the subnet size, it will be recreated. But as the EKS is there, the subnet creation will fail. So, I would say - start fresh. Delete everything and then start fresh.
Regd the volume issue, by default EKS only supports ReadWriteOnce access mode. This is because of the technical limitation of AWS where an EBS volume can only be attached to 1 EC2 instance. If you want to use ReadWriteMany access mode, you need to use EFS.
If you want to use EFS, look up NFS/EFS client provisioner for EKS. There are few steps you need to follow in order to create an EFS provisioner in EKS. Then, you can start using ReadWriteMany access mode.

Raspberry Pi Zero as read write mass storage

I am trying to setup a Raspberry Pi Zero as a mass storage with dwc2 and g_mass_storage (using the last Raspbian image available).
I created the data storage file with dd, made it a FAT32 fs with mkdosfs.
I looked for a lot of things. I spent some time to understand that options should be passed in /etc/modprobe.d/g_mass_storage.conf
It is finally seen in ubuntu. My problem is : it is in read only mode.
I tried to set the ro option to y or n without any impact on the behaviour. I changed permissions on the file (777), it changed nothing.
here is the current content of my /etc/modprobe.d/g_mass_storage.conf file :
options g_mass_storage file=/piusb.bin stall=0 removable=y ro=n
here is the of dmesg from the ubuntu :
[Today and now]usb 1-1.2: new high-speed USB device number 28 using ehci-pci
[ +0,299994] usb 1-1.2: device descriptor read/64, error -71
[ +0,959969] usb 1-1.2: device descriptor read/64, error -71
[ +0,187918] usb 1-1.2: new high-speed USB device number 29 using ehci-pci
[ +0,113925] usb 1-1.2: New USB device found, idVendor=0525, idProduct=a4a5
[ +0,000007] usb 1-1.2: New USB device strings: Mfr=3, Product=4, SerialNumber=0
[ +0,000004] usb 1-1.2: Product: Mass Storage Gadget
[ +0,000003] usb 1-1.2: Manufacturer: Linux 4.19.118+ with 20980000.usb
[ +0,001467] usb-storage 1-1.2:1.0: USB Mass Storage device detected
[ +0,000246] usb-storage 1-1.2:1.0: Quirks match for vid 0525 pid a4a5: 10000
[ +0,000283] scsi host9: usb-storage 1-1.2:1.0
[ +1,009528] scsi 9:0:0:0: Direct-Access Linux File-Stor Gadget 0419 PQ: 0 ANSI: 2
[ +0,001079] sd 9:0:0:0: Attached scsi generic sg5 type 0
[ +0,001699] sd 9:0:0:0: Power-on or device reset occurred
[ +0,001211] sd 9:0:0:0: [sde] 67108864 512-byte logical blocks: (34.4 GB/32.0 GiB)
[ +0,000672] sd 9:0:0:0: [sde] Write Protect is on
[ +0,000016] sd 9:0:0:0: [sde] Mode Sense: 0f 00 80 00
[ +0,000740] sd 9:0:0:0: [sde] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[ +0,005478] sde:
[ +0,002735] sd 9:0:0:0: [sde] Attached SCSI removable disk
What to do to get a read/write mass storage ?
I reproduced your problem. I had a similar problem with the module g_acm_ms on Raspberry Pi Zero W. If you configure the module in /etc/modprobe.d/, then the system ignores the parameter ro=0. Perhaps this is due to the order of initialization of kernel modules. I got around this by adding the module to the blacklist and writing the initialization in /etc/rc.local. Thus, I managed to get an emulation of a read/write mass storage.
All steps:
Create and format the file:
# dd bs=1M if=/dev/zero of="/piusb.bin" count=2048
# mkdosfs "/piusb.bin"
Add modules-load=dwc2,g_acm_ms to end of /boot/cmdline.txt (after rootwait)
Add the string dtoverlay=dwc2 in /boot/config.txt
Prevent module initialization at startup:
$ echo "blacklist g_acm_ms" | sudo tee -a "/etc/modprobe.d/blacklist-g_acm_ms.conf"
Add initialization in /etc/rc.local above exit 0:
# nano /etc/rc.local
Add string:
/sbin/modprobe file=/piusb.bin removable=y ro=0 stall=0
Reboot system:
# reboot -h
P.S.: If you don't want to use USB for console output, you can use g_mass_storage instead of g_acm_ms.

Bluez 5.37 : Unable to register GATT service with handle

Using Bluez 5.37 bluetoothd. I compile my with flag --disable-systemd.
Using bluetoothctl to connect to my local bluetooth server.
After connecting it does not show any services on dbus.
I can see the following error in bluetoothd log:
bluetoothd[22098]: src/device.c:gatt_debug() start: 0x0001, end: 0x0004, uuid: 00001801-0000-1000-8000-00805f9b34fb
bluetoothd[22098]: src/device.c:gatt_debug() start: 0x0010, end: 0x0015, uuid: 00001827-0000-1000-8000-00805f9b34fb
bluetoothd[22098]: src/device.c:gatt_client_ready_cb() status: success, error: 10
bluetoothd[22098]: src/device.c:device_svc_resolved() /org/bluez/hci0/dev_XX_XX_XX_XX_BA_8F err 0
bluetoothd[22098]: src/gatt-client.c:btd_gatt_client_ready() GATT client ready
bluetoothd[22098]: src/gatt-client.c:create_services() Exporting objects for GATT services: XX:XX:XX:XX:BA:8F
bluetoothd[22098]: Unable to register GATT service with handle 0x0001 for device XX:XX:XX:XX:BA:8F
bluetoothd[22098]: Unable to register GATT service with handle 0x0010 for device XX:XX:XX:XX:BA:8F
On dbus I cannot see any service or characteristics populated. I need to use bluez 5.37, is there any fix for this?
Note: I have masked bd address as XX:XX:XX:XX:BA:8F
This was basically unable to register the objects on dbus interface.
Resolved this by running bluetoothd in "experimental" mode using "E" flag.
like:
./bluetoothd -ndE

Mount BlockStorage Device on Bluemix VM

I have a debian VM deployed at BlueMix, and I want to increase the size of the hard drive mounting a BlockStorage Device.
I followed the instructions on the new Beta BlockStorage Service and created a volume, and then attached it to the VM as a new device, but seems that although the volume is attached to the VM; is not automatically mounted.
I tryed several ways to mount it, but I did not find it the correct way. In fact, I even tryed to clone the line that came on the fstab refering to the root device mounted (I suspected that the additional volume should be similar) but it did not work (even broke the reboot of my machine)... So.. Can someone please advice me how to mount the BlockStorage Bluemix Service on the VM Machine ?
THks!
By attaching a volume you've essentially done the equivalent of plugging a raw, physical hard disk into your system. Before you can mount it you'll have to format it with a filesystem known by your OS.
After attaching the device you should be able to see the raw block device, for example with the lsblk command:
[mysys]# lsblk
sr0 11:0 1 416K 0 rom
vda 252:0 0 20G 0 disk
--vda1 252:1 0 20G 0 part /
vdb 252:16 0 25G 0 disk
Typically vda is your root device, so in this example the additional device is vdb with 25GB.
Now you can create a filesystem with the mkfs command, for example:
[mysys]# mkfs.ext4 /dev/vdb
mke2fs 1.41.12 (17-May-2010)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
1638400 inodes, 6553600 blocks
...
mkfs supports different filesystems, so you might want to check the man pages on the system you're using (man mkfs).
Now all that's left is to create a mount point and mount the new filesystem:
[mysys]# mkdir /mnt/test
[mysys]# mount /dev/vdb /mnt/test
The additional space is now available:
[mysys]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/vda1 20G 946M 18G 5% /
tmpfs 1.9G 0 1.9G 0% /dev/shm
/dev/vdb 25G 172M 24G 1% /mnt/test

u-Boot VxWorks TFTP boot failure: " ERROR: booting os 'Unknown OS' (14) is not supported"

I am trying to boot VxWOrks using tftp for zynq.
I have set the enviroment varibles for ipaddr, serverip, netmask accordingly and files are loaded in RAM succesfully. however, i get the following error when trying to boot the vxWorks image. There is not problem with the VxWOrks image as i can successfully boot with these iamges when i write these files to SDcard and boot from the sdcard
zynq-uboot> bootm 0x5000000 - 0x4000000
#ERROR: booting os 'Unknown OS' (14) is not supported"
Here is a complete screen shot
zynq-uboot> setenv ipaddr 192.168.88.169;setenv serverip 192.168.88.88;setenv netmask 255.255.255.0
zynq-uboot> tftp 0x8000000 BOOT.bin
Trying to set up GEM link...
Phy ID: 01410E40
Resetting PHY...
PHY reset complete.
Waiting for PHY to complete auto-negotiation...
Link is now at 1000Mbps!
Using zynq_gem device
TFTP from server 192.168.88.88; our IP address is 192.168.88.169
Filename 'BOOT.bin'.
Load address: 0x8000000
Loading: T ########################
done
Bytes transferred = 345180 (5445c hex)
zynq-uboot> tftp 0x5000000 uVxWorks && tftp 0x4000000 zynq-7000.dtb
Using zynq_gem device
TFTP from server 192.168.88.88; our IP address is 192.168.88.169
Filename 'uVxWorks'.
Load address: 0x5000000
Loading: T T #################################################################
#################################################################
###############################################################
done
Bytes transferred = 2829468 (2b2c9c hex)
Using zynq_gem device
TFTP from server 192.168.88.88; our IP address is 192.168.88.169
Filename 'zynq-7000.dtb'.
Load address: 0x4000000
Loading: #
done
Bytes transferred = 3588 (e04 hex)
zynq-uboot> bootm 0x5000000 - 0x4000000
## Booting kernel from Legacy Image at 05000000 ...
Image Name: vxWorks
Image Type: ARM Unknown OS Kernel Image (uncompressed)
Data Size: 2829404 Bytes = 2.7 MiB
Load Address: 00200000
Entry Point: 00200000
Verifying Checksum ... OK
Loading Kernel Image ... OK
OK
ERROR: booting os 'Unknown OS' (14) is not supported
zynq-uboot> <INTERRUPT>
SOlution:
i had to to load the vxWorks.bin as well and it worked.
zynq-uboot> tftp 0x200000 vxWorks.bin