Install OS on RAID1 thanks to dual SATA board? - Printable Version +- PINE64 (https://forum.pine64.org) +-- Forum: General (https://forum.pine64.org/forumdisplay.php?fid=1) +--- Forum: Getting Started (https://forum.pine64.org/forumdisplay.php?fid=21) +--- Thread: Install OS on RAID1 thanks to dual SATA board? (/showthread.php?tid=7472) Pages:
1
2
|
Install OS on RAID1 thanks to dual SATA board? - Thatoo - 05-07-2019 Hello, Let's say I buy this list ROCKPro64 4GB Single Board Computer ROCKPro64 12V 5A EU POWER SUPPLY ROCKPro64 PCI-e to Dual SATA-II Interface Card ROCKPro64 Metal Desktop/NAS Casing Fan for ROCKPro64 Metal Desktop/NAS casing 16GB CLASS10 MICROSD CARD and two SSD drive How can I install armbian on a RAID1 of these two drives? I understood that these two drives can't boot. I need to flash the SDcard with armbian installer (https://www.armbian.com/rockpro64/) and I'll always have to boot from SDcard. However, I think it's better to install and use the system from SSD because it's safer (Sdcard don't last long) and SSD have more capacity and they would be in RAID1 (so safer also) So, how can I boot from SDcard but have armbian system installed on SATA and specifically on RAID1 (2 SSD)? Do you know tutorials (text or video) explaining how to reach to this situation? - How to create RAID1 for 2 SATA drive connected to ROCKPro64 through the ROCKPro64 PCI-e to Dual SATA-II Interface Card? - How to install armbian system to this RAID1 from the micro SDcard plugged in the ROCKPro64? Now a side question : as we are talking about SATA-II, I guess the speed of SSD doesn't really matter as it is SATA-II which will limit the speed? RE: Install OS on RAID1 thanks to dual SATA board? - markb1 - 05-07-2019 I don't have my RockPro64, yet. (It's on its way!) I hope to do something similar. You should be able to put just the boot partition on the SD card, and then put your root partition on SATA drive. The best way to accomplish this may be to start with a complete Linux image on the SD card and boot up on it. Then setup the SATA drives as RAID1, create a partition, and copy the root partition files from the SD card over. Then configure your fstab to make the new partition root and update your bootloader configuration. Note: The above is all speculation, and I haven't tried it! But what I really want to do with my system is eliminate the SD card dependency entirely. I think this should be possible with u-boot, assuming u-boot has built-in support for SATA. Just flash u-boot the SPI and configure it to boot from SATA! Probably easier said than done! But it seems like it should be possible. RE: Install OS on RAID1 thanks to dual SATA board? - Thatoo - 05-08-2019 (05-07-2019, 04:34 PM)markb1 Wrote: I don't have my RockPro64, yet. (It's on its way!) I hope to do something similar. You should be able to put just the boot partition on the SD card, and then put your root partition on SATA drive. The best way to accomplish this may be to start with a complete Linux image on the SD card and boot up on it. Then setup the SATA drives as RAID1, create a partition, and copy the root partition files from the SD card over. Then configure your fstab to make the new partition root and update your bootloader configuration. As your RockPro64 is on the way and you plan to try that out, would you mind taking notes of your work and share them or even better write a step by step tutorial that, who knows, could be published on pine64's wiki? That would be awesome! RE: Install OS on RAID1 thanks to dual SATA board? - markb1 - 05-08-2019 I'll definitely document what I do, in some way! I can put a tutorial in the wiki, assuming I get it working! RE: Install OS on RAID1 thanks to dual SATA board? - markb1 - 05-08-2019 It looks like Armbian has a script for setting up boot on SD, system on SATA: https://docs.armbian.com/User-Guide_Getting-Started/#how-to-install-to-emmc-nand-sata-usb I don't quite understand the documentation, though, particularly the required conditions. Anyway, I'm thinking you can setup the RAID1, partition and format it, and then use the create_armbian function from that script. RE: Install OS on RAID1 thanks to dual SATA board? - markb1 - 05-09-2019 Got my RockPro64 today. NOTE: Updated with step 7. Now it survives a reboot! First experiment: RAID1 on SATA via BTRFS, with boot on SD card Result: easy! Not hard once you know what you're doing! Steps:
And that's it! If you want to use mdraid, it's going to be a little bit more work. You'll have to modify the nand-sata-install script, because it wants to format a partition. You'll have to remove that formatting part from the script and make it use a pre-formatted partition. RE: Install OS on RAID1 thanks to dual SATA board? - markb1 - 05-09-2019 Update: Not so easy! It turns out, it did not survive a reboot. RE: Install OS on RAID1 thanks to dual SATA board? - Thatoo - 05-10-2019 Thank you for your notes. Anyone here to help him? RE: Install OS on RAID1 thanks to dual SATA board? - Thatoo - 05-10-2019 I asked for help on #rock64:matrix.org matrix room chat but couldn't get any help there. If I understand well, you setup the RAID1 correctly, then you partition and format it, and finally you installed armbian script to install it in order to boot on SD and have the system on SATA/ Am I correct? And after all that, when you reboot it, it didn't work. What didn't work? It didn't boot at all? or does it boot from SD but don't reach system on the RAID1 SATA? Are both of your drive correctly powered? I could read many people talking about power problem, need of external power supply and stuff, a button to push to power SATA drives... [I can't find back these threads...]. Right now I found that thread : https://forum.pine64.org/showthread.php?tid=6932&highlight=raid1 I hope you'll manage to make it work and do a beautiful tutorial for other newbies. Thank you. RE: Install OS on RAID1 thanks to dual SATA board? - markb1 - 05-10-2019 (05-10-2019, 11:19 AM)Thatoo Wrote: I asked for help on #rock64:matrix.org matrix room chat but couldn't get any help there. Sort of. With btrfs, you create the partition first, on one drive, and format it, before adding the second drive. With just one drive, and letting nand-sata-install format the partition as btrfs, booting worked fine. After the nand-sata-install script is when I turned the one-drive btrfs partition into a two-drive RAID1 btrfs partition. (That's one of the advantages that btrfs has over mdraid: it's super easy to add drives to an existing configuration.) Quote:And after all that, when you reboot it, it didn't work. At this point, I just know it didn't boot up completely. The white LED turns on for a bit, and then turns off. I can't connect to it on the network. There's no monitor attached, so I don't know if it's displaying any error messages. But I will hook up a monitor if necessary to debug this. Some research suggests that there is some special configuration that needs to be done to the bootloader for booting multi-drive btrfs partitions. I'm still looking into it. Unfortunately, there isn't as much knowledge out there on btrfs compared to mdraid, since btrfs isn't as mature. Quote:Right now I found that thread : https://forum.pine64.org/showthread.php?tid=6932&highlight=raid1 I saw that thread. I think the power supply issue depends on the exact drives in use. So far, I don't suspect that, because the RAID1 configuration works fine until I reboot. Anyway, I'm continuing to work on this. |