2016-08-22

Possible errors during device creation

When raw device is being created and something goes wrong, usually an error message displayed to the administrator working in his tools is not very explanatory. This may be error message like this:

Could not execute statement.

DISK INIT encountered an error while attempting to open/create the
physical file for device '/dev/sdb1'. Consult the Adaptive Server error
log for more details. For the Cluster Edition, check the error log of
each instance.
SQLCODE=5123
Server=SAP01, Severity Level=16, State=1, Transaction State=0, Line=50
File: "devices.sql", line 1

To verify what happened behind the scene, the best is to log at ASE error log on the server. The default error log location on server SAP01 is:

/opt/sap/ASE-16_0/install/SAP01.log




The log can be large. To display only the end of the log and new incoming error messages use unix tail command:

tail -f /opt/sap/ASE-16_0/install/SAP01.log


Following errors could be generated during raw device creation using that command:

disk init name=BetaLogDev3, physname ='/dev/sdb6', size=51200


00:0006:00000:00025:2016/08/22 20:52:32.92 kernel  basis_dsizecheck: attempt to open device '/dev/sdb1' failed, system error is: Permission denied

As error states this is a permission issue. Account used to run ASE needs to have Read+Write permission to the device. This can be assured also by changing the owner of the device to the user running SAP. See Raw device creation for details.

00:0006:00000:00025:2016/08/22 20:55:19.01 kernel  basis_dsizecheck: attempt to seek to page 50999 on device '/dev/sdb1' failed, system error is: Invalid argument

Invalid argument error is quite enigmatic. In this case the number of pages (size argument) was bigger than the size available on the device. Yes, I agree. Error message could be better. See Raw device creation on information, how to calculate maximal correct raw device size having size of the partition displayed by fdisk.

00:0006:00000:00025:2016/08/22 21:10:24.49 kernel  basis_dsizecheck: attempt to write page 48640 on device '/dev/sdb6' failed, system error is: No space left on device

No space left on device is easier to understand. Simple too big number of pages (parameter size) was passed to the init disk command, what caused ASE would exceed the size of partition. Again see Raw device creation on information, how to calculate maximal correct raw device size having size of the partition displayed by fdisk.


No comments:

Post a Comment

SAP Adaprive Server Enterprise

SAP Adaprive Server Enterprise
SAP Adaprive Server Enterprise