upgrading my dns-323 to 2 X 2 TB II - format

After a few attempts which ended in failure, I managed to format my 2 x 2TB 4k Western Digital drives. Now that it’s done, it seems incredibly simple. It is also “sticky”, meaning it does not need to be performed on each reboot (DUH!). 

As explained in the first part, it makes far more sense to use 2 separate drives as opposed to JBOD, RAID 0 or RAID 1. However, if you are keen on using RAID, I included a guide at the end, courtesy of dmcwai.

In summary, I will be formatting the drives with the DNS-323 utility, install funplug, root it, install the functional fdisk, telnet into the box,

I followed this step-by-step procedure:

dlink dns-323 formatting drives1. Label the drives, then install them; access the web interface and format. I had already upgraded to the latest firmware (1.08), but if you have not, consider doing so after format is complete.

dns323-format2. Download and install funplug. Go to the URL in the image (also linked below, in sources), then download the latest fun-plug (i.e., the fun_plug and fun_plug.tgz files) and save them into the root of Volume_1 via the network share. Reboot your unit and if the install is successful, the .tgz file will have been exploded into the /ffp directory.

fun-plug download 3. After making sure that the /ffp directory exists and the .tgz file has been deleted (signifying a successful install of funplug), telnet into the box. I prefer Putty; if you don’t, just press Windows Key + R and then type “telnet 192.168.x.y” then enter, replacing x and y with the appropriate numbers you can get from your router; or just use the name of the device instead of 192.. – in my case, dlinky.

After getting a prompt, set the root password then login as root:

/ # passwd
Changing password for root
Enter the new password (minimum of 5, maximum of 8 characters)
Please use a combination of upper and lower case letters and numbers.
New password:
Bad password: too simple.
Warning: weak password (enter it again to use it anyway).
New password:
Re-enter new password:
Password changed.
/ # login root
Password:
No mail.
root@dlinky:~#

I used something simple, as it is only temporary.

5. Download & install fdisk. The default fdisk will fail with a “segmentation fault”. Luckily, you can download a working version from the link below. It’s bzipped, so you’ll have to uncompress it to the root of Volume_1. I used 7zip on my desktop, but any archiver will do. Rename the existing fdisk by adding a .old extension, then move the new fdisk in the sbin directory and make it executable:

root@dlinky~# cd /mnt/HD_a2/ffp/sbin
root@dlinky:/mnt/HD_a2/ffp/sbin# mv fdisk fdisk.old
root@dlinky:/mnt/HD_a2/ffp/sbin# ls ../..
fdisk     ffp       ffp.log   fun_plug
root@dlinky:/mnt/HD_a2/ffp/sbin# mv ../../fdisk .
root@dlinky:/mnt/HD_a2/ffp/sbin# chmod +x fdisk

6. Stop mess-around processes. I used /dev/sd?1 in the swapoff command, but I see no reason why it shouldn’t works just for b, as that’s the only one you’ll be using.

root@dlinky:/# smb stop
$Shutting down SMB services:
$Shutting down NMB services:
root@dlinky:/# nfs stop
-sh: nfs: not found
root@dlinky:/# swapoff /dev/sdb1
root@dlinky:/# umount -a
umount: can't umount /dev/pts: Device or resource busy
umount: can't umount /mnt/HD_a2: Device or resource busy
umount: can't umount /sys/crfs: Device or resource busy
umount: can't umount /: Device or resource busy
umount: can't umount /: Device or resource busy

7. You’re finally ready to fdisk it:

root@dlinky:/# fdisk -u /dev/sdb

The number of cylinders for this disk is set to 243201.
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): p

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: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1              63     1060289      530113+  82  Linux swap / Solaris
/dev/sdb2         2088450  3907024064  1952467807+  83  Linux
/dev/sdb4         1060290     2088449      514080   83  Linux

Partition table entries are not in disk order

Command (m for help): d
Partition number (1-4): 1

Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 1
First sector (63-3907029167, default 63): 64
Last sector, +sectors or +size{K,M,G} (64-1060289, default 1060289):
Using default value 1060289

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): 2
First sector (63-3907029167, default 63): 3164808
Last sector, +sectors or +size{K,M,G} (3164808-3907029167, default 3907029167):
Using default value 3907029167

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: 2000.3 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 cylinders, total 3907029168 sectors
Units = sectors of 1 * 512 = 512 bytes
Disk identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1              64     1060289      530113   82  Linux swap / Solaris
/dev/sdb2         3164808  3907029167  1951932180   83  Linux
/dev/sdb4         1060290     2088449      514080   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.
Syncing disks.

8. Create the swap and turn it on. In my initial round, I turned all of them on (sd?1) because I had turned all of them off.

root@dlinky:/# mkswap /dev/sdb1
Setting up swapspace version 1, size = 542831616 bytes
root@dlinky:/# swapon /dev/sdb1

9. Format the partition with make2fs. This will take a while.

root@dlinky:/# mke2fs -j -m 0 -T largefile4 /dev/sdb2
mke2fs 1.41.0 (10-Jul-2008)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
476576 inodes, 487983045 blocks
0 blocks (0.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=0
14893 block groups
32768 blocks per group, 32768 fragments per group
32 inodes per group
Superblock backups stored on blocks:
        32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
        4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968,
        102400000, 214990848

Writing inode tables:     0/14893    ..                          
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 37 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.

10. Make it permanent.

root@dlinky:/# hd_verify –w
hd verify v1.23.10072009
Force write verify to hd

11. Shutdown, swap discs among themselves, then reboot and repeat the whole procedure to properly 4k format the other disc as well. Make sure you reboot and test that both drives are formatted with the second partition starting on 64 and that they are writable.

12. I will now commence the copying of the data from my 2 TB array onto one or both drives. To do so, I will place the 2 RAID drives in the DNS-323 and the 2 x 2 TB will be mounted under Linux on my multiboot desktop, using Thermaltake Blacx docking station and / or a 5.25” Trayless SATA Hot Swap Drive Bay.

dns-323 + thermaltake blacx docking station + StarTech 5.25" Trayless SATA Hot Swap Drive Bay

I don’t expect any problems in copying the data, but I will update this document if I encounter any. It turns out that copying the whole thing might take the whole day. I’m thinking to attach the 2TB monster to dlinky via USB and rsync the data using DNS-323.

Sources / More info: funplug-dl, funplug-howto, fdisk-forum, fdisk-download, dcmwai-raid-guide

blog comments powered by Disqus
Your gift enables us to continue to provide high quality reporting with little or no advertising.