DSM-G600, DNS-3xx and NSA-220 Hack Forum

Unfortunately no one can be told what fun_plug is - you have to see it for yourself.

You are not logged in.

#1 2014-09-28 19:02:03

Pantiez
New member
Registered: 2014-09-27
Posts: 4

[GUIDE]Raid1+4K AlignmentIssue Guide+NoMore"RebuildYourHarddrive"+2TB

[GUIDE]Raid1+4K AlignmentIssue Guide+NoMore"RebuildYourHarddrive"+2TB ext3
Quick Introduction-
-I'm not a Linux person, totally noob, who just want basic function out of this box, with optimum speed.
-Spend almost the whole hours, weeks, banging my head to the wall, trying to figure out from what is /dev/md0 to hd_verify (-w) and why firmware 1.09 is more stable than 1.10. It's sucks for a newbie like myself. But all is worth it now!
-Use this guide at your own risk! You make brick & void your Dlink Waranty!
-Performing this guide, will improve our Dlink-323 performance. I own 2 of it now, so I am a happy camper.

Requirement:-
-putty
-download:- https://drive.google.com/folderview?id= … sp=sharing (@DNS-323ReadyToCopyToVolume_1.zip, download, extract to Volume_1)
-Dlink-323 HW Rer C or C1, with 1.08b9 http://support.dlink.com.au/download/do … ct=DNS-323 (It should work with 1.09....)
-2TB empty HDD x2 and set both HDD to standard with ext3(Most Stable) - You will see Volume_1 and Volume_2 in \\yourIP\Volume_x
- sda should be RIGHT HDD, sdb should be LEFT HDD


Guide A:-
1. Flash to 1.08 (if it matters)
2. But both HDD to standards, reboot, and you should see Volume_1 and Volume_2
3. Download the file from my googledrive, extract it to only Volume_1 and reboot.
4. putty (use telnet) into the device
5. You will see something like this:-
stdin, stdout, etderr: 0 1 2


BusyBox v1.2.1 (2006.10.30-10:27+0000) Built-in shell (ash)
Enter 'help' for a list of built-in commands.

#


>>>>>>Guide A Complete.


Guide B:-
1. Do not touch the putty prompt, leave it open.
2. Login to your Dlink-323 GUI via web browser (e.g. http://192.168.0.32)
3. Perform your Raid 1, with "Disable Auto-Rebuild" and "Ext 3 Most Stable"... and allow it to create the Raid 1 Completely!
4. DO NOT CLICK RESTART! (VERRRRRY IMPORTANT)
5. Your putty should be still active.

>>>>>>Guide B Complete.


Guide C:- (you can perform cat /proc/md0 to see the current raid status)
1. Type :-
./fdisk -lu
NOT
fdisk -lu
2. Here's the guide from https://docs.google.com/document/pub?id … _OpLbd4Npg (Special thanks to them)
with my modification a little. I copy and paste, but the outcome should be the same. DO TAKE NOTE, the copy and paste is based upon 1.5TB HDD! Mine is 2TB HDD!
Also, if you have problem with pressing "Enter" key that auto-invoke "Double enter", use "Alt-Enter" instead. I will guide you through below using ( ) this.

==========================Copy&Paste==========================
You will need to do this step twice for both /dev/sda & /dev/sdb



# ./fdisk -u /dev/sda



The number of cylinders for this disk is set to 182401.

There is nothing wrong with that, but this is larger than 1024,

and could in certain setups cause problems with:

1) software that runs at boot time (e.g., old versions of LILO)

2) booting and partitioning software from other OSs

   (e.g., DOS FDISK, OS/2 FDISK)



Command (m for help): d

Partition number (1-4): 1



Command (m for help): d

Partition number (1-4): 2



Command (m for help): n

Command action

   e   extended

   p   primary partition (1-4)

p

Partition number (1-4): 1  (USE ALT-ENTER HERE, TO ALLOW YOU TO GO TO THE NEXT LINE)

First sector (63-2930277167, default 63): 64 <- Realignment of the swap partation

Last sector, +sectors or +size{K,M,G} (64-1060289, default 1060289):

