Search This Blog

Wednesday, 25 July 2018

Building a low energy media server with Olimex Lime2

Objective : replace my current server (loud, HW RAID0, 2 * 1Tb discs, tower case), with something that is fault tolerant, silent, and consumes a bare minimum of power.

Requirements

  • redundant storage for all my music
  • fast network connection
  • low power consumption

Solution

So, let's do this!

  • Get the Lime2, install Debian on SD Card, connect to ethernet (I'm using Ethernet over power line)
  • Connect via ssh with uname root, password olimex
  • Hey - there it is!  Let's apt-get update and upgrade.
  • So I'll switch it off, and connect the HDD using SATA cable.  The power for the SATA is next to the SATA connector on the Lime2.
  • Now we need to format it.
root@A20-OLinuXino:/dev# fdisk -l

Disk /dev/nand: 7.4 GiB, 7969177600 bytes, 15564800 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
Disklabel type: dos
Disk identifier: 0x00000000

Device     Boot Start      End  Sectors  Size Id Type
/dev/nand1         63 15550919 15550857  7.4G 83 Linux

Disk /dev/sda: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/mmcblk0: 7.4 GiB, 7969177600 bytes, 15564800 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
Disklabel type: dos
Disk identifier: 0x6f20736b

Device         Boot Start      End  Sectors  Size Id Type
/dev/mmcblk0p1       2048    34814    32767   16M 83 Linux
/dev/mmcblk0p2      34816 15564799 15529984  7.4G 83 Linux

We need to format the disk and create a file system,  let's go for ext4

root@A20-OLinuXino:/dev# fdisk sda

Welcome to fdisk (util-linux 2.25.2).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.

Device does not contain a recognized partition table.
Created a new DOS disklabel with disk identifier 0x87e5db31.

Command (m for help): c
DOS Compatibility flag is set (DEPRECATED!)

Command (m for help): c       
DOS Compatibility flag is not set

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

Created a new partition 1 of type 'Linux' and of size 931.5 GiB.

Command (m for help): w
The partition table has been altered.
Calling ioctl() to re-read partition table.
Syncing disks.

Let's create the file system

root@A20-OLinuXino:/dev# mkfs -t ext4 /dev/sda1
mke2fs 1.42.12 (29-Aug-2014)
Discarding device blocks: done                            
Creating filesystem with 244190390 4k blocks and 61054976 inodes
Filesystem UUID: ff9d77c0-dd69-4925-9c6c-36c818ee2578
Superblock backups stored on blocks: 
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 
4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968, 
102400000, 214990848

Allocating group tables: done                            
Writing inode tables: done                            
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done   

No comments:

Post a Comment