May 12May 12 Community Expert Hoping someone can help because my server is in a state I cannot fix myself.Background:spent a couple of days dealing with a flaky SAS expander causing drives to drop. Did some disk swaps to stabilise things, eventually used Tools > New Config to fully remove array slots 14 and 17 (parity-valid ticked). Array itself is fine now - 15 disks DISK_OK, dual parity, completed clean correcting parity check.The problem:emhttpd is in a broken state where it actively wipes share state. All my current shares as missing not showing or mounted, and unable to create any new sharesSymptoms:- /var/local/emhttp/shares.ini gets written as 0 bytes on every array start- If I manually populate shares.ini, emhttpd zeros it out again within seconds- var.ini shows shareCount="0" regardless of how many .cfg files exist- Shares page in GUI shows nothing- cmdShareApply and cmdShareDelete via emcmd return "500 Internal Server Error"- cmdShareAdd does create a .cfg file on flash but doesn't update internal state- At one point during today's debugging cycles, emhttpd actively DELETED the share .cfg files from /boot/config/shares/ - I have no record of intentionally deleting them via UIWhat still works:- shfs is partially functional - /mnt/user/<sharename>/<path> all work fine for direct access- ls /mnt/user/ itself returns "Structure needs cleaning" (readdir on root broken)- All Docker containers using bind mounts to specific share paths work normally- All data accessible, no data lossWhat I've tried:- Multiple stop/start array cycles - no change- Multiple full reboots - no change- Downgraded 7.2.6 to 7.2.5 - identical behaviour on both- Deleted /boot/config/shares/ and let it regenerate - no change- Killed shfs and relaunched with -o remember=330 (default seems to be 0) - readdir still broken- Another New Config - no change- Manually populated shares.ini from cfg file values - works briefly in UI sort of until emhttpd wipes it, but they didn't mount.I have a strong suspicion this state was triggered by the New Config that removed slots 14 and 17, but I cannot prove this. I'd not used the shares in a while before that so the broken state could have predated it like when i upgraded to 7.2.6.Cheersmediaserver-diagnostics-20260512-1834.zip Edited May 12May 12 by emub formatting and correctness.
May 14May 14 Author Community Expert Solution Update - resolved. The empty syslog you flagged was because /boot/config/rsyslog.conf (and /etc/rsyslog.conf) had data corruption - bit-flipped characters throughout config which disabled the file-output rules. Reconstructed a minimal clean config and restarted rsyslogd. I replaced a corrupted USB Stick a long while ago, must have brought over bad config, I don't think syslog has been working for a long time.The new logs immediately showed the actual culprit: XFS metadata corruption on disk 12, looping every second: XFS (md12p1): Metadata corruption detected.Stopped array, started in maintenance mode, ran xfs_repair on /dev/md12p1. A few items moved to lost+found, mostly recoverable TV/movie folders. Started array normally and all 11 shares immediately came back. after xfs_repair on disk 12 and array restart, shares appeared in the GUI but SMB still wasn't exporting them (smb-shares.conf was 0 bytes, shareSMBCount=0). Triggering a single cmdEditShare=Apply via emcmd against any one share caused emhttpd to regenerate smb-shares.conf for all 8 SMB-exported shares, and they're all now visible again.
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.