Using default value 1060289



Command (m for help): n

Command action

   e   extended

   p   primary partition (1-4)

p

Partition number (1-4): 2 (USE ALT-ENTER HERE, TO ALLOW YOU TO GO TO THE NEXT LINE)

First sector (63-2930277167, default 63): 3164808 <- Realignment of the Data partation (USE ALT-ENTER HERE, TO ALLOW YOU TO GO TO THE NEXT LINE)

Last sector, +sectors or +size{K,M,G} (3164808-2930277167, default 2930277167): +1998GB (USE THIS VALUE, SINCE YOU USING 2TB HDD, not 1.5TB)


Command (m for help): p



Disk /dev/sdb: 1500.3 GB, 1500301910016 bytes

255 heads, 63 sectors/track, 182401 cylinders, total 2930277168 sectors

Units = sectors of 1 * 512 = 512 bytes

Disk identifier: 0x5c25e06e



   Device Boot      Start         End      Blocks   Id  System

/dev/sdb1              64     1060289      530113   83  Linux

/dev/sdb2         3164808  2928946058  1462890625+  83  Linux

/dev/sdb4         1060290     3164804     1052257+  83  Linux



Partition table entries are not in disk order



Command (m for help): t

Partition number (1-4): 1

Hex code (type L to list codes): 82

Changed system type of partition 1 to 82 (Linux swap / Solaris)



Command (m for help): p



Disk /dev/sdb: 1500.3 GB, 1500301910016 bytes

255 heads, 63 sectors/track, 182401 cylinders, total 2930277168 sectors

Units = sectors of 1 * 512 = 512 bytes

Disk identifier: 0x5c25e06e



   Device Boot      Start         End      Blocks   Id  System

/dev/sdb1              64     1060289      530113   82  Linux swap / Solaris

/dev/sdb2         3164808  2928946058  1462890625+  83  Linux

/dev/sdb4         1060290     3164804     1052257+  83  Linux



Partition table entries are not in disk order



Command (m for help): w

The partition table has been altered!



Calling ioctl() to re-read partition table.

#



Please do the same for /dev/sdb

==========================Copy&Paste END==========================

At the very end of fdisk for /dev/sda and /dev/sdb, Don't worry if you get this message:-

The kernel still uses the old table.
The new table will be used at the next reboot.


4. Perform ./fdisk -ul, it should looks like this below:-
# # ./fdisk -ul


Disk /dev/sda: 2000.3 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 cylinders, total 3907029168 sectors
Units = sectors of 1 * 512 = 512 bytes
Disk identifier: 0xd957e6f4

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1              64     1060289      530113   82  Linux swap / Solaris
/dev/sda2         3164808  3905508558  1951171875+  83  Linux
/dev/sda4         1060290     2088449      514080   83  Linux

Partition table entries are not in disk order

Disk /dev/sdb: 2000.3 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 cylinders, total 3907029168 sectors
Units = sectors of 1 * 512 = 512 bytes
Disk identifier: 0x413f5ad1

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1              64     1060289      530113   82  Linux swap / Solaris
/dev/sdb2         3164808  3905508558  1951171875+  83  Linux
/dev/sdb4         1060290     2088449      514080   83  Linux

Partition table entries are not in disk order

5. Go back to the browser, you may click RESTART.

>>>>>>Guide C Complete.


Guide D:- (The trick to get rid of "RebuildYourHarddrive")
1. After restarting, 5 things you need to know and ensure, for this section:-
- Volume_2 is gone. (As expected)
- Your Volume_1 still have your extracted files and You can Telnet back in.
- If your Volume_1 is empty, go ahead and extract those from @DNS-323ReadyToCopyToVolume_1.zip again, Restart via Website TOOL>System>Restart and get back into putty(Telnet).
- If you are prompt for "RebuildYourHarddrive", click SKIP!
- If you click on "Status" in your Web Interface, It should say:-
HARD DRIVE INFO :

Total Drive(s):  2
Volume Name:  Volume_1
Volume Type:  RAID 1
Sync Time Remaining:  320 minutes (or some value)
Total Hard Drive Capacity:  1966819 MB
Used Space:  1943750 MB
Unused Space:  23068 MB

2. Also, ensure your fdisk /lu settings are still there:-
# # ./fdisk -ul


Disk /dev/sda: 2000.3 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 cylinders, total 3907029168 sectors
Units = sectors of 1 * 512 = 512 bytes
Disk identifier: 0xd957e6f4

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1              64     1060289      530113   82  Linux swap / Solaris
/dev/sda2         3164808  3905508558  1951171875+  83  Linux
/dev/sda4         1060290     2088449      514080   83  Linux

Partition table entries are not in disk order

Disk /dev/sdb: 2000.3 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 cylinders, total 3907029168 sectors
Units = sectors of 1 * 512 = 512 bytes
Disk identifier: 0x413f5ad1

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1              64     1060289      530113   82  Linux swap / Solaris
/dev/sdb2         3164808  3905508558  1951171875+  83  Linux
/dev/sdb4         1060290     2088449      514080   83  Linux

Partition table entries are not in disk order

# #

3. Type this as frequent as you want:-
cat /proc/mdstat

to see the status. It will take about about, 20-30 minutes until you come across this :-
# # cat /proc/mdstat

Personalities : [linear] [raid0] [raid1]
md0 : active raid1 sda2[2](F) sdb2[1]
      1951171776 blocks [2/1] [_U]
      [==========================================>]  resync =210.0% (4098655424/                       1951171776) finish=21.2min speed=1679792K/sec
unused devices: <none>
# #

NOTE:- If you get success and don't have the error above, skip to Guide F. In my case, both of my Dlink-323 have error above.

4. Bingo, it is either sda2[2](F) that fail, or sdb2[1](F) that fail! Don't PANIC! Based on my case above, sda2[2](F) It is the RIGHT Drive.
5. Now, go to the website, Enable Auto-Rebuild (You can turn it off later once all is done)
6. Website TOOL>System>SHUT DOWN

>>>>>>Guide D Complete.


Guide E:-
1. Take out RIGHT Harddisk (Based on my case, could be different that yours.. depending on sda or sdb in GUIDE D)
2. Turn on the device
3. Go to the GUI and ensure under "STATUS" that the drive has been degraded
4. Again, Ensure that the "Enable Auto-Rebuild" option is Enabled (TOOLS>Raid) and click Apply
5. Shutdown via GUI
6. Put back the RIGHT drive(or LEFT), and than turn it Back On and it will magically fix itself (for me, 2 hours and 30 minutes for it to completely sync) THE SYNC MUST COMPLETE BEFORE GOING FURTHER TO GUIDE F!!!
7. You can also login to the website, goto STATUS and monitor it. At the end, it should show "Sync Time Remaining:  Completed "
**Reason is because, somehow auto-rebuild ignores everything and rebuild everything.. that fixes the RebuildYourHarddrive prompts whenever you login to the GUI.

>>>>>>Guide E Complete.


Guide F: (Final, I hope)
1. Again, (if required) copy back the files into Volume_1 from @DNS-323ReadyToCopyToVolume_1.zip and reboot and get back into putty(Telnet). (Ignore Step 1 if you can putty/telnet already)
2. Check ./fdisk -ul if you must, it should show the same values. But most importantly:-
# # cat /proc/mdstat
Personalities : [linear] [raid0] [raid1]
md0 : active raid1 sda2[0] sdb2[1]
      1951401408 blocks [2/2] [UU]

unused devices: <none>

** If you have come this far like I did, give yourself an applause!!!

3. Okay the final step that you MUST do this:-
smb stop
umount -a
free (if you want verify your swap, it should be 0, means not being use)
swapoff /dev/sda1
swapoff /dev/sdb1
mkswap /dev/sda1
mkswap /dev/sdb1
swapon /dev/sda1
swapon /dev/sdb1
free (if you want verify your swap, it should be 0, means not being use)

4. Since we now know, step 2, the Raid 1 is successfully Synced, you can perform this:-
mke2fs -j -m 0 /dev/md0

5. After format ext3 completed:-
reboot


>>>>>>Guide F Complete.


~The End~




