Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make -v XX verbose option from vmkfstools usable and configurable #203

Open
davidmarquesneves opened this issue Oct 8, 2020 · 0 comments

Comments

@davidmarquesneves
Copy link

Some times is difficult to find an error on vmkfstools phase, like a bad block on a storage, the returned error is a generic error.

Using -v 10 on vmkstools line, like above, you can watch and find the error, but when ghettoVCB.sh runs on CRON schedule, the captured log does not includes the debug lines from vmkfstools:

Lines changed:

if [[ -z "${FORMAT_OPTION}" ]] ; then
logger "debug" "${VMKFSTOOLS_CMD} -i "${SOURCE_VMDK}" -a "${ADAPTER_FORMAT}" "${DESTINATIO
${VMKFSTOOLS_CMD} -v 10 -i "${SOURCE_VMDK}" -a "${ADAPTER_FORMAT}" "${DESTINATION_VMDK}" > "${V
else
logger "debug" "${VMKFSTOOLS_CMD} -i "${SOURCE_VMDK}" -a "${ADAPTER_FORMAT}" -d "${FORMAT_
${VMKFSTOOLS_CMD} -v 10 -i "${SOURCE_VMDK}" -a "${ADAPTER_FORMAT}" -d "${FORMAT_OPTION}" "${DES
fi

Log from ssh:

2020-10-08 17:34:50 -- debug: /sbin/vmkfstools -i "/vmfs/volumes/SYS/postgresql/postgresql_1.vmdk" -a "lsilogic" -d "thin" "/vmfs/volumes/nfs_storage_backup/VMsESXi/postgresql/postgresql-2020-10-08_17-34-46/postgresql_1.vmdk"
Option --adaptertype is deprecated and hence will be ignored
DISKLIB-VMFS : "/vmfs/volumes/5b1e9ba8-051c6516-61b9-000af79f7736/postgresql/postgresql_1-flat.vmdk" : open successful (269) size = 68719476736, hd = 0. Type 3
DISKLIB-VMFS : "/vmfs/volumes/5b1e9ba8-051c6516-61b9-000af79f7736/postgresql/postgresql_1-flat.vmdk" : closed.
DISKLIB-VMFS : "/vmfs/volumes/5b1e9ba8-051c6516-61b9-000af79f7736/postgresql/postgresql_1-flat.vmdk" : open successful (14) size = 68719476736, hd = 30050636. Type 3
DISKLIB-DSCPTR: Opened [0]: "postgresql_1-flat.vmdk" (0xe)
DISKLIB-LINK : Opened '/vmfs/volumes/5b1e9ba8-051c6516-61b9-000af79f7736/postgresql/postgresql_1.vmdk' (0xe): vmfs, 134217728 sectors / 64 GB.
DISKLIB-LIB : Opened "/vmfs/volumes/SYS/postgresql/postgresql_1.vmdk" (flags 0xe, type vmfs).
Destination disk format: VMFS thin-provisioned
Cloning disk '/vmfs/volumes/SYS/postgresql/postgresql_1.vmdk'...
DISKLIB-LIB_CREATE : CREATE: "/vmfs/volumes/nfs_storage_backup/VMsESXi/postgresql/postgresql-2020-10-08_17-34-46/postgresql_1.vmdk" -- vmfs capacity=0 (0 bytes) adapter=lsilogic info=cowGran=0 allocType=1 objType=file policy=''
DISKLIB-LIB_CLONE : Failed to clone disk using Object Cloning
DISKLIB-LIB_CREATE : CREATE: "/vmfs/volumes/nfs_storage_backup/VMsESXi/postgresql/postgresql-2020-10-08_17-34-46/postgresql_1.vmdk" -- vmfs capacity=134217728 (64 GB) adapter=lsilogic info=cowGran=1 allocType=1 objType=file policy=''
DISKLIB-LIB_CREATE : CREATE: Creating disk backed by 'file'
Clone: 9% done.DISKLIB-DSCPTR: "/vmfs/volumes/nfs_storage_backup/VMsESXi/postgresql/postgresql-2020-10-08_17-34-46/postgresql_1.vmdk" : creation successful.
DISKLIB-VMFS : "/vmfs/volumes/58faf333-7d1c1e7c/VMsESXi/postgresql/postgresql-2020-10-08_17-34-46/postgresql_1-flat.vmdk" : open successful (1) size = 68719476736, hd = 0. Type 3
DISKLIB-VMFS : "/vmfs/volumes/58faf333-7d1c1e7c/VMsESXi/postgresql/postgresql-2020-10-08_17-34-46/postgresql_1-flat.vmdk" : closed.
DISKLIB-VMFS : "/vmfs/volumes/58faf333-7d1c1e7c/VMsESXi/postgresql/postgresql-2020-10-08_17-34-46/postgresql_1-flat.vmdk" : open successful (520) size = 68719476736, hd = 14387536. Type 3
DISKLIB-DSCPTR: Opened [0]: "postgresql_1-flat.vmdk" (0x208)
DISKLIB-LINK : Opened '/vmfs/volumes/58faf333-7d1c1e7c/VMsESXi/postgresql/postgresql-2020-10-08_17-34-46/postgresql_1.vmdk' (0x208): vmfs, 134217728 sectors / 64 GB.
DISKLIB-LIB : Opened "/vmfs/volumes/nfs_storage_backup/VMsESXi/postgresql/postgresql-2020-10-08_17-34-46/postgresql_1.vmdk" (flags 0x208, type vmfs).
DDB: "longContentID" = "a6dc18fbfadb424d517df8730cdd7135" (was "f00693ec0ca7f901ab0b7fecfffffffe")
DISKLIB-LINK : DiskLinkNativeVmfsCloneExisting: Failed to create native clone. (24).
DISKLIB-LIB_CLONE : Failed to create native clone on destination handle : The specified feature is not supported by this version (24).
OBJLIB-FILEBE : FileBEIoctl: ioctl operation IOCTLCMD_VMFS_XCOPY_TRANSFER_SIZE(3077) failed on '/vmfs/volumes/58faf333-7d1c1e7c/VMsESXi/postgresql/postgresql-2020-10-08_17-34-46/postgresql_1-flat.vmdk' : Inappropriate ioctl for device (1638402)
Clone: 11% done.

Log from email:

2020-10-08 17:05:04 -- debug: findVMDK() - Searching for VMDK: "postgresql_1.vmdk" to backup
2020-10-08 17:05:04 -- debug: /sbin/vmkfstools -i "/vmfs/volumes/SYS/postgresql/postgresql_1.vmdk" -a "lsilogic" -d "thin" "/vmfs/volumes/nfs_storage_backup/VMsESXi/postgresql/postgresql-2020-10-08_17-05-00/postgresql_1.vmdk"

@davidmarquesneves davidmarquesneves changed the title Make -v XX option from vmkfstools usable and configurable Make -v XX verbose option from vmkfstools usable and configurable Oct 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant