Windows cannot see my dns-323 with Alt-F firmware

6,040 views
Skip to first unread message

TKenny

unread,
Mar 6, 2011, 4:31:41 PM3/6/11
to Alt-F
I posted this issue over here and thought I might spam you all with it
as well. I think I am having problems getting the snmp package to run
on my dns-323 A1 with alt-f firmware (I used the Alt-F-0.1B6+.bin).

http://forum.dsmg600.info/viewtopic.php?id=6430

Can anyone here give me any pointers? Am I on the right track?
Thanks

Joao Cardoso

unread,
Mar 6, 2011, 5:42:39 PM3/6/11
to Alt-F
Is the samba server running? Services->Network->smb

You should be able to see the nas, probably without shares, just
browse the network.
Also note that Alt-F does not has a uPnP advertising client, in
contrary to the vendor's firmware. Its purpose is only to publish the
box webserver, but you do not seem to have problems with that.

Have you created an user? It is needed in order to create the Users
directory/share. The Public share is also created at the same time.
The Backup share is created when the first backup is schedule.

Other shares have to be created manually, either using the simplified
smb->configure page, or using swat, accessible through the "advanced"
smb->configure button.

The default /etc/samba/smb.conf file has those shares in the
unavailable state, they are changed to available when you perform the
above actions. You can edit the file and make "available = yes", then
execute "rcsmb reload" in order for the samba server to reread the
configuration file (no need to reboot).

The ffp service is always stopped... kind of.
It runs once at boot (and when you hit the startIt button), executing
only

/ffp/etc/rc start

You must manually set the execute permission of the ffp services that
you which to activate. You must only enable the ffp services that you
really need, in order to not generate conflicts.
When Alt-F installs ffp, it disables *all* ffp services, just for
safety.

The "User script" is also alway stopped.
It is executed on boot (and when you hit the startIt button) and
generates the alt-f.log file that you can find in the root of all
filesystems.
I'm not sure if in 0.1B6+ you can specify in the web page a user
script (that you must write) that will also be run. In B7 it will.

The "S30backup" issue: the message appears if no /etc/backup.conf file
exists, which happens when you have not schedule a backup.

The snmpd issue is ffp related.

Have I miss anything?

TKenny

unread,
Mar 6, 2011, 7:10:39 PM3/6/11
to Alt-F
Thanks for the help.

I think when I did the initial flash after "try it", I may have chosen
not to completely clear out my old settings (I wanted to box to stay
on the same IP).

Really, resetting the IP is the easiest thing in the world so I
shouldnt have done this. I should have cleared out everything.

Anyway, I attempted to flash back to the dlink firmware and when the
box rebooted, it immediately came up in "alt-f try-it" mode because I
had set the execute permissions on funplug in the meantime.

Windows could already see the box and I just set up a samba share
(just basic config) and windows could see my shared drives. I didn't
have to set up any users or anything on the web-page

So I flashed the alt-f firmware again, this time trashing all
settings. I repeated the samba setup steps above and things seem to
be OK. I notice if I try to start up snmp manually I still get the
same error, but I have lost interest in that problem since windows now
sees my dns.

So thanks! I really like the opportunities that I now have with this
firmware.

BTW, what is the maximum size of drive I can use with this firmware?
I hear I can add a USB drive and get RAID 5. A set of 3TB drives in
RAID 5 and I'd be a very happy man.

I am about to format some 4k drives in the meantime, will it just
format on a 4k boundary for me or do I have to do anything special?

Thanks again

TKenny

