Having issues setting up a RAID1 using mdadm

dietpi-backup uses rsync under the hood, but of course you can invoke rsync also manually.
BTW, a RAID is not a backup :upside_down_face:

Yeah not sure how RAID1 is not a backup if when you copy something to it - it makes 2 versions on 2 separate drives - ok so dietpi-backup - is there some docs or something I can check out - basically will want it to check a couple of folders for any changes - if there are copy that over to the other drive - is that possible? Don’t think I’ll need version control or anything like that - just going to be a dump for photos and vids mainly - thanks in advance

or you look into dietpi-sync to sync specific folders between 2 disk

dietpi-backup is usually a full system backup and not intended to backup dedicated folders.

Cloud and Backup Systems Software Options - DietPi.com Docs there’s a bunch of stuff here - is there one you’d recommend as family friendly as will need to explain to the Mrs - something we can access via the web or some app on mobile and copy directly from our phones maybe :smiley:

You would need to be a little bit more specific on what you are trying to do.

Saving files from a mobile or desktop computer is completely independent on using a Raid or 2 dedicated HDD? These are 2 different uses cases. First one is a backup of client scenario while the 2nd would be backup/sync/protect data

OT, why RAID is not a backup

Because it guards only against one kind of hardware failure. But what is if there is a fire in your flat, or you get some overvoltage (for whatever reason) and kills your electronic devices? Sure these are unlikely events, but if they happen you are screwed.
So the main purpose for RAID 1 are the higher read speeds, I would say.
A common rule is the 1-2-3 backup strategy, or at least a copy on another device which is not connected to power and network all the time.

even more easier. If you delete a file, it’s gone.
However, on a backup, it would be still available and could be restored.

1 Like

OK so the initial plan was to have a RAID1 setup, but that didn’t go to well - don’t think the rpi3b has the horsepower to set that up on 2 5tb drives.

So, new plan will be to format both drives as standard ext4 - copy all our existing data (photos etc) to drive A - then using some cloud sync software magic get a folder /family-photos and /videos copied over to drive B.

Once that is complete I’d like drive B to watch the specified folders on drive A and sync any new files over. So on my phone I can go to ip/magic-cloud-sync software copy some new photos to drive A and then they’d get backed up to drive B.

Hope that makes some kind of sense

have a look to dietpi-sync to keep your folder in sync between drive A and B

to move pictures from mobile device to drive A, I would recommend to create a Samba share on drive A and have an app like FolderSync doing the magic to copy stuff over

Any other way to just format these drives drive_manager doesn’t want to do it

Perhaps something to do with starting that raid nonsense on it?

Probably broken / corrupted gpt table bc of tghe failed RAID build (had the same issue when I ran into the undervoltage problems as I did testing)
I used gdisk to destroy all GPT data and after that I was able to reformat:

gdisk /dev/sdx #probably /dev/sdb, check before executing

> x     # expert mode

> z     # zap (destroy) GPT data structures and exit

For dietpi-backup I suggest our docs (System Maintenance - DietPi.com Docs).


[FAILED] DietPi-Drive_Manager | Unable to continue, DietPi-Drive_Manager will now terminate.

root@DietPi:~# gdisk /dev/sdb
-bash: gdisk: command not found
root@DietPi:~# sudo gdisk /dev/sdb
sudo: gdisk: command not found

Any other way to do that?

Fdisk has the same input/output error

can you check for kernel error messages

dmesg -l 0,1,2,3
10.068742] vc_sm_cma_vchi_init: failed to open VCHI service (-1)
[   10.068769] [vc_sm_connected_init]: failed to initialize shared memory service
[   10.147986] bcm2835_mmal_vchiq: Failed to open VCHI service connection (status=-1)
[   11.551402] hwmon hwmon1: Undervoltage detected!
[  133.688931] critical target error, dev sdb, sector 10239999992 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 2
[  133.689110] Buffer I/O error on dev sdb, logical block 1279999999, async page read
[  133.811695] critical target error, dev sdb, sector 10239999872 op 0x0:(READ) flags 0x80700 phys_seg 1 prio class 2
[  133.813081] critical target error, dev sdb, sector 10239999872 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 2
[  133.813251] Buffer I/O error on dev sdb, logical block 1279999984, async page read
[  135.597975] critical target error, dev sdb, sector 10239997824 op 0x0:(READ) flags 0x80700 phys_seg 1 prio class 2
[  135.603375] critical target error, dev sdb, sector 10239997824 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 2
[  135.603556] Buffer I/O error on dev sdb1, logical block 1279999472, async page read
[  152.671446] hwmon hwmon1: Undervoltage detected!
[  176.863432] hwmon hwmon1: Undervoltage detected!

