Any way to save my JBOD?

312 views
Skip to first unread message

t o

unread,
Nov 12, 2011, 11:24:41 PM11/12/11
to Alt-F
I apologize for the length of this post, but there is no such thing as
too much info:

I have two DNS 323's and decided to try alt-f on one of them. It is a
rev c1 and was a mostly-full jbod setup with 2x1.5TB drives when I
copied the RC1 funplug and alt-f files to Volume_1 (didn't want to
rush in and flash). After the reboot, it took several hours for disk
check to complete, but it appeared to recognize my jbod right out of
the box. I couldn't get samba working, couldn't map the drives under
windows, so I rebooted hoping that it would return to the stock D-Link
firmware. This was not the case - the box booted back into alt-f, took
all night to check the drives again.

I used the directory feature in alt-f to delete the alt-f files,
deleted only some before the GUI stopped working, so I then rebooted.
Navigating to its IP in my browser "192.168.0.162" gets me nowhere,
but "192.168.0.162/status" brings me into the dlink web GUI. I suspect
there are some alf-t/funplug files left over. I still cannot map my
drives, I get a "check spelling and try again" error under windows 7,
and what's worse is the left drive LED is amber, and the Dlink web GUI
asks me to format my new disk. Shut down, took right drive out, tried
to get it to mount with an ubuntu live cd via USB, no luck. I MAY have
deleted the partitons in Gpart. I am currently trying EASEUS Data
Recovery Wizard to copy files to a 3TB external. This is not ideal
because it takes over a day to scan for files, and another day or so
to copy them and I seem to be getting random garbage files. I DO NOT
have a backup of these files (I know, I know).

So here is my proposal - flash RC1 to my box with no drives in it, pop
my drives in, it does (or at least appears) to recognize my JBOD, and
then somehow either:

A. Get alt-f working - it is superior. Get Volume_1 mounted under
winows, backup my files to my shiny new 3TB. Format my smaller drives
afterwards, do a nice clean install of alt-f and live happily ever
after.

B. Get alt-f slightly working. Use the directory feature to mount my
3TB NTFS (or FAT32 I suppose) drive, copy my files over and then just
format contents of my 2x1.5TB, go back to stock firmware, live happily
every after.

I have two questions. Will the NTFS utility in alt-f recognize and
mount such a large USB drive? Can someone here walk me through setting
up users, directory permissions, and samba so step-by-step it would be
idiot proof?

Joao Cardoso

unread,
Nov 15, 2011, 12:23:26 PM11/15/11
to Alt-F


On Nov 13, 4:24 am, t o <tjs4e...@gmail.com> wrote:
> I apologize for the length of this post, but there is no such thing as
> too much info:
>
> I have two DNS 323's and decided to try alt-f on one of them. It is a
> rev c1 and was a mostly-full jbod setup with 2x1.5TB drives when I
> copied the RC1 funplug and alt-f files to Volume_1 (didn't want to
> rush in and flash). After the reboot, it took several hours for disk
> check to complete, but it appeared to recognize my jbod right out of
> the box. I couldn't get samba working, couldn't map the drives under
> windows, so I rebooted hoping that it would return to the stock D-Link
> firmware. This was not the case - the box booted back into alt-f, took
> all night to check the drives again.

This shouldn't happen. Have you edited the fun_plug file, commenting
the ONCE line?

# disable recurring reboots,
# comment if you want to go to Alt-F on every reboot
ONCE=yes

There are no reported issue on this feature being broken.

> I used the directory feature in alt-f to delete the alt-f files,

Which directory? alt-f or Alt-F? If you have installed any Alt-F
package an Alt-F directory will appear, besides the "alt-f" directory
that the "reloaded" (fun_plug) method uses.
This is a mis-unfortunate naming that can lead to confusion, but it
now "historical"

Have you done *any* other operation besides this one? Install any Alt-
F packages? Doing any disk or filesystem operation? Alt-F does *not*
change anything on your disks unless you tell it to do so!

Did you had ffp installed?

> deleted only some before the GUI stopped working,

I have used this to copy/move/delete GBs without any issue (and again
there are no reported issues). Are you sure you was deleting "alt-f"
and not "Alt-F"?

> so I then rebooted.
> Navigating to its IP in my browser "192.168.0.162" gets me nowhere,

Have you followed the "first login guided tour", setting up the host
details, time and date, creating an user, etc? Have you started the
"smb" service in Services->Network?