unread,
Mar 6, 2011, 8:32:25 PM3/6/11
to Alt-F
Spoke too soon... Windows suddenly doesn't see the dns-323 again :
( I didnt really change anything, I was just trying to change some
samba permissions one one share and the thing disappeared completely
off my network in windows.

I flashed back to dlink firmware and back again to alt-f and I am not
having much luck getting windows to see it this time around, but I did
notice something...

As I rebooted with the dlink firmware but with the funplug set to load
alt-f, the dns showed up in windows as DLINKDCE43D. It also did this
the time before and then promptly became DNS-323 in the windows
network display. Once the alt-f firmware came up in "try-it" mode, I
could see my samba shares in windows, so I flashed the alt-f firmware
for real again.

It was all good until Windows suddenly stopped seeing the DNS
altogether again.

So Im wondering if the DNS-323 item windows has in its network list
isnt being cached for a while. This would explain why twice now the
alt-f firmware has allowed windows to see the DNS for a short time.
Then after a while, when windows refreshes, it loses the entry because
the alt-a firmware isnt advertising the dns' presense.

This last time I went back and forth between dlink and alt-a
firmwares, windows only shows DLINKDCE43D and I cannot get any samba
shares to show up on it. In wondering if maybe the dlink firmware
didnt have enough time to properly advertise the properly named device
to windows so this time it never even got the DNS-323 setup enough to
allow alt-f to work.

Maybe my idea makes no sense, but before I temporarily give up on
this, I thought I'd throw it out there.

My box is A1 btw

Joao Cardoso

unread,
Mar 6, 2011, 11:16:27 PM3/6/11
to al...@googlegroups.com
On Monday, March 07, 2011 01:32:25 TKenny wrote:
> Spoke too soon... Windows suddenly doesn't see the dns-323 again :

With what version of windows are you working with? XP, Vista, W7?

With dlink's firmware you might be used to see the DNS in the windows explorer
as a uPNP device, together with your printer and disk, but for Alt-F you have
to search the network (network neighbouring?)

Yes, there might be some caching involved, but that is not the issue.

But I don't use windows that much, so I ask someone to help TKenny here.

And, you have saved settings, haven't you?
After creating a user, and yes, you *have* to create a user in order for the
shares to be available, you have to save settings.

Go to Services->Network->smb->configure->advanced, login as user "root" (no
quotes), passwd is the same as for the web pages login, hit the "Shares" item,
select the Users Share, hit Choose Share, browse for Miscellaneous, and see if
available is "yes".

Or, if you dare using the command line, telnet or ssh the box as user root,
then issue the following command:

grep available /etc/samba/smb.conf

It should report available = yes several times

You can also type the following command:

smbtree -N

and you will see all you network computers and shares. There is an equivalent
windows command line, "net something"...

...

> so I flashed the alt-f firmware for real again.

Flashing back and forth is not going to help you, and you increase the
probabilities that anything runs bad.

> > BTW, what is the maximum size of drive I can use with this firmware?

In principle, any size. A user reported that he using 1.5TB disks.

0.1B6 had a problem in the Disk Partitioner page with 1.5TB or 2TB disks, see
the site issues page, all issues, but B6+ has that issue fixed (at least
nobody complained, I don't have disk of that size)

There was also a problem with windows not reporting correctly the size of the
disks, for 2TB disks, but I believe that B6+ also has that fixed.

> > I hear I can add a USB drive and get RAID 5.
> > A set of 3TB drives in
> > RAID 5 and I'd be a very happy man.

A user has already reported success with that configuration.

> > I am about to format some 4k drives in the meantime, will it just
> > format on a 4k boundary for me or do I have to do anything special?

Alt-F formats in 4k boundaries by default, you don't have to do nothing
special.

If you are not going to use the Disk Wizard, that will format *all* your
disks, but will be using the Disk Partitioner instead, don't forget to create
at least one swap partition, 500MB is OK.
In the Advanced view you can tune/trash the partitions start sector at your
will.

TKenny

unread,
Mar 6, 2011, 11:40:21 PM3/6/11
to Alt-F
Thanks a lot for the quick advice again :). I'll let you know how it
goes when I get another crack at this tomorrow.

I'm in Windows 7 btw.

Joao Cardoso

unread,
Mar 9, 2011, 10:38:36 AM3/9/11
to Alt-F

[This is my reply to a private e-mail that TKenny sent to me and
allowed me to post]

On Tuesday, March 08, 2011 15:27:45 you wrote:
> OK, so I did the "try-it" run of the alt-f again last night, and once
> again windows can see the dns-323. I waited around for it to
> disappear off the network again and it didnt so I flashed again.
>
> So far so good. It's a little unnerving that I don't know why things
> went wrong the last few times, but it must just be me spazzing around
> with the samba settings.
>
> Whats really odd is that I didnt add any users. Samba is just working
> after I entered the drives and set the simple permissions on the very
> first screen.

Yes, you can see the DNS, but no shares will be available unless you
add a
user or add a share using the web interface or edit the configuartion
file.

> Perhaps this isnt good security practice, but the way
> the dns-323 worked with original firmware windows users could just
> grab whatever they wanted on it which is fine for my needs anyway.

While PCs are nowadays really personal, i.e., only one person uses it,
the DNS
might be used in a house and shared by several people, so it is
advantagous
for each user to have a share for its own usage, and knowing that
anybody else
can see or modify its content.

Dlink uses samba in the "share" mode, while Alt-F uses it in the
"user" mode.

When a user is created, a share is created for him, and only him, to
use(*); a
Public Read Only share is also created, to put, say, family photos,
and a
Public Read Write shares are also created, so users can exchange data.

(*) If the new user users name is the same as the name he uses in
windows, say
"Joao Cardoso", and the pasword is also the same, he can access its
share
without being prompted for a password.
Linux users name can't have space on them, so the nick name is used
to
autenticate it instead.

> Seems like if I put machines (and the dns) in the same workgroup that
> makes evreything see everything else.

Yes, that is the idea.

> but I'm not very confident about
> my knowledge yet. When I tried to find the dns-323 with a macbook, I
> had to do some additional work to find the samba share, but that
> worked too without any users (seemed to use a guest account).
> Eventually, putting the mac on the same workgroup allowed it to see
> the dns-323 automatically as well.
>
> So hopefully that does it for the upgrade problems. Ill run it for a
> few days before formatting my drives with EXT4 or NTFS

Don't use NTFS for the disks.
It is not a linux native format and support for its maintenence is not
as good
as for ext2/3/4, even if you install the ntfs utils package (which is
not
updated by several years now).

NTFS (as well as fat) exists in Alt-F mainly to enable using usb pens
formated
under windows.

> (I cannot easily go back to dlink firmware after that so I want to be sure I
> don't get locked out again :))

Then use ext2 or ext3.

> Thanks for the advice. :)
>
> Tom

You are welcome
Joao

TKenny

unread,
Mar 9, 2011, 1:44:45 PM3/9/11
to Alt-F
I had a couple of questions about setting up RAID1 with AltF. If
there is documentation on this please point me to it.

If I have two drives and one of them contains my data and the other is
blank, is there any way to use the wizard in AltF to make the two of
them into a RAID1 array where the currently empty drive mirrors the
information on the currently full drive? Im afraid if I put both
disks in the dns-323 and hit the (I think its called) "abracadabra"
button, it will just format both drives.

If the array becomes degraded, what is the procedure for fixing
things? I had RAID1 on the dns-323 with earlier dlink firmware and
once the array became degraded but there was no hardware fault. It
wasn't obvious what I should do in that case and it made me move over
to a system where I just ran a Backup script to copy the first drive's
contents over to the second one every day.

I was thinking of using the Backup service from the alt-F firmware,
but I need to specify a Backup folder so I cannot get a perfect mirror
of my source drive this way (where I could just continue as if nothing
happened if one of the two drives fails). Also I noticed when I was
trying to Configure the Backup service the rsync option wasn't
available (there was a dropdown that had rsync in it, but I couldnt
select it). Do I need to do something?

I am sort of off RAID5 now as I assume the entire system would
probably be limited to the speed of the drive connected to the USB
port on the dns-323. Any comments on that?

Thanks again.

Joao Cardoso

unread,
Mar 9, 2011, 11:55:28 PM3/9/11
to Alt-F


On Mar 9, 6:44 pm, TKenny <tken...@gmail.com> wrote:
> I had a couple of questions about setting up RAID1 with AltF.  If
> there is documentation on this please point me to it.
>
> If I have two drives and one of them contains my data and the other is
> blank, is there any way to use the wizard in AltF to make the two of
> them into a RAID1 array where the currently empty drive mirrors the
> information on the currently full drive?

No, the wizard is not Merlin :-)

>  Im afraid if I put both
> disks in the dns-323 and hit the (I think its called) "abracadabra"
> button, it will just format both drives.

Yes. You are warned first.

> If the array becomes degraded, what is the procedure for fixing
> things?  I had RAID1 on the dns-323 with earlier dlink firmware and
> once the array became degraded but there was no hardware fault.  It
> wasn't obvious what I should do in that case and it made me move over
> to a system where I just ran a Backup script to copy the first drive's
> contents over to the second one every day.

That's why the wizard default is to use a "standard" disk layout, no
RAID, less maintenance.
It is difficult to have an automatic tool to repair RAID.

The recommended procedure in case a drive fails is to remove the
failed drive from the array (Alt-F has tools for that), than remove
the disk from the box, insert a new disk, copy the partition table
from the good drive to the new drive (Alt-F also has tools for this),
and than add the new disk raid partition to the degraded disk (Alt-F
also has tools for this). RAID rebuild will then start automatically.

Even if the "failed" disk is OK, this is the recommended procedure.
If you are absolutely sure that the disk is OK, repeat *all* the steps
above with "new disk" replaced with "failed disk", but first format
and use the disk on another computer, or else the old disk raid will
be recognized and trouble might arise.

At the end I outline the procedure to upgrade a "standard" disk layout
to RAID1.

> I was thinking of using the Backup service from the alt-F firmware,
> but I need to specify a Backup folder so I cannot get a perfect mirror

Backup is also kind-of "incremental". And is missing a "Restore"
option -- restore should be manual. Neither Merlin was able to read
peoples mind :-)

But with two or three commands in the cli you could restore from a
backup.

> of my source drive this way (where I could just continue as if nothing
> happened if one of the two drives fails).

That is RAID -- availability without downtime

>  Also I noticed when I was
> trying to Configure the Backup service the rsync option wasn't
> available (there was a dropdown that had rsync in it, but I couldnt
> select it).  Do I need to do something?

No, I only wrote the first part.
Backup uses rsync internaly

> I am sort of off RAID5 now as I assume the entire system would
> probably be limited to the speed of the drive connected to the USB
> port on the dns-323.  Any comments on that?

There is a post about relative disk layout/filesystem performance on
Alt-F. One of the first posts.

=== Outline procedure to upgrade a "standard" disk layout to RAID1.
===

The recommended procedure to upgrade a "standard" disk layout to RAID1
is to create a RAID1 array in degraded mode with the new disk, copy
all data from the old disk to the new degraded array, then repartition
the old disk to RAID and add it to the new array.

This can all be done with Alt-F web pages, but to safeguard against
errors is simpler to use a flashed Alt-F, because that way it can work
without the old disk.

