How to add a second pre-formatted drive to your NAS to copy data from/to: Difference between revisions

From wiki
Jump to navigation Jump to search
imported>RobinGB
(New page: ==This page is under construction DO NOT USE== This page is under construction and not complete enough to be used yet. User: RobinGB 4/5/2008 {| |- !width="400"|__TOC__ ||This page aims t...)
 
imported>RobinGB
mNo edit summary
Line 12: Line 12:
*You know how to login as Admin on the NAS in which you are going to install the disk
*You know how to login as Admin on the NAS in which you are going to install the disk
*The Disk you are adding is already preformated with either ext2 or ext3 (Synology products format internal drives as ext3).
*The Disk you are adding is already preformated with either ext2 or ext3 (Synology products format internal drives as ext3).
*You know that synology boxes load disk in to volumes, e.g. "/volume1" etc. and you know how to acess them, e.g. "cd /volume1" etc.
*You know that synology boxes (linux) load disks in to volumes, e.g. "/volume1" etc. and you know how to acess them, e.g. "cd /volume1" etc.


==Procedure==   
==Procedure==   
Line 19: Line 19:
#Login into the Command Line Interface as "root"
#Login into the Command Line Interface as "root"
#Check what you already have mounted in the system by entering the command "df". Several things will be listed but we are only interested in the "/volume" entries in the very right hand column of the table that is displayed. Everyone should have "/volume1" and depending on how you have your current disks configured you could have "/volume2", "/volume3" etc etc. take note of the last volume number and hence the next free volume number. In my case I had a "/volume1" but NOT "/Volume2". Hence for me "/Volume2" was not being used and this is where this example will load the new drive. If you have "/volume2" or more in your system you need to use the next free volume for all commands given below.
#Check what you already have mounted in the system by entering the command "df". Several things will be listed but we are only interested in the "/volume" entries in the very right hand column of the table that is displayed. Everyone should have "/volume1" and depending on how you have your current disks configured you could have "/volume2", "/volume3" etc etc. take note of the last volume number and hence the next free volume number. In my case I had a "/volume1" but NOT "/Volume2". Hence for me "/Volume2" was not being used and this is where this example will load the new drive. If you have "/volume2" or more in your system you need to use the next free volume for all commands given below.
#Now we check that the new drive is being recognised, enter the command "fdisk -l" thats a lower case L not a 1.
#Now we check that the new drive is being recognised, enter the command "fdisk -l" thats a lower case L not a 1. You will see each installed disk listed and each partition on the disk listed, e.g. Disk1 will be shown as "/dev/sda", with disk2 as "/dev/sdb", disk3 (if you have one) as "/dev/sdc" etc. Disk1 being a synology formated disk will have 3 partions shown as "/dev/sda1", "/dev/sda2" and "/dev/sda3". In my case the disk I added was disk2, hence is shown as "/dev/sdb". The disk I added ("/dev/sdb") was also a synology formated disk and hence has partitions "/dev/sdb1", "/dev/sdb2" and "/dev/sdb3". On a synology formated disk the first two partitions are Synology System partions, the third Partion is where the user data (shared folders) are held.
#Now we need to map the data partion to a directory on the NAS root "/". For windows users the Linux "mount" command makes data on the mounted partition appear in a directory in the operating system root directory. Before we can mount the drive we have to create the directory the mounted drive will be attached to. From the step above the next free volume number I had was "/volume2". Hence create the directory by entering the commands "cd /" and "mkdir volume2". #Now we mount the required partition to directory "/volume2" using the command "mount -t ext3 /dev/hdb3 /volume2"
#Finished, you can use the cp or other commands to copy/move data
#You only created a temporary mount so if you reboot the NAS you will need to reuse the same mount command again.
 
==To remove the Disk==
#Shutdown the NAS and remove the drive.
#When you reboot the NAS you can delete the directory you created for the mount point.

Revision as of 00:04, 5 April 2008

This page is under construction DO NOT USE

This page is under construction and not complete enough to be used yet. User: RobinGB 4/5/2008

This page aims to show you how to add a drive that has already been formatted elsewhere (in my case it was a RAID1 drive removed from a DS-207+ synology NAS) to a synology NAS with a free internal drive bay (in my case a CS-407). My reason for doing this was I wanted to copy the data from the DS-207+ onto a disk in the CS-407 ASAP (yes I could have copied it over ethernet but that takes ages (1TB), and yes I could have used external storage but I didn't have any big enough).

Assumptions

  • You know how to login as Admin on the NAS in which you are going to install the disk
  • The Disk you are adding is already preformated with either ext2 or ext3 (Synology products format internal drives as ext3).
  • You know that synology boxes (linux) load disks in to volumes, e.g. "/volume1" etc. and you know how to acess them, e.g. "cd /volume1" etc.

Procedure

  1. Turn off NAS and install the new drive in an empty disk bay
  2. Power up the NAS and enable the Command Line Interface (Telnet or SSH)
  3. Login into the Command Line Interface as "root"
  4. Check what you already have mounted in the system by entering the command "df". Several things will be listed but we are only interested in the "/volume" entries in the very right hand column of the table that is displayed. Everyone should have "/volume1" and depending on how you have your current disks configured you could have "/volume2", "/volume3" etc etc. take note of the last volume number and hence the next free volume number. In my case I had a "/volume1" but NOT "/Volume2". Hence for me "/Volume2" was not being used and this is where this example will load the new drive. If you have "/volume2" or more in your system you need to use the next free volume for all commands given below.
  5. Now we check that the new drive is being recognised, enter the command "fdisk -l" thats a lower case L not a 1. You will see each installed disk listed and each partition on the disk listed, e.g. Disk1 will be shown as "/dev/sda", with disk2 as "/dev/sdb", disk3 (if you have one) as "/dev/sdc" etc. Disk1 being a synology formated disk will have 3 partions shown as "/dev/sda1", "/dev/sda2" and "/dev/sda3". In my case the disk I added was disk2, hence is shown as "/dev/sdb". The disk I added ("/dev/sdb") was also a synology formated disk and hence has partitions "/dev/sdb1", "/dev/sdb2" and "/dev/sdb3". On a synology formated disk the first two partitions are Synology System partions, the third Partion is where the user data (shared folders) are held.
  6. Now we need to map the data partion to a directory on the NAS root "/". For windows users the Linux "mount" command makes data on the mounted partition appear in a directory in the operating system root directory. Before we can mount the drive we have to create the directory the mounted drive will be attached to. From the step above the next free volume number I had was "/volume2". Hence create the directory by entering the commands "cd /" and "mkdir volume2". #Now we mount the required partition to directory "/volume2" using the command "mount -t ext3 /dev/hdb3 /volume2"
  7. Finished, you can use the cp or other commands to copy/move data
  8. You only created a temporary mount so if you reboot the NAS you will need to reuse the same mount command again.

To remove the Disk

  1. Shutdown the NAS and remove the drive.
  2. When you reboot the NAS you can delete the directory you created for the mount point.