Orbi WiFi 7 RBE973
Reply

"Shares" -> database disk image is malformed #24667995

newgen1
Aspirant

"Shares" -> database disk image is malformed #24667995

Hi All

If I click in Frontview to the Mainmenu Navigation "Shares" I get the Error 1001040005:
Failed DB Query for SELECT FROM share. sql=SELECT S.id,S.name,S.comment,S.path,S.non_owner_delete,IFNULL((SELECT U.id FROM `$user` U WHERE U.id=S.user_id),S.user_id),CASE WHEN S.user_access&2=2 THEN ReadWrite WHEN S.user_access&4=4 THEN ReadOnly ELSE Disabled END,(SELECT G.id FROM `$group` G WHERE G.id=S.group_id),CASE WHEN S.group_access&2=2 THEN ReadWrite WHEN S.group_access&4=4 THEN ReadOnly ELSE Disabled END,CASE WHEN S.everyone_access&2=2 THEN ReadWrite WHEN S.everyone_access&4=4 THEN ReadOnly ELSE Disabled END,S.volume_id,ZS.available/1048576,ZS.used/1048576,ZS.usedbychildren/1048576,ZS.usedbydataset/1048576,ZS.usedbyrefreservation/1048576,ZS.usedbysnapshots/1048576,ZS.compressratio,ZA.mb_quota,ZA.mb_reservation,ZA.mb_refquota,ZA.mb_refreservation,ZA.compression,ZA.dedup,S.type,S.zfs_name,(SELECT COUNT(*) FROM `$snapshot` SS WHERE SS.zfs_name=S.zfs_name AND type=1),(SELECT COUNT(*) FROM `$snapshot` SS WHERE SS.zfs_name=S.zfs_name AND type=2),(SELECT MIN(SS.created_on) FROM `$snapshot` SS WHERE SS.zfs_name=S.zfs_name),(SELECT MAX(SS.created_on) FROM `$snapshot` SS WHERE SS.zfs_name=S.zfs_name),S.migrate_to_volume_id,ZA.logbias,ZA.origin,S.visible_snapdir,IFNULL(ZA.sync,standard),STRFTIME(%s,S.update_ts),(SELECT IFNULL(MAX(PS.blocking)+1,0) FROM `process_on_share` PS WHERE PS.share_id=S.id),ZS.referenced/1048576,(SELECT S.volume_id||/||SC.parent_zfs_name||@||SC.parent_snapshot_name),ZA.bit_rot_protection FROM share S LEFT JOIN cifs_share_option CIFS ON S.id=CIFS.share_id LEFT JOIN _zfs_stat ZS ON ZS.share_id=S.id LEFT JOIN zfs_attr ZA ON ZA.share_id=S.id LEFT JOIN `$snapshot_clones` SC ON SC.cloned_zfs_name=S.name WHERE S.type=share ORDER BY S.name COLLATE NOCASE ==> 11 (database disk image is malformed)


If I click in the Navigation "iSCSI" I get an empty Error Lightbox.

Everything else seems to work normal.

What I tried:
- reboot
- OS reinstall
- Deactivated Antivirus scanner
- Deactivated some Apps

The Device:
- RN314
- Firmware 6.2.2

I'm happy for any idea to fix this issue.
Message 1 of 8
newgen1
Aspirant

Re: Frontview click "Shares" -> database disk image is malfo

something more..

The above SQL executed with
# sqlite3 /var/readynasd/db.sq3
on shell results in the error:
no such table: _zfs_stat


And right.. There is no table _zfs_stat.
Checked in sqlite3 with:
SELECT name FROM sqlite_master WHERE type='table';
Message 2 of 8
mdgm-ntgr
NETGEAR Employee Retired

Re: Frontview click "Shares" -> database disk image is malfo


# systemctl stop readynasd
# cd /var/readynasd
# mv db.sq3 db.sq3.old
# mv event.sq3 event.sq3.old
# mv smart.sq3 smart.sq3.old
# systemctl start readynasd
Message 3 of 8
newgen1
Aspirant

Re: Frontview click "Shares" -> database disk image is malfo

great, now it works again as expected.
thank you very much!
Message 4 of 8
mdgm-ntgr
NETGEAR Employee Retired

Re: "Shares" -> database disk image is malformed #24667995

Note that if you use snapshots the new database won't have the snapshots listed in it.
Message 5 of 8
newgen1
Aspirant

Re: "Shares" -> database disk image is malformed #24667995

Yes I have seen that all Shares have 0 Snapshots.
Can I reset the existing snapshot files or cleans it itself?
Message 6 of 8
mdgm-ntgr
NETGEAR Employee Retired

Re: "Shares" -> database disk image is malformed #24667995


# systemctl stop readynasd
# sqlite3 /var/readynasd/old/db.sq3 '.dump | grep "\$snapshot"' | grep "INSERT INTO"
# sqlite3 /var/readynasd/old/db.sq3 '.dump | grep "\$snapshot"' | grep "INSERT INTO" | sqlite3 /var/readynasd/db.sq3
# systemctl start readynasd
Message 7 of 8
newgen1
Aspirant

Re: "Shares" -> database disk image is malformed #24667995

nice
with
sqlite3 /var/readynasd/db.sq3.old '.dump' | grep "\$snapshot" | grep "INSERT INTO"
sqlite3 /var/readynasd/db.sq3.old '.dump' | grep "\$snapshot" | grep "INSERT INTO" | sqlite3 /var/readynasd/db.sq3

the snapshots are back
Message 8 of 8
Top Contributors
Discussion stats
  • 7 replies
  • 2820 views
  • 0 kudos
  • 2 in conversation
Announcements