1-remove the old disk
2-insert the new disk
3-Disk->Wizard, select raid1, abracadabra.
4- Disk->RAID, start array, if not already started, verify it is
started in degraded mode and is available (mounted)
5-insert old disk, verify it's available
6-Setup->Directories, select old disk directory, hit Copy, select
raid directory, Paste. This might take several hours...
7-verify the data is OK in the still degraded raid.
8-Disk->Partitioner, "Partition Table", use copyTo from new disk to
old disk (*)
9-Disk->RAID, "Component Operations", Partition, select old disk
partition, Operation, Add
8-Wait for rebuild.

(*) Be careful here, the new disk should have the same size as the
old one. The most common is the new disk to be bigger than the old
one, so a lot of space will be wasted using the copyTo method. If they
are not equal, after the copyTo do manual adjustments to the partition
table. In this scenario, create a new partition with the free space,
keeping the other partitions untouched.

Miss something?

With remove/add disk I mean when the box is powered-on. Works for me.
If the box is flashed, you can power it off, as it needs no disk
fun_plug to boot.

When I wrote it, I tested all that, and it worked. But remember the
Licence terms: no warranty.
And my test are done with two old 80GB disks in the box and one 40GB
usb attached disk ;-)

You, the users, are my Q&A department -- does anyone want to try the
procedure using two old spare disks that you certainly have in the
shelf behind you? I can try to do it again, but not in the next two
weeks.

Paul-Michel Strenk

unread,
Mar 10, 2011, 3:10:24 AM3/10/11
to al...@googlegroups.com, Joao Cardoso
The recommended procedure in case a drive fails is to remove the
failed drive from the array (Alt-F has tools for that Can you explain ? with something like Setup->RaiD -> .. Blablabla ), than remove

the disk from the box, insert a new disk, copy the partition table
from the good drive to the new drive (Alt-F also has tools for this Can you explain ? with something like Setup->RaiD -> .. Blablabla ),

and than add the new disk raid partition to the degraded disk (Alt-F
also has tools for this Can you explain ? with something like Setup->RaiD -> .. Blablabla ). RAID rebuild will then start automatically.

I think thats it will be a good entry for the FAQ or the Q&A

2011/3/10 Joao Cardoso <whoami...@gmail.com>

--
You received this message because you are subscribed to the Google Groups "Alt-F" group.
To post to this group, send email to al...@googlegroups.com.
To unsubscribe from this group, send email to alt-f+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/alt-f?hl=en.


Paul-Michel Strenk

unread,
Mar 10, 2011, 5:29:46 AM3/10/11
to al...@googlegroups.com, Joao Sousa Cardoso


2011/3/10 Paul-Michel Strenk <paul-...@strenk.org>
The recommended procedure in case a drive fails is to remove the
failed drive from the array (Alt-F has tools for that Can you explain ? with something like Setup->RaiD -> .. Blablabla  example in bash : mdadm /dev/md0 -r /dev/sd[ab]2), than remove

the disk from the box, insert a new disk, copy the partition table
from the good drive to the new drive (Alt-F also has tools for this Can you explain ? with something like Setup->RaiD -> .. Blablabla  example in bash : using fdisk ),

and than add the new disk raid partition to the degraded disk (Alt-F
also has tools for this Can you explain ? with something like Setup->RaiD -> .. Blablabla example in bash : mdadm /dev/md0 -a /dev/sd[ab]2). RAID rebuild will then start automatically.

Joao Cardoso

unread,
Mar 10, 2011, 2:22:29 PM3/10/11
to al...@googlegroups.com
On Thursday, March 10, 2011 04:55:28 Joao Cardoso wrote:
> On Mar 9, 6:44 pm, TKenny <tken...@gmail.com> wrote:
> > I had a couple of questions about setting up RAID1 with AltF. If
> > there is documentation on this please point me to it.

[This should be under a new topic... will see if it can be done later]

[Comments, additions and corrections to my own previous post]

=== Outline procedure to repair a degraded RAID1 array

The recommended procedure in case a drive fails and the array becomes degraded
is to remove the failed disk from the array, than remove the disk from the
box, insert a new disk of same size, copy the partition table from the good
drive to the new drive, and than add the new disk raid partition to the
degraded disk. RAID rebuild should then start automatically.

Having a RAID1 in degraded state is not worse than having a standard disk, you
can work and use it normally, it is degraded just because it does not provide
any redundancy, i.e., it is not RAID anymore.

1-Disk->RAID, under "Component Operations" select the "Partition" from the
failed disk that you want to remove, then again under "Component Operations"
select "Operation" Remove. The RAID will turn to degraded mode.
2-Disk->Utilities->eject the failed disk
3-Remove the failed disk from the bay
4-Insert new disk, same size as previous
5-Disk->Partitioner, under "Partition Table", in the old disk line select
"CopyTo" the new disk.
6-Disk->RAID, under "Component Operations", Partition, select new disk
partition, then under "Component Operations", "Operation", Add
7-Rebuild will start. You can use the RAID while it happens.

> === Outline procedure to upgrade a "standard" disk layout to RAID1.

Should be: Outline procedure to upgrade a "standard" disk layout to RAID1
using a new disk with the same capacity as the older one.

> The recommended procedure to upgrade a "standard" disk layout to RAID1
> is to create a RAID1 array in degraded mode with the new disk, copy
> all data from the old disk to the new degraded array, then repartition
> the old disk to RAID and add it to the new array.

> 1-remove the old disk

Should be:

1A-Disk->Utilities->eject disk
1B-remove the old disk

> 2-insert the new disk
> 3-Disk->Wizard, select RAID1, abracadabra.


> 4- Disk->RAID, start array, if not already started, verify it is
> started in degraded mode and is available (mounted)
> 5-insert old disk, verify it's available
> 6-Setup->Directories, select old disk directory, hit Copy, select
> raid directory, Paste. This might take several hours...
> 7-verify the data is OK in the still degraded raid.

Add: in the next step your original data will be erased.

> 8-Disk->Partitioner, "Partition Table", use copyTo from new disk to
> old disk

Add: Remember, disks must be of equal capacity.

> 9-Disk->RAID, "Component Operations", Partition, select old disk
> partition, Operation, Add
> 8-Wait for rebuild.
>
> (*) Be careful here, the new disk should have the same size as the
> old one. The most common is the new disk to be bigger than the old
> one, so a lot of space will be wasted using the copyTo method. If they
> are not equal, after the copyTo do manual adjustments to the partition
> table. In this scenario, create a new partition with the free space,
> keeping the other partitions untouched.

This is obviously the other way around.

The problem is that for RAID all disk partitions that make the array (the
components) must all have the same size (within 1%)

When the new disk is bigger than the old one, you have to partition it using
the Partitioner, not the Wizard.

=== Outline procedure to upgrade a "standard" disk layout to RAID1 when the
new disk is bigger than the old one.

0-Disk->Partitioner, take note of the size of the partition that holds the
data.
1A-Disk->Utilities->eject disk
1B-remove the old disk
2-insert the new disk
3A-Disk->Partitioner, under "Partition Table", "Operation", select Erase
3B-when it completes, uncheck all "Keep" checkboxes
3C-Enter 0.5 as the size of the first partition and set its "Type" to Swap
3D-In the "Size" of the second partition enter the size you take note in step
0, and set the partition "Type" to RAID
3E-Set the third partition (the reminder of the disk) to "Type" linux -- it
will be a standard disk, you can use it for whatever purpose.
3F-hit the "Partition" button. After it completes,


4- Disk->RAID, start array, if not already started, verify it is
started in degraded mode and is available (mounted)
5-insert old disk, verify it's available
6-Setup->Directories, select old disk directory, hit Copy, select
raid directory, Paste. This might take several hours...

