raspberry with FreeBSD as NAS to backup iSCSI another raspberry

Hi, I'm a new and not expert about NAS.
What I would like to do is backup my raspberry#1 (that has raspbian stretch with domoticz), creating "image" of the whole system every XX hour on a Raspberry#2 that is the "nas" with FreeBSD.
On both raspberry (1 and 2) I would like to avoid to vrite on SD and using barryboot to use usb HDD:
now, on raspberry#1 i have raspbian stretch, and my idea, if it's possible, is:
on both raspberry i would like to use berryboot:
- on rasbperry#1 with raspbian but thanks to berryboot write on usb hdd1 (connected to raspberry1)
- on raspberry#2 with freeBSD buth thanks to berryboot write on usb hdd2 (connected to raspberry2)
with iSCSI make the image of raspberry#1 and store on HDD of raspberry#2

is it possibile?
thanks to all
 
Why boot from external hard disk? Why not use the SD card just as a boot/root disk, and then put a separate file system on the external hard disk? The root/boot file system gets very little write traffic, so it is a good fit for SD card.

And before you try this, you should do a little speed testing of the interfaces on the RPi. The Ethernet is only 100 base T (10 MByte/s). That's about 15 minutes of the network solidly 100% used to back up a 8GB SD card with the file system of the other RPi. In practice, it will take somewhat longer for the network part alone. You should mock up the end-to-end (RPi #1 to disk on RPi #2) connection and measure the speed, and decide whether it is appropriate for your design goals.
 
what i would like to implement is a iSCSI on raspberry an "raspberry NAS" due to have very small image and make the backup quick.
right now i do not have two raspberry.
only one that has SD and raspbian, so i can't perform the test.

Anyway if i buy a nas like synology (or something alse) what could be the advantage for my purpose, instead of a RPI ?

thanks so much for your help
 
I understand what and why you want to build. The RPi is very tempting for this application, because of its tiny size and power consumption. There is a reason I have 3 RPIs at home, two in production, one as a test bed on the lab bench. The wonderful thing about the RPi is that it can run a full-fledged general purpose OS, and yet it is tiny and uses only 2 or 3 W. I'm pretty sure that a RPi can run an iSCSI server. The price one pays is very little memory, and very low speed. The memory is enough to run a standard file system (be it UFS or ext4), probably not enough for a high-reliability file system like ZFS. In the category of "speed", the problem is less raw CPU speed, but the fact that the memory subsystem has low bandwidth and little caching. The lack of memory will make file system operations slow, since there is little read and write caching, which is how file systems get a lot of their performance. But the real problem is IO speed: All IO goes through a small number of USB links, which means that disk and ethernet is limited to around 10MByte/s (plus or minus a factor of several), not around 100-1000 MByte/s.

If you can handle the larger physical size and power consumption of a machine with say 4 or 8 GByte of RAM and real (S)ATA interfaces and gigabit Ethernet, you will have two big advantages: Your NAS will run at about 100 MByte/s instead of about 10MByte/s, and you can run a file system that is tolerant against undetected disk errors and can be made tolerant of complete disk failure if you have two disks, like ZFS. Whether that's a good or bad tradeoff for you is a question I can't answer.
 
Back
Top