transforminteractive / alt-f

Automatically exported from code.google.com/p/alt-f

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Disk > Wizard fails to create or activate swap partition on 3TB WD disk

GoogleCodeExporter opened this issue · comments

What steps will reproduce the problem?
1. Put a fresh Disk (WD Green 3TB) into the otherwise empty NAS - The disk 
shows up as expected
2. Navigate to Disk > Wizard and select standard, ext4 and speak the magic word

I expect the procedure to succeed, but instead it gets stuck at the first or 
second line (I don't remember exactly, something along the lines of trying to 
initialize partitions). Nothing in the logs on the status page about that.

When I check Disk > Filesystems. I see that the GPT swap and data partitions 
have been created. There is not way to format or activate the swap partition so 
I have a look at the data one (assuming that the swap partition is fine).
So when I try to manually format that data partition with ext4 on the 
Filesystems page, it gives me the following error message:
"""
Formating sda2 with ext4 failed with code 1: mke2fs 1.41.14 (22-Dec-2010)
fs_types for mke2fs.conf resolution: 'ext4'
/dev/sda2: Memory allocation failed while setting up superblock
"""
I reboot to see if that fixes the issue but no dice.

From googling, understand that this is because mke2fs does run out of RAM.  So 
I ssh into the NAS. "free" shows that there is no swap. So I executed "mkswap 
/dev/sda1" and then "swapon /dev/sda1", so that "free" shows me the 512 MB swap 
available.
Going back to the Disk > Filesystems page in the admin web interface the swap 
partition has now disappeared and I can format the data partition successfully.

Alt-F 0.1RC3, flashed.

My DNS-323 is a Rev-C1.

Issue 11 seems to be related:
https://code.google.com/p/alt-f/issues/detail?id=11
Or perhaps my one here is actually a duplicate of that one. But I wanted to 
create a new one to keep things tidy.

Original issue reported on code.google.com by bethke.a...@gmail.com on 28 May 2013 at 10:37

> I don't remember exactly, something along the lines of trying to initialize 
partitions

Without knowing exactly where it fails it is impossible to fix it.
As nobody else complained...

From your description, the partitioning succeeds, but the swap was not created 
and activated

For GPT, you could get errors like:

GPT partitioning disk ...
Error creating swap:
Error creating first partition
Error creating second partition

Creating and activating swap in disk
some mkswap error
some swapon error

Not knowing which one happened and what the error was makes it impossible to 
fix.

The following errors are a consequence of that one.

> So I executed "mkswap /dev/sda1" and then "swapon /dev/sda1"

Those are the commands executed by the wizard.

Perhaps you could try to replicate the bug, dealing only with the swap 
partition, not the data partition?
The following are the commands executed by the wizard regarding creating and 
activating swap, if you could try then after stopping running services and 
turning swap off could help diagnose the problem:

Assuming that the disk device is 'sda' and the swap partition is the first one, 
start by turning off swap:

swapoff /dev/sda1

then copy/paste the following commands:

i=/dev/sda
echo "Creating and activating swap in disk $(basename $i)..."
res="$(mkswap ${i}1 2>&1)"
if test $? != 0; then
    echo "mkswap error: $res"
else
    res="$(swapon -p 1 ${i}1 2>&1)"
    if test $? != 0; then
        echo "swapon error: $res"
    else
        echo " done."
    fi
fi

What is printed?

Anyway, this should be reported in sourceforge, 
https://sourceforge.net/p/alt-f/_list/tickets, as the previous issue says

Thanks

Original comment by whoami.j...@gmail.com on 2 Jun 2013 at 4:44

Re-created the ticket in Sourceforge: https://sourceforge.net/p/alt-f/tickets/1/

You might want to consider something like updating the "Issues" link on the 
home page to go to the Sourceforge issue tracker though if you want people to 
post in the right place straight away ;)

++Alex

Original comment by bethke.a...@gmail.com on 3 Jun 2013 at 9:42

moved to sourceforge
Thanks

Original comment by whoami.j...@gmail.com on 4 Jun 2013 at 2:09

  • Changed state: Duplicate