7-verify the data is OK in the still degraded raid. The next step will destroy
the data in the old disk.
8-Disk->Partitioner, select old disk, uncheck the partition where your data
was stored and change its "Type" to RAID. The "Size" should be kept the same.
Hit the "Partition" button.


9-Disk->RAID, "Component Operations", "Partition", select old disk partition,
"Operation", Add

10-Wait for rebuild.

> You, the users, are my Q&A department -- does anyone want to try the
> procedure using two old spare disks that you certainly have in the
> shelf behind you?

I meant QA, Quality Assurance, not Q&A, Questions and Answers

I could put the above procedures in the Wiky, but only after having
independent review and confirmation that is works as said.

If you prefer to work using the command line, there are several sites that
provide that information, you can use it. After all Alt-F is linux and has the
standard linux tools for the task.

TKenny

unread,
Mar 11, 2011, 8:29:09 PM3/11/11
to Alt-F
Just did the "upgrade" to RAID1 with one disk containing my data and
another blank disk.

Only issues I had with your instructions:

6-Setup->Directories, select old disk directory, hit Copy, select
raid directory, Paste. This might take several hours...

I did what I thought this said, and the only problem I noticed was
that it wanted to put everything in a folder with the same name as the
source. So for example if I tried to copy "/mnt/sdb2" into /mnt/md0",
through "Setup->Directories" then I noticed that everything was going
into "mnt/md0/sdb2". I didnt think this is what I wanted so I did the
copy in telnet instead with "cp /mnt/sdb2/* /mnt/md0 -R".

9-Disk->RAID, "Component Operations", "Partition", select old disk
partition,
"Operation", Add

I left the "Operation" dropdown unselected. Your instructions didnt
mention it, but when I looked at the options, none made much sense to
I did it without selecting anything. I was a little worried though.

so... RAID1 is up and running after many hours of building. Thanks!

At the risk of going further off topic, can I start a RAID5 array from
a RAID1 or do I need to "unbuild" the RAID1 and then do something
similar to your process above to get to RAID5? I'm not planning this
right away, but I thought it might be interesting to know what I can
get away with when the time comes.

Thanks

Joao Cardoso

unread,
Mar 12, 2011, 12:50:03 PM3/12/11
to al...@googlegroups.com
On Saturday, March 12, 2011 01:29:09 TKenny wrote:
> Just did the "upgrade" to RAID1 with one disk containing my data and
> another blank disk.

Good it runs fine.

There is a pre-requisite that I forgot to write, and I'm going to do it now
loud and clear:

THE INSTRUCTION GIVEN UNDER THIS TOPIC ARE ONLY VALID IF YOU HAVE

-ONLY ONE DATA FILESYSTEM IN YOUR DISK ( to upgrade "standard" disk to RAID1)

-ONLY ONE RAID DEVICE (to fix a degraded RAID1)

The first is valid for most users that have formatted their disks with a
"standard" layout using dlink's firmware, that creates a sda2 partition with
ext2 or ext3.

However the second assumption might not be valid for some users that have
created a RAID1 array not using all disk capacity; in that case, dlink's
firmware creates a JBOD (RAID level -1 or linear, i.e., not RAID) using the
remaining disk space.
In those cases, the procedure to fix a degraded RAID1 array is still valid,
but all data stored in the JBOD disk will be destroyed.
If the RAID1 degraded state occurred because of a failed disk, then the data
stored in the JBOD would be already compromised anyway.

> Only issues I had with your instructions:
>
> 6-Setup->Directories, select old disk directory, hit Copy, select
> raid directory, Paste. This might take several hours...
>
> I did what I thought this said, and the only problem I noticed was
> that it wanted to put everything in a folder with the same name as the
> source. So for example if I tried to copy "/mnt/sdb2" into /mnt/md0",
> through "Setup->Directories" then I noticed that everything was going
> into "mnt/md0/sdb2".

Yes, you are right, my fault.

> I didn't think this is what I wanted so I did the


> copy in telnet instead with "cp /mnt/sdb2/* /mnt/md0 -R".

Much simpler :-)

You should use "cp -a", as -a (archive) preserve ownership, permissions,
dates...

> 9-Disk->RAID, "Component Operations", "Partition", select old disk
> partition,
> "Operation", Add
>

> I left the "Operation" dropdown unselected. Your instructions didn't


> mention it, but when I looked at the options, none made much sense to
> I did it without selecting anything. I was a little worried though.

It should be:

9-Disk->RAID, under "Component Operations", "Partition", select old disk
partition, then again under "Component Operations", "Operation", Add

If you now have a non-degraded RAID1, without selecting the Add Operation
under Component Operations than rebuilding had started automatically.

>
> so... RAID1 is up and running after many hours of building. Thanks!

I think that the wizard creates RAID1/5 with "write intent bitmap" active.
It provides much faster resyncing/rebuilding in case of small problems.

You can verify that it is active in: Disks->RAID, under "RAID Operations", if
a "Remove Bitmap" option appears, than the intend-bitmap is already active,
don't remove. If a "Create Bitmap" appears, than it is not active and you can
select it. Takes only a couple of seconds.

> At the risk of going further off topic, can I start a RAID5 array from
> a RAID1 or do I need to "unbuild" the RAID1 and then do something
> similar to your process above to get to RAID5? I'm not planning this
> right away, but I thought it might be interesting to know what I can
> get away with when the time comes.

A RAID1 can be upgraded to a RAID5.

There will be allot of data movement during the process, and we all must be
aware to the fact that RAID5 rebuilding with mostly full TB sized disks can
attain the disk read error rate specification. If such errors occurs during
the rebuilding, data will be compromised:

http://www.tomshardware.com/news/RAID-5-Doomed-2009,6525.html

For large disks the rebuilt process can take DAYS - meanwhile you are at the
mercy of a second disk failing - at which point it's game over.

If you bought your disks at the same time and from the same manufacturer, then
most probably they are from the same fabrication lot, which means that after
one disk fails, the probability of the other also failing increases.

> Thanks

Thanks for trying and for the report.

Dwight Hubbard

unread,
Mar 12, 2011, 3:20:21 PM3/12/11
to al...@googlegroups.com
I've had the busybox cp not correctly preserve permissions when the "-a" flag is used, I'd recommend using rsync -a or tar if permissions are important.

bobcote

unread,
Apr 10, 2011, 11:58:56 PM4/10/11
to Alt-F
On Mar 10, 3:22 pm, Joao Cardoso <whoami.jc...@gmail.com> wrote:
> === Outline procedure to upgrade a "standard" disk layout to RAID1 when the
> new disk is bigger than the old one.

At which point do we set the partition type (ext2/3/4) of the new and
old disks?

Also, I would like to use ext4, so I need to flash my box. But imagine
I decide to go back to D-Link firmware, ext4 is not recognized. Is
there a way I could keep a little raid **ext3** partition (recognized
by DLink firmware), to keep ffp with a ssh binary just in case, and be
sure that that ext3 would be picked up by D-Link firmware as the
partition to look for a fun_plug file? Well, in fact I'm not even sure
if what I trying to do makes sense and would be of any help, but
anyway, what are your feelings?

Thanks

bobcote

unread,
Apr 11, 2011, 12:01:32 AM4/11/11
to Alt-F
And, is there any other "official" (and clean) place where those
procedures are located?

bobcote

unread,
Apr 11, 2011, 1:04:31 AM4/11/11
to Alt-F

> At which point do we set the partition type (ext2/3/4) of the new and
> old disks?

