Super Safe DATA storage solution

(better than the commercial NAS systems)

You can find many NAS (Network Attached Storage) boxes in the computer shops nowadays.
Important to know that these boxes have a high capacity hard disk inside but the problem is, it is only 1 hard disk, if it fails you will lose all your data.
Warranty is only for the hardware, so you will get a new NAS box, but you wont get your data back.

Solution

You can have the same solutions like the big Internet Service Providers or Telecom companies are using.

SignalRAIDers are introducing the RAID solution.

RAID (Redundant Array of Independent Disks) is a data storage virtualization technology that combines multiple disk drive components into a logical unit for the purposes of data redundancy and performance improvement.
The different schemes or architectures are named by the word RAID followed by a number (e.g. RAID 0, RAID 1). Each scheme provides a different balance between the key goals: reliability and availability, performance and capacity. RAID levels greater than RAID 0 provide protection against unrecoverable (sector) read errors, as well as whole disk failure.

Here we use RAID 1 which is complete mirroring of two hard disks.
If one HDD fails, the DATA is still available on the other HDD.

All you need is the followings.:

- RAID capable HDD box - here I highly recommend: icy box IB-RD4320STU3 2x 3.5' SATA Case,
- two good quality HDDs - here I highly recommend: Western Digital Caviar Green - SATA 6Gb/s.

(Green series are for home video servers, lower power consumption and very stable, reliable; for high traffic webserver, black series recommended)

Here comes the configuration:

# BEFORE ACTIVATING RAID 1 THERE ARE TWO INDEPENDENT DISKS

sudo fdisk -l

Disk /dev/sdb: 2000.4 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 30400 cylinders, total 488378646 sectors
Units = sectors of 1 * 4096 = 4096 bytes
Sector size (logical/physical): 4096 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x00000000

Disk /dev/sdb doesn't contain a valid partition table
Note: sector size is 4096 (not 512)

Disk /dev/sdc: 2000.4 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 30400 cylinders, total 488378646 sectors
Units = sectors of 1 * 4096 = 4096 bytes
Sector size (logical/physical): 4096 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x00000000

Disk /dev/sdc doesn't contain a valid partition table



# To activate RAID 1, set the jumpers accordingly on your RAID box - see user manual

# AFTER ACTIVATING RAID 1 THERE IS ONLY ONE DISKS (but of course these are mirrored parallel disks)

sudo fdisk -l

Disk /dev/sdb: 2000.4 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 cylinders, total 3907029168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/sdb doesn't contain a valid partition table



# Next thing is to create a new partition table



zsolt@ubuntu:/dev$ sudo fdisk /dev/sdb
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel with disk identifier 0xe143b32f.
Changes will remain in memory only, until you decide to write them.
After that, of course, the previous content won't be recoverable.

Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

Command (m for help): m
Command action
a toggle a bootable flag
b edit bsd disklabel
c toggle the dos compatibility flag
d delete a partition
l list known partition types
m print this menu
n add a new partition
o create a new empty DOS partition table
p print the partition table
q quit without saving changes
s create a new empty Sun disklabel
t change a partition's system id
u change display/entry units
v verify the partition table
w write table to disk and exit
x extra functionality (experts only)

Command (m for help): n
Partition type:
p primary (0 primary, 0 extended, 4 free)
e extended
Select (default p): p
Partition number (1-4, default 1):
Using default value 1
First sector (2048-3907029167, default 2048):
Using default value 2048
Last sector, +sectors or +size{K,M,G} (2048-3907029167, default 3907029167):
Using default value 3907029167

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.
zsolt@ubuntu:/dev$

# Next create the linux file system on the RAID disk(s)



mkfs.ext4 /dev/sdb1

# and finally you can mount the RAID device into your filesystem

sudo mkdir /media/raid
chmod -R <permissionsettings> raid

sudo mount /dev/sdb1 /media/raid

df -h

# Now you have super safe data storage solution, no need to worry that your holiday photos/videos will ever be lost in your life