You have a power problem on your device. This could be a power supply unit that is too small or if the power cable is defective. The problem can also occur if the discs do not have their own (separate) power supply. As long as the problem with the power supply has not been solved, you do not need to look any further.

Oh man I’ve got one of those 30w plugs - perhaps the wire isn’t beefy enough. Also have a powered hub for the hdd

I’ve changed the wire and have moved my media HDD to the powered hub so only one usb port being used and it’s for the powered hub.

Looks like the undervoltage issue has gone at least

root@DietPi:~# dmesg -l 0,1,2,3
[    5.224010] critical target error, dev sdb, sector 10239999992 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 2
[    5.225484] Buffer I/O error on dev sdb, logical block 1279999999, async page read
[    7.028107] vc_sm_cma_vchi_init: failed to open VCHI service (-1)
[    7.028138] [vc_sm_connected_init]: failed to initialize shared memory service
[    7.099385] bcm2835_mmal_vchiq: Failed to open VCHI service connection (status=-1)
[    7.362402] critical target error, dev sdb, sector 10239999872 op 0x0:(READ) flags 0x80700 phys_seg 1 prio class 2
[    7.373204] critical target error, dev sdb, sector 10239999872 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 2
[    7.375008] Buffer I/O error on dev sdb, logical block 1279999984, async page read
[  104.722896] critical target error, dev sdb, sector 10239999872 op 0x0:(READ) flags 0x80700 phys_seg 1 prio class 2
[  104.723961] critical target error, dev sdb, sector 10239999872 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 2
[  104.724060] Buffer I/O error on dev sdb, logical block 1279999984, async page read
[  168.549556] critical target error, dev sdb, sector 10239999872 op 0x0:(READ) flags 0x80700 phys_seg 1 prio class 2
[  168.550517] critical target error, dev sdb, sector 10239999872 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 2
[  168.550611] Buffer I/O error on dev sdb, logical block 1279999984, async page read
[  168.688968] critical target error, dev sdb, sector 10239999992 op 0x0:(READ) flags 0x80700 phys_seg 1 prio class 2
[  168.689834] critical target error, dev sdb, sector 10239999992 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 2
[  168.689943] Buffer I/O error on dev sdb, logical block 1279999999, async page read
[  168.701467] critical target error, dev sdb, sector 10239999976 op 0x1:(WRITE) flags 0x800 phys_seg 3 prio class 2
[  168.701637] Buffer I/O error on dev sdb, logical block 1279999997, lost async page write
[  168.703500] Buffer I/O error on dev sdb, logical block 1279999998, lost async page write
[  168.707426] Buffer I/O error on dev sdb, logical block 1279999999, lost async page write
[  168.748787] critical target error, dev sdb, sector 10239999960 op 0x1:(WRITE) flags 0x800 phys_seg 5 prio class 2
[  168.752157] Buffer I/O error on dev sdb, logical block 1279999995, lost async page write
[  168.755655] Buffer I/O error on dev sdb, logical block 1279999996, lost async page write
[  168.759537] Buffer I/O error on dev sdb, logical block 1279999997, lost async page write
[  168.763757] Buffer I/O error on dev sdb, logical block 1279999998, lost async page write
[  168.768127] Buffer I/O error on dev sdb, logical block 1279999999, lost async page write
[  168.810781] critical target error, dev sdb, sector 10239999992 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 2
[  168.868931] critical target error, dev sdb, sector 10239999872 op 0x0:(READ) flags 0x80700 phys_seg 1 prio class 2
[  168.872817] critical target error, dev sdb, sector 10239999872 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 2
[  168.909727] critical target error, dev sdb, sector 10239999872 op 0x0:(READ) flags 0x80700 phys_seg 1 prio class 2
root@DietPi:~#

sdb still seems to be critical. Did you already tried to wipe whole disk sdb?

Yes whenever I try to format SDB I get the input/output error - I tried it on my windows machine and it showed unallocated so I formatted to NTFS it was fine then I tried again on the pi to format to ext4 and again the same input/output error