I went to Disk / Filesystem and on md0 which had a FS of none, I did a
format operation with ext4 FS. It looks like it completed. md0 is
still only sda2 (I still did not copy my data over new disk). The
problem I have is that I am not able to mount md0 and no Filesystem
maintenance checking, which could prevent mounting it if I understand
correctly, seems to be running if I look in that page or on the status
page.

I'm really wondering that I did not (maybe because it's not in the
procedure) do things properly because otherwise things should work.

Joao Cardoso

unread,
Apr 11, 2011, 12:39:22 PM4/11/11
to al...@googlegroups.com


On Monday, April 11, 2011 4:58:56 AM UTC+1, bobcote wrote:
On Mar 10, 3:22 pm, Joao Cardoso <whoami...@gmail.com> wrote:
> === Outline procedure to upgrade a "standard" disk layout to RAID1 when the
> new disk is bigger than the old one.

At which point do we set the partition type (ext2/3/4) of the new and
old disks?

I will answer this latter
 
Also, I would like to use ext4, so I need to flash my box. But imagine
I decide to go back to D-Link firmware, ext4 is not recognized. Is
there a way I could keep a little raid **ext3** partition (recognized
by DLink firmware), to keep ffp with a ssh binary just in case, and be
sure that that ext3 would be picked up by D-Link firmware as the
partition to look for a fun_plug file? Well, in fact I'm not even sure
if what I trying to do makes sense and would be of any help, but
anyway, what are your feelings?

The problem is the partitioning scheme, so the vendor's firmware will recognize it and look for a fun_plug file there.
For "standard" disk layout, a filesystem in sda2 is looked for, for raid, md0 is looked for, but for unequal sized disks md1 will also be created. Will dlink firmware look for the partition table or for the mounted filesystems? I don't know.

The most likely would be to partition disks with sda1 for swap, sda2 for standard disk with ext2/ext3, sda3 for raid with raid1 amd ext4, sda4 for  for standard disk with ext2/ext3, and the same for sdb. sda2 should be a small partition (1/2GB?) to hold your ffp/fun_plug, sda3 would hold most of the disk, and sda4 a small 500MB that dlink seems to need.

But this is speculating, dlink firmware is not source-code free and we don't know what it will do. In any case, one can always "skip" when dlink firmware asks for formating the disks.
 
Thanks

bobcote

unread,
Apr 11, 2011, 12:42:01 PM4/11/11
to Alt-F
In my quest I tried many commands to harvest infos and tried fdsik -l
on my disk new disk I formatted in the "procedure to upgrade a
"standard" disk layout to RAID1 when the new disk is bigger than the
old one" a few posts earlier (http://groups.google.com/group/alt-f/msg/
38be4fe1788aa210). I got:

Disk /dev/sdb: 2000.3 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sdb1 1 67 530272 82 Linux swap
Partition 1 does not end on cylinder boundary
/dev/sdb2 67 121538 975715820 da Unknown
/dev/sdb3 121538 243201 977265908 83 Linux


Notice how my raid partition I formatted in step 3D of the mentioned
procedure is not recognized as "Linux raid autodetect" with ID of "fd"
as it should be (well, that's what I understood from what I read).

Is all I mentioned in the last 4 posts related?

Joao Cardoso

unread,
Apr 11, 2011, 1:59:12 PM4/11/11
to al...@googlegroups.com


On Monday, April 11, 2011 5:01:32 AM UTC+1, bobcote wrote:
And, is there any other "official" (and clean) place where those
procedures are located?

Any RAID related site has that info. Ubunto has some good howto.

But the ideal is to understand what you intend to do and to understand how each procedure step drives us to the final goal.

Joao Cardoso

unread,
Apr 11, 2011, 2:08:43 PM4/11/11
to al...@googlegroups.com


On Monday, April 11, 2011 6:04:31 AM UTC+1, bobcote wrote:

> At which point do we set the partition type (ext2/3/4) of the new and
> old disks?

I went to Disk / Filesystem and on md0 which had a FS of none, I did a
format operation with ext4 FS. It looks like it completed. md0 is
still only sda2 (I still did not copy my data over new disk). The
problem I have is that I am not able to mount md0

What did you do?

Or the filesystem is automatically mounted, or you have to mount itself,

After you format md0 with ext4, it appears in the Disk->Filesystem, now with a ext4 FS?

In the FS Operations, do must have an option to either 'Mount' (this means it is currently unmounted) or to 'Unmount' (this means that it is currently mounted). What does appear?

If you tried 'Mount' and still it is not mounted, then checking the fs might have failed, go to System->Utilities->Logs, and see the "System Log" and look for start/finishing md0; it should say if it succeed or failed.

and no Filesystem
maintenance checking, which could prevent mounting it if I understand
correctly, seems to be running if I look in that page or on the status
page.

I'm really wondering that I did not (maybe because it's not in the
procedure) do things properly because otherwise things should work.

OK, I will take a look at the procedure, but it seems you did it right. 

Joao Cardoso

unread,
Apr 11, 2011, 2:16:03 PM4/11/11
to al...@googlegroups.com
No, Alt-F raid partitions are not of type 'fd', are of type 'da', so sfdisk output looks fine (although I prefer 'sfdisk -l -sU' because output is in 512 bytes sectors)

bobcote

unread,
Apr 11, 2011, 2:45:16 PM4/11/11
to Alt-F
> > And, is there any other "official" (and clean) place where those
> > procedures are located?
>
> Any RAID related site has that info. Ubunto has some good howto.

What I meant is maybe we should put thoses procedure in a place, maybe
a wiki, on the alt-f site. I looked to do this myself, but it looks
like the alt-f wiki is not open to public changes.

On Apr 11, 2:08 pm, Joao Cardoso <whoami.jc...@gmail.com> wrote:
> On Monday, April 11, 2011 6:04:31 AM UTC+1, bobcote wrote:
>
> > > At which point do we set the partition type (ext2/3/4) of the new and
> > > old disks?
>
> > I went to Disk / Filesystem and on md0 which had a FS of none, I did a
> > format operation with ext4 FS. It looks like it completed. md0 is
> > still only sda2 (I still did not copy my data over new disk). The
> > problem I have is that I am not able to mount md0
>
> What did you do?

On the Filesystem Maintenance page, for md0, I choose in "New FS
Operations" ext4 FS and format operation. After the formatting
completed, in "FS Operations" I choose "Mount", but nothing happens.


> Or the filesystem is automatically mounted, or you have to mount itself,

It is not mounted automatically, and I can't mount it manually with
the drop-down list of operations.


> After you format md0 with ext4, it appears in the Disk->Filesystem, now with
> a ext4 FS?

Yes

> If you tried 'Mount' and still it is not mounted, then checking the fs might
> have failed, go to System->Utilities->Logs, and see the "System Log" and
> look for start/finishing md0; it should say if it succeed or failed.

Weird, I have nothing else in that file other than an "infinite" list
of:

Apr 11 10:26:45 zebrick user.notice hot: md0 waiting to be fscked
Apr 11 10:26:54 zebrick user.notice hot: md1 waiting to be fscked
Apr 11 10:26:55 zebrick user.notice hot: md0 waiting to be fscked
Apr 11 10:27:04 zebrick user.notice hot: md1 waiting to be fscked
Apr 11 10:27:05 zebrick user.notice hot: md0 waiting to be fscked
Apr 11 10:27:14 zebrick user.notice hot: md1 waiting to be fscked
Apr 11 10:27:15 zebrick user.notice hot: md0 waiting to be fscked
Apr 11 10:27:24 zebrick user.notice hot: md1 waiting to be fscked
Apr 11 10:27:25 zebrick user.notice hot: md0 waiting to be fscked
Apr 11 10:27:34 zebrick user.notice hot: md1 waiting to be fscked
Apr 11 10:27:35 zebrick user.notice hot: md0 waiting to be fscked
Apr 11 10:27:44 zebrick user.notice hot: md1 waiting to be fscked
Apr 11 10:27:45 zebrick user.notice hot: md0 waiting to be fscked
Apr 11 10:27:54 zebrick user.notice hot: md1 waiting to be fscked
Apr 11 10:27:55 zebrick user.notice hot: md0 waiting to be fscked
Apr 11 10:28:04 zebrick user.notice hot: md1 waiting to be fscked
Apr 11 10:28:05 zebrick user.notice hot: md0 waiting to be fscked


