Difference between revisions of "Synology"

From Blue-IT.org Wiki

(Mount RAID array of disks with mdadm)
(Mount RAID array of disks with mdadm)
 
Line 1: Line 1:
 
== Mount RAID array of disks with mdadm ==
 
== Mount RAID array of disks with mdadm ==
 +
 +
General information : http://extundelete.sourceforge.net/
  
 
Proven to work:
 
Proven to work:

Latest revision as of 16:14, 28 March 2016

Mount RAID array of disks with mdadm

General information : http://extundelete.sourceforge.net/

Proven to work:

1. Installed Ubuntu 11.10 (also tried with latest version 12.xx)into some spare SATA-drive. No updates needed to be installed. PC must have Internet connection.
2. Attached drive from DS411 which was configured as RAID-1 mirror into Ubuntu PC and booted up.
3. At "Dash Home" search 'disk utility' ans start it to see that attached drive exist and is visible in Linux.
4. Install 'Logical Volume Management' software from "Ubuntu Software Center"
5. Install 'mdadm'. At "Dash Home" search 'terminal' and start it. In terminal type: sudo apt-get install mdadm
6. mdadm installation on first pop-up press 'tab' to get cursor on 'OK' and hit enter, for email configuration choose 'no configuration'
7. After installation is complete type: sudo mdadm --assemble --scan After this command your attached Raid-1 mirror half should be visible on 'disk utility'-software.
8. On disk utility, find selection on attached drive 'start volume group' after all volumes and array should be running, if not try to start volumes separately.
9. Select volume where data is stored (biggest one) and below that click on 'mount'
10. Open 'home folder' attached Raid-1 mirror half should be visible and data can be accessed and copied to other locations.

Here I am using Ubuntu 11 on VirtualBox on OSX Mountain Lion

   Plug in your USB drive
   Go to VirtualBox > Settings > Ports > USB.
   Add a device filter and select the USB disk from the list
   Unmount the drive and unplug
   Start Ubuntu
   Install ecryptfs from the Ubuntu Software Center
   Plug in the drive
   Open the terminal
   Your USB drive will be mounted under /media with a path to the encrypted filesystem such as
   /media/1.41.12-2647/backup/@MyFolder@
   Create a mount point for the filesystem
   sudo mkdir /mnt/MyFolder
   Mount the encrypted folder
   sudo mount -t ecryptfs /media/1.41.12-2647/backup/@MyFolder@ /mnt/MyFolder
   Enter the passphrase you used to to encrypt the drive when prompted
   Choose the AES cipher
   Choose 32 bytes as the key size
   Choose n for Enable plaintext passthrough
   Choose y for Enable filename encryption
   Press return to accept the default for the Filename Encryption Key (FNEK) Signature
   The first time you do this you may get the following warning
   WARNING: Based on the contents of [/root/.ecryptfs/sig-cache.txt],
   it looks like you have never mounted with this key 
   before. This could mean that you have typed your 
   passphrase wrong.
   Choose yes to proceed with the mount and yes to append the sig to the cache file
   Done. Go to /mnt/MyFolder and retrieve your data.

Or you can create a shell script and paste in the following code to simplify the task

stty -echo read -p "Enter passphrase: " PASS; echo stty echo

sudo mount -t ecryptfs -o key=passphrase,ecryptfs_cipher=aes,ecryptfs_key_bytes=32,ecryptfs_passthrough=no,ecryptfs_enable_filename_crypto=yes,passwd=$PASS $1 $2

and use it like this:

sh emount.sh /media/1.41.12-2647/backup/@MyFolder@ /mnt/MyFolder