08-03-2016, 08:46 PM
Finally I got time to do my new pc based on ASRock N3700 Mobo
Used "btrfs" and 4 X Drives for "RAID10 or 1+0" allows for 2 of 4 drive failures, Striped Mirrors.
inxi:
Code:
System: Host: asrock1 Kernel: 4.4.0-31-generic x86_64 (64 bit)
Desktop: Xfce 4.12.3 Distro: Ubuntu 16.04 xenial
Machine: Mobo: ASRock model: N3700-ITX
Bios: American Megatrends v: P1.70 date: 04/18/2016
CPU: Quad core Intel Pentium N3700 (-MCP-) cache: 1024 KB
clock speeds: max: 2400 MHz 1: 1791 MHz 2: 1929 MHz 3: 1285 MHz
4: 1174 MHz
Graphics: Card: Intel Device 22b1
Display Server: X.Org 1.18.3 drivers: intel (unloaded: fbdev,vesa)
Resolution: [email protected]
GLX Renderer: Mesa DRI Intel HD Graphics (Cherryview)
GLX Version: 3.0 Mesa 11.2.0
Audio: Card Intel Device 2284 driver: snd_hda_intel
Sound: Advanced Linux Sound Architecture v: k4.4.0-31-generic
Network: Card: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
driver: r8169
IF: p2p1 state: up speed: 1000 Mbps duplex: full
mac: d0:50:99:a3:b1:81
Drives: HDD Total Size: 1000.2GB (0.6% used)
ID-1: /dev/sda model: Samsung_SSD_850 size: 250.1GB
ID-2: /dev/sdb model: Samsung_SSD_850 size: 250.1GB
ID-3: /dev/sdc model: Samsung_SSD_850 size: 250.1GB
ID-4: /dev/sdd model: Samsung_SSD_850 size: 250.1GB
Partition: ID-1: / size: 466G used: 5.2G (2%) fs: btrfs dev: /dev/sda1
ID-2: /home size: 466G used: 5.2G (2%) fs: btrfs dev: /dev/sda1
RAID: No RAID devices: /proc/mdstat, md_mod kernel module present
Sensors: System Temperatures: cpu: 35.0C mobo: 42.0C
Fan Speeds (in rpm): cpu: N/A fan-1: 2323 fan-2: 0
Info: Processes: 222 Uptime: 23:52 Memory: 594.9/15531.8MB
Client: Shell (bash) inxi: 2.2.35
Code:
sudo btrfs filesystem show /
Label: 'RAID10' uuid: 19d017b7-058b-4129-afc0-94d87f09d062
Total devices 4 FS bytes used 5.10GiB
devid 1 size 232.88GiB used 5.54GiB path /dev/sda1
devid 2 size 232.88GiB used 5.54GiB path /dev/sdb1
devid 3 size 232.88GiB used 5.54GiB path /dev/sdc1
devid 4 size 232.88GiB used 5.54GiB path /dev/sdd1
Code:
sudo btrfs filesystem usage -H /
Overall:
Device size: 1.00TB
Device allocated: 23.79GB
Device unallocated: 976.44GB
Device missing: 0.00B
Used: 10.95GB
Free (estimated): 491.56GB (min: 491.56GB)
Data ratio: 2.00
Metadata ratio: 2.00
Global reserve: 83.89MB (used: 0.00B)
Data,RAID10: Size:8.59GB, Used:5.25GB
/dev/sda1 2.15GB
/dev/sdb1 2.15GB
/dev/sdc1 2.15GB
/dev/sdd1 2.15GB
Metadata,RAID10: Size:3.22GB, Used:220.17MB
/dev/sda1 805.31MB
/dev/sdb1 805.31MB
/dev/sdc1 805.31MB
/dev/sdd1 805.31MB
System,RAID10: Size:83.89MB, Used:16.38kB
/dev/sda1 20.97MB
/dev/sdb1 20.97MB
/dev/sdc1 20.97MB
/dev/sdd1 20.97MB
Unallocated:
/dev/sda1 247.08GB
/dev/sdb1 247.08GB
/dev/sdc1 247.08GB
/dev/sdd1 247.08GB
Built in the smallest case I could find with a single 5.25" inch bay to take the 4 X 2.5" drive bay adaptor.((DVD Case for comparative size))
Sorry, picture not great, from my phone, you can just make out the 4 Drives bays, you can open and change drives.
![[Image: xSXH53q.jpg]](http://i.imgur.com/xSXH53q.jpg)
Here's the "How I Did It" ~ Install "LL-BTRFS - RAID10 ~ 4 Disks"
This is based on info from various sources, did test in Virtualbox first.
Boot LL Live from USB/CD/DVD
First open a terminal and do a
Code:
ll /dev/sd
Then
Create Disk Partition(s) (see note at end on swap**)
Open "gparted" and select 1st disk, "sda"
Then go: Device > Create Partion Table, select "DOS"
Then create a "single partitition on each of the sdX's, "DO NOT" select file system type and leave "unformatted"
repeat this for each of the disk: sdb & sdc and sdd. ((btrfs automatically created a /home))
Next
Create File System & RAID for installation.
Open a terminal. (ctrl+alt+t)
Code:
sudo mkfs.btrfs -L RAID10 -m raid10 -d raid10 /dev/sda1 /dev/sdb1 /dev/sdc1 /dev/sdd1
Start installation, at the where to install, make sure to select "Other"
Just make selection "change" to install on the1st drive "sda1 = /"
>> DO NOT TICK FORMAT <<
Select use as "btrfs file system"
You only need to select the first disk partion "sda1" for "/" and "sda2" if you created "swap"
Click the "Install Now" button. ((btrfs will know to install to all 4 drives))
Click "Continue" to the various dialogue box's about partitions...
At GRUB dialogue box, you will get "Errors", select "Continue" without installing,
When install finishes, select "Continue Testing".
Then:
Open a terminal. (ctrl+alt+t)
Code:
sudo mount -t btrfs -o subvol=@ /dev/sda1 /target
sudo mount --bind /proc /target/proc
sudo mount --bind /sys /target/sys
sudo mount --bind /dev /target/dev
sudo mount --bind /dev/pts /target/dev/pts
sudo mount --bind /dev/shm /target/dev/shm
sudo cp -f /etc/resolv.conf /target/etc/resolv.conf
sudo chroot /target
grub-install /dev/sda
grub-install /dev/sdb
grub-install /dev/sdc
grub-install /dev/sdd
update-grub
Close any open terminals.
Shutdown, remove the LL boot disk, and re-boot.
All being well you should now be in LL, and on Btrfs RAID 10.
"NOTE" - There is an Ubuntu bug that "may" give an error at boot on btrfs, I did not get the error, but to fix it:
Code:
gksu leafpad /etc/grub.d/00_header
Edit line that starts with: if [ -n “\${have_grubenv}
and change it to: # if [ -n “\${have_grubenv}
Then save & exit and re-boot.
To check basics, open a terminal. (ctrl+alt+t)
Code:
sudo btrfs filesystem show
sudo btrfs filesystem df /
sudo btrfs device stats /mnt
Carry on with your normal set-up.
**swap
If you have 4GB or more of memory, you probably don't need swap for general Desktop use.
If less than 4GB, create a swap, larger then your memory, say 1.5X or 2X memory.