I played around with apt-get, and for some reason, the autoremove kicked in and started removing core files, like apache2, php, and mdadm, among many others.
I have since restored SSH access and I managed to re-install mdadm, but the default configuration which was generated seems to be incorrect. updateFirmwareFromFile.sh fails saying “mdadm: /dev/md0 does not appear to be an md device”.
Through reading various forum posts and scripts, I currently presume it should be the following mapping:
/dev/md0 (raid1) → /dev/sda1 missing
/dev/md1 (raid1) → /dev/sda2 missing
Can someone please let me know what the correct configuration should be, and share with me their working /etc/mdadm/mdadm.conf?
This is my current mdadm.conf
# cat /etc/mdadm/mdadm.conf
# mdadm.conf
#
# Please refer to mdadm.conf(5) for information about this file.
#
# by default, scan all partitions (/proc/partitions) for MD superblocks.
# alternatively, specify devices to scan, using wildcards if desired.
DEVICE partitions
# auto-create devices with Debian standard permissions
CREATE owner=root group=disk mode=0660 auto=yes metadata=0.90
# automatically tag new arrays as belonging to the local system
HOMEHOST
# instruct the monitoring daemon where to send mail alerts
MAILADDR root
# definitions of existing MD arrays
ARRAY /dev/md1 level=raid1 num-devices=2 UUID=3c117c46:6731cb8f:ac088234:d9687473
you might have better luck modifying the post below to your current firmware version it basically reinstalls the OS and leaves all the data in the shares intact if on restart the shares are missing just add them via the dashboard and your files will be there.
any software that you installed will be removed keep that in mind
# mdadm.conf
#
# Please refer to mdadm.conf(5) for information about this file.
#
# by default, scan all partitions (/proc/partitions) for MD superblocks.
# alternatively, specify devices to scan, using wildcards if desired.
DEVICE partitions
# auto-create devices with Debian standard permissions
CREATE owner=root group=disk mode=0660 auto=yes metadata=0.9
# automatically tag new arrays as belonging to the local system
HOMEHOST <system>
# instruct the monitoring daemon where to send mail alerts
MAILADDR root
# This file was auto-generated on Thu, 30 Aug 2012 16:25:22 -0700
# by mkconf 3.1.4-1+8efb9d1
thanks for sharing the file. With a bit more fiddling, The firmware upgrade actually succeeded. After looking at it, I realised that it is a generic file which does not contain the actual state of the raid devices. Are you able to share the output of this command?
mdadm --detail /dev/md0 /dev/md1
Thanks!
Mine right now is:
MyBookLive:~# mdadm --detail /dev/md0 /dev/md1
/dev/md0:
Version : 0.90
Creation Time : Sat Dec 28 23:59:17 2013
Raid Level : raid1
Array Size : 1999808 (1953.27 MiB 2047.80 MB)
Used Dev Size : 1999808 (1953.27 MiB 2047.80 MB)
Raid Devices : 2
Total Devices : 1
Preferred Minor : 0
Persistence : Superblock is persistent
Update Time : Sun Dec 29 02:21:31 2013
State : clean, degraded
Active Devices : 1
Working Devices : 1
Failed Devices : 0
Spare Devices : 0
UUID : f862fbc0:6e89a054:c2471910:6f28ccb7
Events : 0.1765
Number Major Minor RaidDevice State
0 8 1 0 active sync /dev/sda1
1 0 0 1 removed
/dev/md1:
Version : 0.90
Creation Time : Sat Dec 28 22:57:55 2013
Raid Level : raid1
Array Size : 1999808 (1953.27 MiB 2047.80 MB)
Used Dev Size : 1999808 (1953.27 MiB 2047.80 MB)
Raid Devices : 2
Total Devices : 1
Preferred Minor : 1
Persistence : Superblock is persistent
Update Time : Sun Dec 29 02:11:28 2013
State : clean, degraded
Active Devices : 1
Working Devices : 1
Failed Devices : 0
Spare Devices : 0
UUID : c2cce916:47c13264:c2471910:6f28ccb7
Events : 0.971
Number Major Minor RaidDevice State
0 0 0 0 removed
1 8 2 1 active sync /dev/sda2
MyBookLive:~# mdadm --detail /dev/md0 /dev/md1
mdadm: cannot open /dev/md0: No such file or directory
/dev/md1:
Version : 0.90
Creation Time : Sun Aug 11 08:29:25 2013
Raid Level : raid1
Array Size : 1999808 (1953.27 MiB 2047.80 MB)
Used Dev Size : 1999808 (1953.27 MiB 2047.80 MB)
Raid Devices : 2
Total Devices : 2
Preferred Minor : 1
Persistence : Superblock is persistent
Update Time : Sun Dec 29 09:09:38 2013
State : clean
Active Devices : 2
Working Devices : 2
Failed Devices : 0
Spare Devices : 0
UUID : g643h76y:hc7653uj:kl0u78tr:n64yt590
Events : 0.154032
Number Major Minor RaidDevice State
0 8 1 0 active sync /dev/sda1
1 8 2 1 active sync /dev/sda2