Currently I am building a nextcloud server on Ubuntu 20.04. I got one disk for the OS to run on a 320GB harddisk. And I want the data directory to be in a raid1 array, because if one drive fails we still have the other drive with the data. So I got 2 harddisks of 500GB in a raid1 array on /dev/md0.
When I run:
Personalities : [raid1] [linear] [multipath] [raid0] [raid6] [raid5] [raid4] [raid10] md0 : active raid1 sdb sdc 488254464 blocks super 1.2 [2/2] [UU] bitmap: 0/4 pages [0KB], 65536KB chunk unused devices: <none>
it says its active, when i run: sudo mdadm --detail /dev/md0
/dev/md0: Version : 1.2 Creation Time : Fri Aug 14 16:50:18 2020 Raid Level : raid1 Array Size : 488254464 (465.64 GiB 499.97 GB) Used Dev Size : 488254464 (465.64 GiB 499.97 GB) Raid Devices : 2 Total Devices : 2 Persistence : Superblock is persistent Intent Bitmap : Internal Update Time : Sat Aug 15 14:50:13 2020 State : clean Active Devices : 2 Working Devices : 2 Failed Devices : 0 Spare Devices : 0 Consistency Policy : bitmap Name : nextcloudserver:0 (local to host nextcloudserver) UUID : e525d3e8:2d738f44:59d495fa:2fdcce41 Events : 9032 Number Major Minor RaidDevice State 0 8 16 0 active sync /dev/sdb 1 8 32 1 active sync /dev/sdc
it says thate state is clean. Shouldn't it be resyncing ?
Sudo mdadm --detail /dev/md0
mdadm: No md superblock detected on /dev/md0.
Did I miss something out?
So /dev/md0 is mounted on /mnt/raid1. I created a text file in /mnt/raid1. When I shut down the pc and plug out one hdd's in the raid1 array and boot the pc. I can't find the textfile that I made in /mnt/raid1.
And if I run cat /proc/mdstat it says status is inactive
So could anyone help me out whit mirroring the disks. So that if one fails nextcloud still has the date on the other disk.
Any help would be appreciated thanks in advance
This is the tutorial I followed: (https://www.linuxbabe.com/linux-server/linux-software-raid-1-setup)
Until step 5 it works for me. After plugin out one of the harddrives I can't follow along anymore.