swap no prepared after recovery

42 views
Skip to first unread message

Carlos Herrador

unread,
Feb 18, 2014, 10:55:53 PM2/18/14
to al...@googlegroups.com
Hi João:

First let me thanks for this amazing Firmware and your dedication.

I want to point out about maybe an addition to the Wiki page (http://sourceforge.net/p/alt-f/wiki/How%20to%20fix%20a%20degraded%20RAID1%20array/) or something maybe need to be corrected on the firmware. I had 2 2TB Seagate HD installed on a DNS-323 and Alt-F2 with RAID 1, one of the HD suddenly started go offline. I checked everything fine, added it again to the RAID and it was no complain, 3 days later, it happens again. So I decided to replace it, but then I decided to replace both with WD 2TB Red.

I followed you instructions on your Wiki. I did it even hot-plug so people was keep working on the NAS. I did it twice to complete both HD. Everything worked as it supposed. And kept working for almost 4 months, until yesterday that I need to reboot the NAS because we need to power down the rack. When it came back the /dev/md0 was mounted as RO and the FSCK said "30 mounts or -15 days". So I guess it needed to run fsck, but why it didn't do it automatic?

When I look on the boot.log I saw that the fsck was terminated because not enough memory. Then further I noticed that Swap memory showed 0. Then I telnet on the box and ran "free" , sure enough there was no swap, did "cat /proc/swaps" also it came empty. So I tough maybe swap were off for a weird reason. So I ran "swapon /dev/sda1" and it returns 'swapon: /dev/sda1: Invalid argument'. The partitions where copied properly, but I guess the GUI script forgot to prepare the swap partitions, so at the end I ran these commands:

mkswap /dev/sda1
mkswap /dev/sdb1
swapon /dev/sda1
swapon /dev/sdb1

Ran "free" and I was able to confirm that the swap memory was working now. Then I went to the GUI Disk->Filesystem and "unmount" the md0, removed the "ro" from the "mount options" and choose the operation "mount". Then I was able to see now that it was running the check, I was also able to see the fsck.ext4 process running on the telnet using "top". I took some 30 minutes to complete, and everything came back to normal.

Now that everything is up and running I upgraded to RC3, but I not sure if this new firmware will have the same problem. I'm just pointing out this just in case the RC3 need this correction and maybe add this extra steps on the Wiki.

Thanks aging for this wonderful firmware.

João Cardoso

unread,
Feb 20, 2014, 9:58:24 AM2/20/14
to al...@googlegroups.com


On Wednesday, February 19, 2014 3:55:53 AM UTC, Carlos Herrador wrote:
Hi João:

First let me thanks for this amazing Firmware and your dedication.

I want to point out about maybe an addition to the Wiki page (http://sourceforge.net/p/alt-f/wiki/How%20to%20fix%20a%20degraded%20RAID1%20array/) or something maybe need to be corrected on the firmware. I had 2 2TB Seagate HD installed on a DNS-323 and Alt-F2 with RAID 1, one of the HD suddenly started go offline. I checked everything fine, added it again to the RAID and it was no complain, 3 days later, it happens again. So I decided to replace it, but then I decided to replace both with WD 2TB Red.

I followed you instructions on your Wiki. I did it even hot-plug so people was keep working on the NAS. I did it twice to complete both HD. Everything worked as it supposed. And kept working for almost 4 months, until yesterday that I need to reboot the NAS because we need to power down the rack. When it came back the /dev/md0 was mounted as RO and the FSCK said "30 mounts or -15 days". So I guess it needed to run fsck, but why it didn't do it automatic?

When I look on the boot.log I saw that the fsck was terminated because not enough memory. Then further I noticed that Swap memory showed 0. Then I telnet on the box and ran "free" , sure enough there was no swap, did "cat /proc/swaps" also it came empty. So I tough maybe swap were off for a weird reason. So I ran "swapon /dev/sda1" and it returns 'swapon: /dev/sda1: Invalid argument'. The partitions where copied properly, but I guess the GUI script forgot to prepare the swap partitions,

Thanks for your detailed report. You diagnose and fixed the issue correctly.

There has been some reports (both in the forum and in under Tickets/Issues) about swap not being created and activated on big (3TB) disks when using the Disk Wizard with RAID1, but I couldn't reproduce them on my smaller disks.

The "copy partition table" operation also creates and activates swap, but obviously it is failing for some reason.

A "Everything you always wanted to know about swap but was afraid to ask" should be added to the wiki :-)

As swap is such an "esoteric" thing, much more esoteric than disk partitions and filesystems, I tend to hide it in Alt-F, but I have to revise that design decision, perhaps adding an extra "Activate Swap" option as a failsafe in the Disk Partitioner.

 
so at the end I ran these commands:

mkswap /dev/sda1
mkswap /dev/sdb1
swapon /dev/sda1
swapon /dev/sdb1

Ran "free" and I was able to confirm that the swap memory was working now. Then I went to the GUI Disk->Filesystem and "unmount" the md0, removed the "ro" from the "mount options" and choose the operation "mount". Then I was able to see now that it was running the check, I was also able to see the fsck.ext4 process running on the telnet using "top". I took some 30 minutes to complete, and everything came back to normal.

Now that everything is up and running I upgraded to RC3,

ah, just checked it, and under RC2 the "copy partition table" operation didn't create and activate swap.
 
but I not sure if this new firmware will have the same problem. I'm just pointing out this just in case the RC3 need this correction and maybe add this extra steps on the Wiki.

That's OK, thanks
Reply all
Reply to author
Forward
0 new messages