2020-02-16

ehowton: (BSD)
I haven't done this since Solaris 8:

First, create a RAID-1 mirror on two of the thumbdrives:

root@raspberrypi:~# lsscsi
[0:0:0:0] disk SanDisk Ultra Fit 1.00 /dev/sda
[1:0:0:0] disk SanDisk Ultra Fit 1.00 /dev/sdb
[2:0:0:0] disk SanDisk Ultra Fit 1.00 /dev/sdc
[3:0:0:0] disk SanDisk Ultra Fit 1.00 /dev/sdd


root@raspberrypi:~# mdadm -C -n2 -l1 /dev/md0 /dev/sd{a,b}

root@raspberrypi:~# cat /proc/mdstat

Personalities : [raid6] [raid5] [raid4] [raid1]
md0 : active raid1 sdb[1] sda[0]
60055552 blocks super 1.2 [2/2] [UU]
[=============>.......] resync = 65.2% (39190976/60055552) finish=38.5min speed=9024K/sec


WAIT

md0 : active raid1 sdb[1] sda[0]
60055552 blocks super 1.2 [2/2] [UU]

root@raspberrypi:~# mdadm -C -n2 -l1 /dev/md1 /dev/sd{c,d}

root@raspberrypi:~# cat /proc/mdstat

Personalities : [raid6] [raid5] [raid4] [raid1]
md1 : active raid1 sdd[1] sdc[0]
60055552 blocks super 1.2 [2/2] [UU]
[==============>......] resync = 73.9% (44421120/60055552) finish=27.9min speed=9313K/sec

WAIT

md1 : active raid1 sdd[1] sdc[0]
60055552 blocks super 1.2 [2/2] [UU]


Then RAID-0 stripe the new mirrored devices:

root@raspberrypi:~# mdadm -C -n2 -l0 -c64 /dev/md10 /dev/md{0,1}
mdadm: Defaulting to version 1.2 metadata
mdadm: array /dev/md/md10 started.


root@raspberrypi:~# cat /proc/mdstat
Personalities : [raid6] [raid5] [raid4] [raid1] [raid0]
md10 : active raid0 md1[1] md0[0]
120045568 blocks super 1.2 64k chunks

md1 : active raid1 sdd[1] sdc[0]
60055552 blocks super 1.2 [2/2] [UU]

md0 : active raid1 sdb[1] sda[0]
60055552 blocks super 1.2 [2/2] [UU]

unused devices:


PUT A FILESYSTEM ON IT AND MOUNNT THE RAID 1+0

root@raspberrypi:/# mkfs.ext4 /dev/md10
mke2fs 1.43.4 (31-Jan-2017)
Creating filesystem with 30011392 4k blocks and 7503872 inodes
Filesystem UUID: 74a1ee72-9440-4435-b9d8-8a29cf052ab8
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624, 11239424, 20480000, 23887872

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


root@raspberrypi:/# mount /dev/md10 /NAS/

root@raspberrypi:/# df -h /NAS

Filesystem Size Used Avail Use% Mounted on
/dev/md10 113G 61M 107G 1% /NAS



https://www.golinuxcloud.com/configure-hybrid-software-raid-10-linux/
◾ Tags:

June 2025

S M T W T F S
1 2 3 4 5 6 7
8 9 1011121314
15161718192021
22232425262728
2930     

Most Popular Tags

Expand Cut Tags

No cut tags