> > I'm really wondering that I did not (maybe because it's not in the
> > procedure) do things properly because otherwise things should work.
>
> OK, I will take a look at the procedure, but it seems you did it right.

So, for the formatting to ext4, if I look to the procedure, am I
correct if I say that it should be between 3F (after partitioning) and
4 (before starting the raid array)?

And what about my /dev/sdb2 being of unknown type with "da" ID instead
of being "Linux raid autodetect" with ID of "fd"? Is it normal ?

Thank you

bobcote

unread,
Apr 11, 2011, 3:00:56 PM4/11/11
to Alt-F
> > And what about my /dev/sdb2 being of unknown type with "da" ID instead
> > of being "Linux raid autodetect" with ID of "fd"? Is it normal ?

> No, Alt-F raid partitions are not of type 'fd', are of type 'da', so sfdisk
> output looks fine (although I prefer 'sfdisk -l -sU' because output is in
> 512 bytes sectors)

Oups, browser cache problem. I did not see your previous post that
replied to my question.

Joao Cardoso

unread,
Apr 11, 2011, 3:20:52 PM4/11/11
to al...@googlegroups.com


On Monday, April 11, 2011 7:45:16 PM UTC+1, bobcote wrote:
> > And, is there any other "official" (and clean) place where those
> > procedures are located?
>
> Any RAID related site has that info. Ubunto has some good howto.

What I meant is maybe we should put thoses procedure in a place, maybe
a wiki, on the alt-f site. I looked to do this myself, but it looks
like the alt-f wiki is not open to public changes.

Not my fault, that's the way Google designed it (I think).
And I had not the time to put it in place.

On Apr 11, 2:08 pm, Joao Cardoso <whoami...@gmail.com> wrote:
> On Monday, April 11, 2011 6:04:31 AM UTC+1, bobcote wrote:
>
> > > At which point do we set the partition type (ext2/3/4) of the new and
> > > old disks?
>
> > I went to Disk / Filesystem and on md0 which had a FS of none, I did a
> > format operation with ext4 FS. It looks like it completed. md0 is
> > still only sda2 (I still did not copy my data over new disk). The
> > problem I have is that I am not able to mount md0
>
> What did you do?

On the Filesystem Maintenance page, for md0, I choose in "New FS
Operations" ext4 FS and format operation. After the formatting
completed, in "FS Operations" I choose "Mount", but nothing happens.

'nothing' is nothing :). The dropdown menu changed to Unmount, or keep the Mount option? Never mind, it is explained bellow

> Or the filesystem is automatically mounted, or you have to mount itself,

It is not mounted automatically, and I can't mount it manually with
the drop-down list of operations.

Because... the Mount option does not appears? Never mind...

> After you format md0 with ext4, it appears in the Disk->Filesystem, now with
> a ext4 FS?

Yes

> If you tried 'Mount' and still it is not mounted, then checking the fs might
> have failed, go to System->Utilities->Logs, and see the "System Log" and
> look for start/finishing md0; it should say if it succeed or failed.

Weird, I have nothing else in that file other than an "infinite" list
of:

Yes, this is the reason, a race condition... or an unbreakable loop? A bug, whatever name I call it.

This is going to be difficult...

You have to kill processes named hot_aux.sh.
  At the command line type 'killall hot_aux.sh'
  to make sure they are stopped, execute command 'ps' and see if any hot_aux.sh appears.
  If it appears, execute command 'killall -9 hot_aux.sh'

Take a look in the status and filesystem page -- everything looks normal?
In the RAID page can you stop both md0 and md1? (you migh have to unmount md0 and md1 first, if they are mounted)
And then start md1, and WAIT until cleaning it finished; then, if it is not mounted, mount it.
Do the same for md0.

You should now be able to continue the procedure.

The final solution to the problem will be to edit /usr/sbin/hot_aux.sh and add the line marked with a '+' (but don't type the '+')

               inclean=$(ls /tmp/check-sd[a-z][1-9] /tmp/check-md[0-9] 2> /dev/null | grep -oE '(sd[a-z].|md[0-1])')
+               if test -z "$inclean"; then break; fi
               for i in "$inclean"; do
                       if test "${i:0:2}" = "md"; then

 
Apr 11 10:26:45 zebrick user.notice hot: md0 waiting to be fscked
Apr 11 10:26:54 zebrick user.notice hot: md1 waiting to be fscked
Apr 11 10:26:55 zebrick user.notice hot: md0 waiting to be fscked
Apr 11 10:27:04 zebrick user.notice hot: md1 waiting to be fscked
Apr 11 10:27:05 zebrick user.notice hot: md0 waiting to be fscked
Apr 11 10:27:14 zebrick user.notice hot: md1 waiting to be fscked
Apr 11 10:27:15 zebrick user.notice hot: md0 waiting to be fscked
Apr 11 10:27:24 zebrick user.notice hot: md1 waiting to be fscked
Apr 11 10:27:25 zebrick user.notice hot: md0 waiting to be fscked
Apr 11 10:27:34 zebrick user.notice hot: md1 waiting to be fscked
Apr 11 10:27:35 zebrick user.notice hot: md0 waiting to be fscked
Apr 11 10:27:44 zebrick user.notice hot: md1 waiting to be fscked
Apr 11 10:27:45 zebrick user.notice hot: md0 waiting to be fscked
Apr 11 10:27:54 zebrick user.notice hot: md1 waiting to be fscked
Apr 11 10:27:55 zebrick user.notice hot: md0 waiting to be fscked
Apr 11 10:28:04 zebrick user.notice hot: md1 waiting to be fscked
Apr 11 10:28:05 zebrick user.notice hot: md0 waiting to be fscked


> > I'm really wondering that I did not (maybe because it's not in the
> > procedure) do things properly because otherwise things should work.

I did it wrong, not you!
 
> OK, I will take a look at the procedure, but it seems you did it right.

So, for the formatting to ext4, if I look to the procedure, am I
correct if I say that it should be between 3F (after partitioning) and
4 (before starting the raid array)?

No, to create a filesystem (ext4) the array has to be created and started.

A raid array is like a disk partition, it is just a container for a filesystem; a filesystem is just a container for your data, so the sequence is always one of the two:
-create a normal partition, create a filesystem on it, mount it, use it
-create a raid partition, create a raid on it, start the raid array, create a filesystem on it, mount it, use it

And what about my /dev/sdb2 being of unknown type with "da" ID instead
of being "Linux raid autodetect" with ID of "fd"? Is it normal ?

Yes. partition type 'fd' are historical.
 
Thank you

Hope that you manage to do do it to the end now :-)

bobcote

unread,
Apr 11, 2011, 4:06:18 PM4/11/11
to Alt-F