> but "192.168.0.162/status" brings me into the dlink web GUI. I suspect
> there are some alf-t/funplug files left over.

browser cache effects.

> I still cannot map my
> drives, I get a "check spelling and try again" error under windows 7,
> and what's worse is the left drive LED is amber, and the Dlink web GUI
> asks me to format my new disk. Shut down, took right drive out, tried
> to get it to mount with an ubuntu live cd via USB, no luck. I MAY have
> deleted the partitons in Gpart.

Why would you do this?

> I am currently trying EASEUS Data
> Recovery Wizard to copy files to a 3TB external. This is not ideal
> because it takes over a day to scan for files, and another day or so
> to copy them and I seem to be getting random garbage files. I DO NOT
> have a backup of these files (I know, I know).
>
> So here is my proposal - flash RC1 to my box with no drives in it, pop
> my drives in, it does (or at least appears) to recognize my JBOD, and
> then somehow either:

If you have done any change to the disk partition table that is not
going to help.
Or if the disk utilities you are using have written something to the
disk(s), that is not helping either.

> A. Get alt-f working - it is superior. Get Volume_1 mounted under
> winows, backup my files to my shiny new 3TB. Format my smaller drives
> afterwards, do a nice clean install of alt-f and live happily ever
> after.
>
> B. Get alt-f slightly working. Use the directory feature to mount my
> 3TB NTFS (or FAT32 I suppose) drive, copy my files over and then just
> format contents of my 2x1.5TB, go back to stock firmware, live happily
> every after.
>
> I have two questions. Will the NTFS utility in alt-f recognize and
> mount such a large USB drive?

A recent user reported that he plugged a 3TB disk, pre-formatted with
NTFS,. and used it without issues.

>Can someone here walk me through setting
> up users, directory permissions, and samba so step-by-step it would be
> idiot proof?

The most important web pages have a help page, just hit the (?) button
near the page title and read them. Really. If you still have doubts,
then make concrete questions.
Computers will never be like cars, with only two or three pedals and a
steering wheel. And even so you sometimes turn-on the glass washer
instead of the direction-light :-)

Regarding the JBOD problem, I can't help you but explaining why I
don't like JBOD. There is (was) even a linux distribution that doesn't/
didn't supports it.

Disks contents are accessed using a sector number, the same way as
books are accessed using its page numbers.
JBOD concatenates two or more disk partitions in one new virtual disk;
if each disks had 1000 sectors, the JBOD will have 2000 sectors, with
JBOD sector 1001 being sector 1 of the second disk. This is all that
JBOD does -- it creates a new disk, or better, a *device*.

JBOD does not manages your files or folders, that is the filesystem
(FS) role; after creating a JBOD you have to format it with a
filesystem (destroying the disk previous contents).

A FS keeps track of where your files are on the disk by creating at
the start an index (the super-block) with the the disk sectors where
the files where stored, just like a book has a index of its contents
using its page numbers. The index says that file "foo" is at sector
200 and file "bar" is at sector 1020.
Contrary to a book, a FS keeps several copies of the index spread
around the disk, so if the main index is lost or damage it can resort
to the backup index; copies can be stored at, say, sectors 600, 1300,
etc. In a JBOD, there are certainly copies of the index in the second
disk, but not at its start -- the FS only sees *one* disk with 2000
sectors (in the above example).

So, if you use only the first disk of a JOBD on another system, using
it as a normal disk and not as a JBOD, the system will see the FS on
it and the FS index will be found and used without (almost no)
problems. File "foo" is still at sector 200. But file "bar" will not
be found, as the disk only has 1000 sectors.

If you use the second JBOD disk instead of the the first disk, the FS
will not find its index, as it expects it to be in the start, which it
is not. Also, the backup copies will not be found at the expected
places at sectors 600 or 1300 -- in this second disk the backup index
created when the disk was on the JBOD is on sector 300 (1300-1000).

There are programs that can search the disk for signatures, finding
files, the same way that you can find a book chapter, even not using
its index, by glimpsing though the book for bold titles.

Such programs can even find the backup index signature, but its
information is misleading, as its contents refers to a disk of 2000
sectors, not 1000 sectors -- the file "bar" that the index says that
it is on sector 1020 is on sector 20 of the second disk!

This is why I don't like JBOD.

Sure, there are programs that can search your disk for files and
directories signatures and will recover them. If you use such
programs, don't allow them to change you disk content, instead
instruct the program to put recovered files on another disk, just in
case.

Luck and congratulations to all who have read this so far ;-)