P/s: I sincerely hope this guide can bless someone out there. I actually performed and typing this guide, at the same time, to ensure the integrity of the step shown here, is correct. It works for me and my drive now reading/writing faster, with RAID 1, and getting rid of RebuildYourHarddrive" .


[My personal Articles/Research/Findings]
https://docs.google.com/document/pub?id … QKLmMROF7A
https://docs.google.com/document/pub?id … _OpLbd4Npg
http://forums.dlink.com/index.php?PHPSE … c=11631.75
http://dns323.kood.org/forum/viewtopic.php?id=5830

Last edited by Pantiez (2014-09-28 19:06:20)

Offline

 

#2 2014-10-03 17:59:59

Pantiez
New member
Registered: 2014-09-27
Posts: 4

Re: [GUIDE]Raid1+4K AlignmentIssue Guide+NoMore"RebuildYourHarddrive"+2TB

If this doesn't work.. try this..
http://forums.dlink.com/?topic=14484.0

Another shorter way, thanks to the link above:-

Initial:-
Right - HDD Left - EMPTY

1. Turn on, format the drive Standard + ext3
2. Reboot, than (@DNS-323ReadyToCopyToVolume_1.zip, download, extract/copy to Volume_1)
3. Shutdown the device via GUI/Website, insert the HDD to the Left bay.

Right - HDD Left - HDD

4. Turn it on, Telnet(putty) in, and you will see the prompt.
5. Login to the website and you be greeted with:-
HARD DRIVE CONFIGURATION :
Your new second hard drive will now be formatted. The existing hard drive will not lose any data.
Reconfigure to RAID 1

6. Tick the Checkbox-Reconfigure to RAID 1, BUT DO NOT CLICK NEXT!
7. Go back to putty, perform the fdisk...etc.. (GUIDE C as my previous post) but only to /dev/sda . (I don't think you need to do for /dev/sdb since it works for me)
8. Perform below after you have fdisk.
mkswap /dev/sda1
mke2fs -j -m 0 /dev/sda2  (If you are getting error, type umount -a, it should allow you to format normally)
9. After format completed, Close putty,  go back to GUI and click next, Enable Auto-Rebuild(you can disable it later) and allow it to complete.
10. After complete, the GUI request you to restart. Once restart, be patient! The disks are resycing.
11. Completed.

- Just tested it today and it works for me again. Hope it helps.

Last edited by Pantiez (2014-10-04 09:27:07)

Offline

 

#3 2014-10-06 06:17:10

Pantiez
New member
Registered: 2014-09-27
Posts: 4

Re: [GUIDE]Raid1+4K AlignmentIssue Guide+NoMore"RebuildYourHarddrive"+2TB

[GUIDE] - FINAL and much more easy approach.


I bought the 3rd Dlink-323. I tested for hours. I just had to share this new experience.

If the above doesn't work for you, I found an easier approach.
I discover that the 1.10 had fdisk done correctly for me, just not that stable.


1. Upgrade firmware to 1.10 (temporary - will revert back to 1.08 or .109) , Reboot
2. Restore to Factory Default , Reboot
3. Create Raid 1, Ext 2 or Ext 3, Auto-Rebuild, follow by restart.
4. @DNS-323ReadyToCopyToVolume_1.zip , extract it volume_1, followed by reboot.
5. Type:-
raidstop
umount -a
smb stop
6. Type below, according to whether it is ext2 or ext3 that you choose, on step 2.
mke2fs -j -m 0 -T largefile4 /dev/md0     (for ext3)
or
mke2fs -m 0 -T largefile4 /dev/md0     (for ext2)

7. after than, reboot via GUI or type reboot in the terminal
8. You should be able to access \\IP\Volume_1
9. After verification, Downgrade the firmware to 1.08 or 1.09 than restart
10. Restore to Factory (If you notice, even if you downgrade, it still shows 1.10 after reboot. This Restore, will fix that issue)
11. Now it will shows 1.08 or 1.09.
12. You are done. You can now Disable Auto-Rebuild and store your files! big_smile

-End Of Guide-

Last edited by Pantiez (2014-10-06 06:23:12)

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB