md0 degraded on DNS-320 Alt-F 1.0

109 views
Skip to first unread message

Unit-cap

unread,
Apr 28, 2020, 7:46:21 AM4/28/20
to Alt-F
Hi all,
I have an DNS-320 with Alt-F 1.0 on it. I have two 1TB disks run in RAID1. I have had not a single problem with this setup for 8 years until a few weeks ago when I got the error message. I have read that this md0 is created by the system for a swap.  The question: is that a way to fix this downgraded state? I cannot do anything under disk operations as it says that it is currently being used and I cannot stop the array and therefor cannot start to repair the raid for md0. I appreciate any help.
Thanks!
Cap


João Cardoso

unread,
Apr 28, 2020, 3:13:49 PM4/28/20
to Alt-F


On Tuesday, 28 April 2020 12:46:21 UTC+1, Unit-cap wrote:
Hi all,
I have an DNS-320 with Alt-F 1.0 on it. I have two 1TB disks run in RAID1. I have had not a single problem with this setup for 8 years until a few weeks ago when I got the error message. I have read that this md0 is created by the system for a swap.  The question: is that a way to fix this downgraded state? I cannot do anything under disk operations as it says that it is currently being used and I cannot stop the array and therefor cannot start to repair the raid for md0. I appreciate any help.

If you are command line aware:

mdadm --fail /dev/md0 /dev/sda1 # sda1 has already failed on md0, but nevertheless...
mdadm
--remove /dev/md0 /dev/sda1 # remove sda1 from md0 array
mdadm
--zero-superblock /dev/sda1 # erase raid metadata from sda1
mdadm
--add /dev/md0 /dev/sda1 # re add sda1 to the md0 array


The above will work for sure, the first two steps might give errors, ignore them. Some steps could be avoided depending on current state. As it is a small swap, recovery will be fast. swap does not involve your data.

If you are not command line inclined, use Disk->Utilities, and hit the Recreate  button. Read the tooltip. This procedure will convert a RAID swap to normal swap, while the former will maintain the swap on RAID.

Unit-cap

unread,
Apr 28, 2020, 6:07:10 PM4/28/20
to Alt-F
Many thanks João for the prompt response!
I went for the second (Recreate) option which worked fine, however then I thought that it may make sense to have the array for md0 again as before but then - obviously - the command line option (option 1) did not work anymore.. Can I recreate the array somehow? Does it really make sense to have the array for md0 swap from your opinion? Should this swap to be even increased to have better performance?
thanks and regards (I will have no further questions I promise :)
Cap

João Cardoso

unread,
Apr 29, 2020, 11:56:57 AM4/29/20
to Alt-F


On Tuesday, 28 April 2020 23:07:10 UTC+1, Unit-cap wrote:
Many thanks João for the prompt response!
I went for the second (Recreate) option which worked fine, however then I thought that it may make sense to have the array for md0 again as before but then - obviously - the command line option (option 1) did not work anymore.. Can I recreate the array somehow? Does it really make sense to have the array for md0 swap from your opinion? Should this swap to be even increased to have better performance?

This question is  addressed on a recent topic.

To create swap over a RAID using sda1 and sda2, from info from your previous posts (and as such this is not a recipe)
In the code following, you can use instead of md5 your next non used md device, such as md1 or md2... look in the RAID webUI for the next suggested Dev. name in the RAID Creation section. But using md5 is also fine. No need for reboots.

swapoff -a # stops swap
sed
-i '/swap/d' /etc/fstab # remove swaps entries from fstab
mdadm --create /dev/md5 --run --metadata=1.0 --level=1 --raid-devices=2 /dev/sda1 /dev/sdb1 # creates md5 using sda1 and sda2

mkswap /dev/md5 # create swap on the new md5
echo "/dev/md5 none swap pri=1 0 0" >> /etc/fstab # update /etc/fstab
swapon -a -p1 # start swap


Unit-cap

unread,
Apr 30, 2020, 5:05:51 AM4/30/20
to Alt-F
Many thanks Joao, it worked perfectly! I mark this as complete.
Reply all
Reply to author
Forward
0 new messages