TJ

unread,
Nov 15, 2011, 1:25:23 PM11/15/11
to Alt-F
Ok, so I've FTP'd to the box as root, and am in the process of backing
up everything to a 3TB external. There doesn't appear to be any data
loss. Once done I will wipe settings, format my drives ext4, re-jbod
them, and start over.

I may have have deleted the incorrect alt-f folder all along, and no I
did not edit funplug in any way. I gathered from my readings that it
was "run once" by default. I still do not understand why I couldn't
map my drives - samba was running, I made some users and gave myself
root-like access.

Thank you very much for your prompt and polite response. I half
expected to be scolded (I'm accustomed to XDA forums)

While I have your attention: how does one access the mediatomb GUI? I
can't seem to even enable it.

Joao Cardoso

unread,
Nov 15, 2011, 10:27:11 PM11/15/11
to Alt-F


On Nov 15, 6:25 pm, TJ <tjs4e...@gmail.com> wrote:
> Ok, so I've FTP'd to the box as root, and am in the process of backing
> up everything to a 3TB external.

Just for curiosity, using Alt-F?

> There doesn't appear to be any data
> loss. Once done I will wipe settings, format my drives ext4, re-jbod
> them, and start over.
>
> I may have have deleted the incorrect alt-f folder all along, and no I
> did not edit funplug in any way. I gathered from my readings that it
> was "run once" by default.

Yes, it should. That deserves an issue report.

But probably I will drop fun_plug support for the next release, now
that Alt-F can be flashed using D-link firmware upgrade page.
Using fun_plug means that the vendor firmware might run, leaving the
filesystem in an unclean state and making Alt-F checking it again and
again. For ext2 this is a lengthily and discouraging process.

>I still do not understand why I couldn't
> map my drives - samba was running, I made some users and gave myself
> root-like access.

Using the webgui or editing smb.conf? It looks like some users have
problems setting up samba; if you discover what the problem is, please
let me known.

> Thank you very much for your prompt and polite response. I half
> expected to be scolded (I'm accustomed to XDA forums)

I don't see the point of saying "I can do it! If you also want to do
it, google for it and spent the same time as I did!"

Of course, from time to time I feel discouraged answering the same
questions over and over -- but I was a teacher, I'm used to :-)

> While I have your attention: how does one access the mediatomb GUI? I
> can't seem to even enable it.

Services->User->mediatomb->configure->web page.
Of course, after configuring and starting the service (the webPage
button should be disabled while the service is not started, and it
should not starts until you configure it. This principle applies to
most/all services.

RC2 will have shortcuts to avoid the need to follow deep menus.

Joao

TJ

unread,
Nov 16, 2011, 8:17:39 PM11/16/11
to Alt-F
Yes, I flashed Alt-F (to make sure it was fully functional) and copied
all my files via FTP to a 3TB external. I formatted the drives ext4
raid-0 (the wizard didn't handle it so well, had to manually adjust
partitons) and am in the process of copying my files back. I made a
0.537GB partition as the first partiton of each drive as type "swap" I
hope this is correct, but I cannot actually "see" these partitons, as
I could in my previous setup. I notice that the staus page reports a
md0 with 2.7TB and only 2.5 available - am I losing 200GB someplace?

I figure I can risk raid-0 because I have a copy of this data now; it
doesn't provide me with the performance boost I had expected, but I
want to be able to stream media to my PS3, and one laptop
simultaneously.

Everything is working now, I have 3 users setup, 2 are read-only and
everything seems fine. I had to clear settings a couple of times: once
because changes in samba weren't sticking, and the second time because
I was told to save my settings, even though they had been saved.

I can confirm that reboots did not restore me to stock d-link, and I
did setup samba the same way all 3 times (only the last time worked).
No idea why this happened in such a manner.

Thank you for all your help - my problem seems to be resolved for now.
Will stick around the board, help if I can.

P.S. MediaTomb from the alt-f packages does not install correctly,
hence my issues starting it. I can can email you a screenshot, but I
am getting a "cannot create directory /var/lib/mediatomb : permission
denied"

Not a huge issue, as I am now using minidlna and am quite happy with
it. Do you know if any of these media servers support WMV?
> ...
>
> read more »

Joao Cardoso

unread,
Nov 17, 2011, 12:41:42 AM11/17/11
to al...@googlegroups.com
On Thursday, November 17, 2011 01:17:39 TJ wrote:
> Yes, I flashed Alt-F (to make sure it was fully functional) and copied
> all my files via FTP to a 3TB external. I formatted the drives ext4
> raid-0 (the wizard didn't handle it so well, had to manually adjust
> partitons)

Was the problem the size? Limited to 1TB? If yes, already reported, if not,
please clarify.

> and am in the process of copying my files back. I made a
> 0.537GB partition as the first partiton of each drive as type "swap" I
> hope this is correct,

That's OK.

> but I cannot actually "see" these partitons,

Where do you expect to see them?
In the Status Page, System section, Swap says how much swap you have and how
much is being used.

> as
> I could in my previous setup. I notice that the staus page reports a
> md0 with 2.7TB and only 2.5 available - am I losing 200GB someplace?

Where? On the Disk, Raid, or Mounted Filesystem section?

Anyway, the filesystem itself "stoles" some 5% of the partition capacity for
its own purpose -- file name, attributes, where on the disk is lays-on,
directory structures, etc.

> I figure I can risk raid-0 because I have a copy of this data now; it
> doesn't provide me with the performance boost I had expected,

Have you read the top-posted forum Topic
Filesystem and disk layout performance on 0.1B4?

> but I
> want to be able to stream media to my PS3, and one laptop
> simultaneously.
>
> Everything is working now, I have 3 users setup, 2 are read-only and
> everything seems fine. I had to clear settings a couple of times: once
> because changes in samba weren't sticking, and the second time because
> I was told to save my settings, even though they had been saved.

Somehow some files have been changed, you might be using DHCP, which changes a
couple of files when the lease is renewed, and when one of the files timestamp
changes the warning appears.

> I can confirm that reboots did not restore me to stock d-link, and I
> did setup samba the same way all 3 times (only the last time worked).
> No idea why this happened in such a manner.

You are not the first one to complain. Hope it's fixed now.

> Thank you for all your help - my problem seems to be resolved for now.
> Will stick around the board, help if I can.

Helping others would be a great help :-)

> P.S. MediaTomb from the alt-f packages does not install correctly,
> hence my issues starting it. I can can email you a screenshot, but I
> am getting a "cannot create directory /var/lib/mediatomb : permission
> denied"

Anybody else suffered from this problem?

> Not a huge issue, as I am now using minidlna and am quite happy with
> it. Do you know if any of these media servers support WMV?

No.

Thanks for reporting back.
Joao

TJ

unread,
Nov 18, 2011, 7:08:53 PM11/18/11
to Alt-F
Yes, the wizard did not size my md0 correctly - I had tonnes of space
left over. I could have been a limit of 1 TB I really don't recall.
Manual partitoning went smoothly.

By "see" the drives, I mean in windows. Previosly I could mount "/mnt"
and md0, and the two swap partitons were visible, I could even
navigate into them, install packages into them. I'm sure it is better
that I can't now. The status page shows a swap of 1000MB right now,
but it seems to fluctuate a little. I seem to barely use any of this
swap anyways.

The status page for alt-f says I have a md0 with 2.7TB capacity, and
(at the time) only 2.5TB available. I currently have only 179.7GB
available, but the sum of the folders (including the alt-f and user
folders) is 2.37TB. Shouldn't I have 300 or so GB of free space? Are
there 130GB being used up by some temp files, or logs or something?
When I mount in windows, it also shows a drive size of 2.68TB, free
space of 179GB, but only 2.37TB taken up by my massive video folder,
and the 30MB or so for alt-f files. I tried the "enlarge" or "expand"
feature (I forget the exact wording) to no avail. I am positive that I
had 300GB free on stock firmware. Should I repartiton these drives?
Would a FSCK discover more usable space somehow? Is it "bad" to have a
raid-0 so full? Would I get more usable space from a JBOD?

It almost feels like bad sectors or something are "using up" this
space, drives are healthy according to SMART. Installing alt-f was an
effort to prolong the usefulness of this box for my media purposes -
there is no questioon that it has done that, but I hope not at the
cost of aprox. 130GB

As far as the MediaTomb installation: a reboot of the box allowed it
to install fine. Going to see if I can run MediaTomb and MiniDLNA side-
by-side and see which I like better on my PS3.
> ...
>
> read more »

Joao Cardoso

unread,
Nov 19, 2011, 4:20:48 PM11/19/11
to al...@googlegroups.com

On Saturday, November 19, 2011 00:08:53 TJ wrote:

...

> By "see" the drives, I mean in windows. Previosly I could mount "/mnt"

> and md0, and the two swap partitons were visible, I could even

> navigate into them, install packages into them.


gee... do a quick google search on 'swap' or 'paging'


A swap partition is where the operation system (linux) stores running programs and running programs data when main (physical) memory is not enough to hold them; this happens either when there are too many programs running on a computer, or they are processing large amounts of data, and physical memory is small.

If you have 500MB on an active swap partition, this sums to the 64MB of physical memory, and the end result is like if the dns had 564MB of memory.


If you don't have an active swap partition, then you can't run programs that need more them 64MB.


Conclusion: a swap partition is needed on linux, and it is *not* for user manipulation.


Notice that it is not enough to have a partition of type swap to have swap enabled; a command ('mkswap') is needed to properly format the partition, and the partition has to be activated with the command 'swapon'. The first command is executed by the Disk Partitioner or Disk Wizard, and the second is executed at boot, so you don't have to worry about that.


For completeness: a swap file could be used instead of a partition, but it is less efficient. MS-Windows uses a swap file, it is a hidden file located at the disk root, I don't remember its name now.


> I'm sure it is better

> that I can't now. The status page shows a swap of 1000MB right now,

> but it seems to fluctuate a little. I seem to barely use any of this

> swap anyways.


That is the used and total swap space,

Swap: 0.3/1023 MB

means 1023MB available (two 512MB partitions, one per disk -- makes swaping even more efficient) and 300KB in use.

When you start use mediatomb you will be the amount of used swap increase.


> The status page for alt-f says I have a md0 with 2.7TB capacity, and

> (at the time) only 2.5TB available. I currently have only 179.7GB

> available, but the sum of the folders (including the alt-f and user

> folders) is 2.37TB. Shouldn't I have 300 or so GB of free space? Are

> there 130GB being used up by some temp files, or logs or something?

> When I mount in windows, it also shows a drive size of 2.68TB, free

> space of 179GB, but only 2.37TB taken up by my massive video folder,

> and the 30MB or so for alt-f files.


The same way as your wardrobe "wastes" some space for the drawers, a filesystem needs space to hold your files.

When a filesystem is created 5% of the available space is reserved for the filesystem to use (the drawers). Different filesystem use different amounts of data, so for the same partition, ext2 can "waste" less space than "ext4".


You could specify less space to "waste", but there could be the possibility of you end-up having free disk space and no possibility of creating new files (no drawers available, although there is plenty of space in the wardrobe).

The default"wasted" space is empirically determined, but on systems with huge amount of small files 5% is not enough and at FS creatioing time one must reserve more space; on the other side, when a "small" amount of large files are the usage pattern, the default reserved space is indeed wasted.


> I tried the "enlarge" or "expand"

> feature (I forget the exact wording) to no avail. I am positive that I

> had 300GB free on stock firmware. Should I repartiton these drives?


No


> Would a FSCK discover more usable space somehow?


No


> Is it "bad" to have a raid-0 so full?


No. Raid-0 is bad by itself if you don't backup it frequently.


> Would I get more usable space from a JBOD?


No


> It almost feels like bad sectors or something are "using up" this

> space,


No


> drives are healthy according to SMART. Installing alt-f was an

> effort to prolong the usefulness of this box for my media purposes -

> there is no questioon that it has done that, but I hope not at the

> cost of aprox. 130GB


I just created a 10GB partition and formated it with ext2/ext3/ext4 and used the 'df -h' command to see how much space the FS "wasted":


ext2:

Filesystem Size Used Available Use% Mounted on

/dev/dm-0 9.8G 22.5M 9.3G 0% /mnt/altf-lvol0


ext3/ext4:

Filesystem Size Used Available Use% Mounted on

/dev/dm-0 9.8G 150.6M 9.2G 2% /mnt/altf-lvol0


You see that ext2 is the less waste-full filesystem, using only 22.5MB, while ext3/ext4 uses 150MB. Notice that there are *no* files in the filesystem!


aiai... for completess, I formated it also with NTFS:


Filesystem Size Used Available Use% Mounted on

/dev/dm-0 10.0G 51.9M 9.9G 1% /mnt/altf-lvol0


and vfat:

Filesystem Size Used Available Use% Mounted on

/dev/dm-0 10.0G 8.0K 10.0G 0% /mnt/altf-lvol0


So, for the maximum disk pay-load you should use vfat, and return to MS-DOS and 1980. Good trip :-)



Reply all
Reply to author
Forward
0 new messages