On Apr 11, 3:20 pm, Joao Cardoso <whoami.jc...@gmail.com> wrote:
>
> You have to kill processes named hot_aux.sh.
>   At the command line type 'killall hot_aux.sh'
>   to make sure they are stopped, execute command 'ps' and see if any
> hot_aux.sh appears.
>   If it appears, execute command 'killall -9 hot_aux.sh'

After doing 'killall hot_aux.sh' I did not see any hot_aux.sh with ps
command.


> Take a look in the status and filesystem page -- everything looks normal?

Everything is as usual.


> In the RAID page can you stop both md0 and md1? (you migh have to unmount
> md0 and md1 first, if they are mounted)

I could stop md0 right away since as I said I'm not able to mount md0.


> And then start md1, and WAIT until cleaning it finished; then, if it is not
> mounted, mount it.
> Do the same for md0.

I did restart md0. I don't see any kind of cleaning progress going on.
On status, md0 state is clean.

System log still has those lines below continuously added...

Apr 11 11:43:53 zebrick user.notice hot: md0 waiting to be fscked
Apr 11 11:44:03 zebrick user.notice hot: md0 waiting to be fscked
Apr 11 11:44:13 zebrick user.notice hot: md0 waiting to be fscked
Apr 11 11:44:23 zebrick user.notice hot: md0 waiting to be fscked
Apr 11 11:44:33 zebrick user.notice hot: md0 waiting to be fscked
Apr 11 11:44:43 zebrick user.notice hot: md0 waiting to be fscked
Apr 11 11:44:53 zebrick user.notice hot: md0 waiting to be fscked


> The final solution to the problem will be to edit /usr/sbin/hot_aux.sh and
> add the line marked with a '+' (but don't type the '+')
>
>                inclean=$(ls /tmp/check-sd[a-z][1-9] /tmp/check-md[0-9] 2>
> /dev/null | grep -oE '(sd[a-z].|md[0-1])')
> +               if test -z "$inclean"; then break; fi
>                for i in "$inclean"; do
>                        if test "${i:0:2}" = "md"; then


It looks like I will need to try this. So, if I add that liine to /usr/
sbin/hot_aux.sh then what do I need to do next?


> > So, for the formatting to ext4, if I look to the procedure, am I
> > correct if I say that it should be between 3F (after partitioning) and
> > 4 (before starting the raid array)?
>
> No, to create a filesystem (ext4) the array has to be created and started.
>
> A raid array is like a disk partition, it is just a container for a
> filesystem; a filesystem is just a container for your data, so the sequence
> is always one of the two:
> -create a normal partition, create a filesystem on it, mount it, use it
> -create a raid partition, create a raid on it, start the raid array, create
> a filesystem on it, mount it, use it.

OK, then it would be after step 4: "4- Disk->RAID, start array, if not
already started, verify it is
started in degraded mode and is available (mounted) " ? And what you
are telling is that normally it would have mounted automatically and/
or I should have been able to mount it manually.

bobcote

unread,
Apr 12, 2011, 8:11:22 PM4/12/11
to Alt-F
Well, I was getting tired of not being sure if having a not flashed
Alt-F had anything to do with my problems, so I took my courage ;) and
flashed my dns-323.

First observation, my degraded raid1 /dev/md0 is still not mounted on
boot. Manually Trying mounting it by command "mount /dev/md0" gave me
"mount: can't find /dev/md0 in /etc/fstab". That's right, /dev/md0 is
not in fstab !! Why?
So I edited /etc/fstab and added the line: "/dev/md0 /mnt/md0 ext4
defaults 0 2". After saving the file mounting it manually is working,
but trying to mount it with the web ui is still failing! Why?

I also added that "if test -z "$inclean"; then break; fi" line you
told me to add in "/usr/sbin/hot_aux.sh".

I saved settings with the web ui and rebooted. My md0 line in fstab
and the line in hot_aux.sh are not there anymore! Why?

And obviously my system.log is still full of:
Apr 12 20:09:10 zebrick user.notice hot: md0 waiting to be fscked
Apr 12 20:09:18 zebrick user.notice hot: md1 waiting to be fscked
Apr 12 20:09:20 zebrick user.notice hot: md0 waiting to be fscked
Apr 12 20:09:28 zebrick user.notice hot: md1 waiting to be fscked
Apr 12 20:09:30 zebrick user.notice hot: md0 waiting to be fscked
Apr 12 20:09:38 zebrick user.notice hot: md1 waiting to be fscked
Apr 12 20:09:40 zebrick user.notice hot: md0 waiting to be fscked
Apr 12 20:09:49 zebrick user.notice hot: md1 waiting to be fscked
Apr 12 20:09:50 zebrick user.notice hot: md0 waiting to be fscked
Apr 12 20:09:59 zebrick user.notice hot: md1 waiting to be fscked
Apr 12 20:10:00 zebrick user.notice hot: md0 waiting to be fscked
Apr 12 20:10:09 zebrick user.notice hot: md1 waiting to be fscked
Apr 12 20:10:10 zebrick user.notice hot: md0 waiting to be fscked


Thanks a lot for your help

Joao Cardoso

unread,
Apr 12, 2011, 10:32:42 PM4/12/11
to al...@googlegroups.com


On Wednesday, April 13, 2011 1:11:22 AM UTC+1, bobcote wrote:
Well, I was getting tired of not being sure if having a not flashed
Alt-F had anything to do with my problems, so I took my courage ;) and
flashed my dns-323.

There is absolutely no difference between a flashed and a reloaded Alt-F, except for a faster boot time and no fun_plug messing.

First observation, my degraded raid1 /dev/md0 is still not mounted on
boot.

To be mounted, it needs to be checked.
Checking can be as fast as a couple of seconds, if the filesystem was cleanly unmounted, or take hours, it it was not cleanly unmounted or the set number of days/mount times has elapsed.
When the box is shutdown, all filesystems are cleanly unmounted.

But because of the bug "md0 waiting to be fscked", the box is never checked, fstab is never created and mounting is not done.
 
Manually Trying mounting it by command "mount /dev/md0" gave me
"mount: can't find /dev/md0 in /etc/fstab". That's right, /dev/md0 is
not in fstab !! Why?
So I edited /etc/fstab and added the line: "/dev/md0 /mnt/md0 ext4
defaults 0 2". After saving the file mounting it manually is working,
but trying to mount it with the web ui is still failing! Why?

I also added that "if test -z "$inclean"; then break; fi" line you
told me to add in "/usr/sbin/hot_aux.sh".

I saved settings with the web ui and rebooted.

When you reboot you loose the changes you made to hot_aux.sh.
I would like to know if editing hot_aux.sh solved the problem *before* you reboot the unity.

Most problems can be solved in linux without rebooting. It is a bad MS-W habit to reboot the box after making changes or installing software.
 
My md0 line in fstab
and the line in hot_aux.sh are not there anymore! Why?

fstab is created dinamically when disks/pens are detected.
In contrary to a desktop or lapboot computer, where changing disks is not a daily task, disks on the DNS can be easily changed, thus the concept of a static fstab does not hold. Even if most users don't change disks that often.
So, only remote filesystems such as cifs or nfs present in fstab are saved to flash.

And obviously my system.log is still full of:
Apr 12 20:09:10 zebrick user.notice hot: md0 waiting to be fscked
Apr 12 20:09:18 zebrick user.notice hot: md1 waiting to be fscked 
 
To make the changes  to hot_aux.sh permanent, you need to save them on disk.
The following is a *tentative* solution. I can foresee a scenario that will make it not work.

