RAID your LSpro (v.1) mnt partition functioning like a Duo

From NAS-Central Buffalo - The Linkstation Wiki
Revision as of 09:31, 26 July 2008 by Dommer (Talk | contribs)

Jump to: navigation, search

Preface & disclaimer

After reading Kuroguy's Hardware Hacks for the LS Pro article on Adding an eSATA port, I decided to take it further and have successfully add a second external SATA drive to my LSPro, and have successfully RAID protect the data drive (or /mnt/disk1), and like to share my experience here, hope it will be useful to others. This hack or modification does require both hardware and software skill. And is relatively safe, but still there is a risk of bricking your LSPro. Do it at your own risk.


LSPro running FreeLink Kernel 2.16.16 (one I am using)or above with mdadm support.

Hardware Modification


  • 2. Purchase external eSATA case to house second drive. You can go cheap (like I do) by use an external USB to PATA case with the USB to ATA PCB removed, and connect the SATA directly into the drive via the case cut out or hole. I manage to pick up a cheap external firewire case with build in Power Supply from eBay.

External Case.JPG

  • 3. Move the internal working bootable hard disk into the external case. When 2 hard drives are installed, the external hard disk becomes the boot drive /dev/sda.
  • 4. Install new hard drive (of the same size or larger) into the LSPro, replacing the origin drive.


Configuration and Migration

  • 1. Power up LSPro, and make sure it boot up normally and verify everything functioning normal as before. Dmesg log should indicate 2 drives installed, similar to the following screen, showing 2 drives are detected.


  • 2. If you are completely satisfied with the LS is functioning as before. Partition your internal new drive (/dev/sdb1-5) identical to your original drive (dev/sda1-5). If your new disk is larger than the original disk, you should partition sdb4 and sdb6 to the maximum remaining capacity after partitioning sdb1&2. If you are not familiar with partitioning, please refer to WiKi Custom_Partitions_on_the_LS_Pro
  • 3. Create RAID-1 mount drive, with only one disk (/dev/sdb6) as interim (original mnt disk will become second member after data has been migrated to the RIAD drive) by using the following command: mdadm -C /dev/md0 -l 1 -n 2 missing /dev/sdb6

Mdadm should start building RAID disk /dev/md0, you can monitor the progress by using the following command: cat /proc/mdstat

or check status of the RAID disk with the following command : mdadm --detail /dev/md0

  • 4 On successful creation of /dev/md0. Temporary mount RAID drive as /mnt/disk2. You may need to create mount point /mnt/disk2 if it does not exist.
  • 5. Copy Data from /mnt/disk1 (original NAS data) to /mnt/disk2 (RAID-1 drive with only 1 disk for the moment), by using the following command (please check syntax, as I am not 100%): cp -p -R /mnt/disk1 /mnt/disk2
  • 6 When copy completed, modify your /etc/fstab line entry from: /dev/sda6 /mnt/disk1 to /dev/md0 /mnt/disk1
  • 7. Reboot your LSpro, verify RAID disk /dev/md0 is now being mounted as NAS device (/mnt/disk1).
  • 8. If you are absolutely sure that all is working and all files are available on the network as before, and all the data has been copied to the RAID drive, then you can put configure your old disk /dev/sda6 as part of the RAID member and resync the data by the following command: mdadm /dev/md0 -a /dev/sda6

The resync process can be monitor by using the following commad mdadm --detail /dev/md0 On successful completion of resynchronize of the data, you should see similar display (I was using /dev/md1 instead of /dev/md0)