SmartDisk won't start and the following is returned on the open linux terminal:
***** 4354 1342507688.756787 LOGDB Failed SQL insert into log table: 11 0 'database disk image is malformed'
***** 4354 1342507688.757317 LOGDB Failed SQL finalise : 11 0 'database disk image is malformed'
***** 4354 1342507688.757355 LOGD Failed to LogMessageObject
***** 4354 1342507688.757385 LOGD Failed logd store
***** 4354 1342507688.757417 LOGD Failed to LogMessageLoop
***** 4353 1342507688.757531 LOCALMSG Start of Day process 'logd' disconnected unexpectedly
***** 4353 1342507689.13341 LOCALMSG Failed to find record of destination context 9223372036854775807. Discarding message
***** 4353 1342507689.84957 LOCALMSG Failed to find record of destination context 9223372036854775807. Discarding message
***** 4353 1342507708.315750 NET TCP connection reset or aborted on socket '12' : 104:
***** 4353 1342507708.315778 MESSAGE Failed when trying to receive bytes of fixed size part of message with IO context
***** 4353 1342507708.315785 LOCALMSG Error receiving messages from context 9223372036854775805
***** 4353 1342507717.337718 LOCALMSG Failed to find record of destination context 9223372036854775807. Discarding message
The terminal trace shows that NVSD is exiting because it's logd process is failing to write to the logs database.
The NVSD Logs database is comprised of the following file: /usr/smartdisk/foundation/var/logd.log
As operations and transactions occur, the logd daemon creates and stores log messages in this internal SQLITE3 database.
However here, INSERTS to the log database are not possible, while the content can still be queried using the 'smartdisk.sh logs command.
Since updating the logd database is required to maintain NVSD started, Smartdisk stops running.
Investigations showed the disk hosting the logs database had suffered an I/O problem and went read only, causing the log database to become 'malformed'.
To allow SmartDisk to start, perform the following:
* Ensure that all SmartDisk processes are stopped (e.g. ps -fu <smartdisk_user>).
* Rename or move the current logd.log database file (/usr/smartdisk/foundation/var/logd.log).
* Restart SmartDisk.
* SmartDisk should create a new logd database and remain running.
Note: Log history from installation to the failure will be lost, but future logging will be possible.