1-You have to install an Alt-F package, any package. the 'ipkg' itself will be enough.
  Don't use md0 or md1 when asked for a filesystem. You must have a "standard" filesystem where to install packages.
  I don't know your box details. Do you have a filesystem sda? or sdb?, where '?' is a number and that are not RAID components? 
  Look at the Filesystem webpage. Use any of them (1)
2-Then, at the command line, execute the following commands:

   aufs.sh -n
   mkdir -p /Alt-F/usr/sbin/
   # edit /usr/sbin/hot_aux.sh, as you did before, yes, /usr/sbin/hot_aux.sh
   aufs.sh -r
   ls /Alt-F/usr/sbin/  # hot_aux.sh should appear in the listing

3A-In this case, as we want to test the modifications, and that involves detecting a new disk, and I'm sure that you don't want to unplug your disks with the power applied, you have to reboot.

3B-But wait, have you "Create a bitmap" in the RAID web page for your raid devices? *If you have*, instead of reboot you can go to the Disk Utilities webpage and hit the "Eject" button for each of the disks. This will stop all raid devices and unmount all filesystems or will give an error message. If succeeded, the 'Eject' button now says 'Load'. Hit the "Load" button for each disk -- this simulated the disk being inserted, and will deploy hot_aux.sh, showing us if the edited changes had effect.

There is still another last resort possibility: use 0.1B6 *if you have not on an A1 board*. B6 doesn't has that infamous bug, fsck will run on each of the disks sequentially, blinking the power led with a heart-beat rythm while it works, and halting the boot process while fschecking is not complete (don't power off the box)

I would like to know what is exactly your situation now. Please make a summary of what you have accomplish and what is still missing. This includes the SMART test on another topic, whose situation you have not reported back.

During the next two weeks I will be limited to e-mail using a smartphone, so don't expect long and detailed explanations.

bobcote

unread,
Apr 13, 2011, 11:53:57 AM4/13/11
to Alt-F
I successfully did steps 1-2-3B in your previous post.

On Apr 12, 10:32 pm, Joao Cardoso <whoami.jc...@gmail.com> wrote:
> I would like to know what is exactly your situation now. Please make a
> summary of what you have accomplish and what is still missing. This includes
> the SMART test on another topic, whose situation you have not reported back.
>
> During the next two weeks I will be limited to e-mail using a smartphone, so
> don't expect long and detailed explanations.

Ok, I replied in the other thread (http://groups.google.com/group/alt-
f/browse_thread/thread/8a0d934b24fd4bed/).

To make a short summary, I bought a new 2TB disk to replace one of my
old 1 TB disks (old sda, right bay). When I received the new 2 TB disk
I began by testing the goold old 1TB disk and the new 2 TB with
Western Digital diagnostic tool, both were ok. I put the good 1TB disk
that was previously in left bay and put in the right one and put the 2
TB disk in the left bay.

So I followed the procedure in this thread to upgrade "standard" disk
to a raid 1 array when the new disk is bigger than the old. Yes, my
disk was not standard but already a raid1 disk. I also did not remove
the old disk as stated in step 1, because this disk still had my
fun_plug/ffp/alt-f files and my dns-323 was not flashed (I did not
know I could just "eject" the disk without physically removing it).
Alt-F recognize that my old 1 TB disk has a raid partition, that's why
I think it keeps creating the raid array md1.
Anyway, as I said earlier in this topic - and the reason I'm writing
in this topic - is that I'm stuck at step 4, because I could not mount
my array. Well, in the middle of executing step 4 (after staring the
array) I realized it did not make sens to try to mount a partition
which had no filesystem, so I formated md0 with ext4. Still, after
that, I could not mount md0.

The good news? As I said first in this post, I successfully modified
hot_aux.sh, ejected
and re-loaded sdb (the 2 TB disk), and now md0 mounts !
But I still get "waiting to be fscked" messages.

Here is an excerpt of my system log when I ejected and reloaded the
disk:

Apr 13 10:49:17 zebrick user.info kernel: md0: detected capacity
change from 999132889088 to 0
Apr 13 10:49:17 zebrick user.info kernel: md: md0 stopped.
Apr 13 10:49:17 zebrick user.info kernel: md: unbind
Apr 13 10:49:17 zebrick user.info kernel: md: export_rdev(sdb2)
Apr 13 10:49:22 zebrick daemon.info sysctrl: right_dev disk (sda)
wakeup
Apr 13 10:49:22 zebrick daemon.info sysctrl: left_dev disk (sdb)
wakeup
Apr 13 10:49:23 zebrick user.notice hot: md0 waiting to be fscked
Apr 13 10:49:24 zebrick user.notice hot: md1 waiting to be fscked
Apr 13 10:49:24 zebrick user.info kernel: Adding 530268k swap on /dev/
sdb1. Priority:1 extents:1 across:530268k
Apr 13 10:49:25 zebrick user.info kernel: md: bind
Apr 13 10:49:25 zebrick user.info kernel: md/raid1:md0: active with 1
out of 2 mirrors
Apr 13 10:49:25 zebrick user.info kernel: md0: bitmap initialized from
disk: read 1/1 pages, set 944 bits
Apr 13 10:49:25 zebrick user.info kernel: created bitmap (8 pages) for
device md0
Apr 13 10:49:25 zebrick user.info kernel: md0: detected capacity
change from 0 to 999132889088
Apr 13 10:49:25 zebrick user.info kernel: md0: unknown partition
table
Apr 13 10:49:25 zebrick user.notice hot: Start fscking md0
Apr 13 10:49:26 zebrick user.notice hot: Finish fscking md0: fsck
1.41.14 (22-Dec-2010) /dev/md0: clean, 268/60989440 files,
11471368/243928928 blocks
Apr 13 10:49:26 zebrick user.notice hot: md0 waiting to be fscked
Apr 13 10:49:26 zebrick user.notice hot: Start fscking sdb3
Apr 13 10:49:26 zebrick user.notice hot: md0 waiting to be fscked
Apr 13 10:49:29 zebrick user.info kernel: EXT4-fs (md0): mounted
filesystem with ordered data mode. Opts: (null)
Apr 13 10:49:29 zebrick user.notice hot: Finish fscking sdb3: fsck
1.41.14 (22-Dec-2010) /dev/sdb3: clean, 11/61079552 files,
3884633/244316477 blocks
Apr 13 10:49:32 zebrick user.info kernel: EXT4-fs (sdb3): mounted
filesystem with ordered data mode. Opts: (null)
Apr 13 10:49:32 zebrick daemon.info sysctrl: md0: state=clean
level=raid1 degraded=1 action=idle
Apr 13 10:49:33 zebrick user.notice hot: md0 waiting to be fscked
Apr 13 10:49:34 zebrick user.notice hot: md1 waiting to be fscked
Apr 13 10:49:36 zebrick user.notice hot: Start fscking md0
Apr 13 10:49:36 zebrick user.notice hot: Finish fscking md0: fsck
1.41.14 (22-Dec-2010) /dev/md0 is mounted. e2fsck: Cannot continue,
aborting.
Apr 13 10:49:36 zebrick user.notice hot: md0 waiting to be fscked
Apr 13 10:49:43 zebrick user.notice hot: md0 waiting to be fscked

Joao Cardoso

unread,
Apr 14, 2011, 4:44:22 PM4/14/11
to al...@googlegroups.com
> So I followed the procedure in this thread to upgrade "standard" disk to a raid 1 array when the new disk is bigger than the old. Yes, my disk was not standard but already a raid1 disk.

Dont you think that if you already have a raid, and degraded, you should follow the procedure to fix a degraded raid?

Also, see my last post under the topic 'Alt-F does not load'

Reply all
Reply to author
Forward
0 new messages