11/14/2022 0 Comments How to merge two pendrives![]() To create the RAID-0 disk need to use the mdadm command below, for more info the man page is quite informative i.e. Sudo lsblk -o NAME, SIZE, FSTYPE, MOUNTPOINTįor this particular system the two USB disks were /dev/sda and /dev/sdb. To identify the devices at the command line type: lsblk, you can also specify the attributes displayed e.g.: ![]() Next, connect the USB hub and plug in the two disks. The downside of using this approach to increase disk performance is that it does increase CPU load. The other alternative is mdadm a command line tool to create and monitor software RAID devices. For max performance you will need a dedicated hardware RAID controller, reducing CPU load, but these are expensive and unsurprisingly not available for the Raspberry Pi :). To create a RAID array you have two choices: hard or soft. these RW processes need to be significantly slower than 35Mbps, otherwise the communication time will become the bottleneck. the process of reading / writing to the NAND flash memory cells i.e. Therefore, for a RAID-0 USB flash drive system to work the bottleneck needs to be inside the USB drive i.e. Reading around there seems to be agreement that the typical max bandwidth of USB2 is 280Mbps or 35MBps, this increasing to a theoretically maximum bandwidth of 53MBps (never seen). In theory performing a simplistic calculation the bandwidth across a USB2 bus should be 60MBps, but this does not take into consideration protocol and system overheads. If you have a USB 2.0 device you can not automatically assume it will be working its max speed as the USB ports may share a common controller, therefore, the bus bandwidth may be shared between multiple devices e.g. The USB 2.0 standard defines three speeds: Low=1.5Mbps, Full=12Mbps and Fast=480Mbps. ![]() ![]() To replicate this experiment I had an old USB2 4 port hub and two USB2 16GB flash drives. In the video there did seem to be some performance gains, which was interesting, time to build my own system. The problem with the USB hub approach is that each disk shares a single bus, therefore, you can't transfer multiple blocks of data to different disks at the same time, USB is a serial bus. if a system wants to store a 200K file it is broken down into two 100K blocks (stripes), each written to a separate disk in parallel, therefore doubling your write performance (overlapping transfers). When i first watched this video i wasn't sure how this would work as the whole premise of RAID-0 is to read and write data to multiple disks in parallel e.g. In this video the presenter used a 10 port USB hub to construct different sized arrays: 2, 4, 8 disks, as shown in figure 2. I watched a YouTube video: LINK, that looked at using USB flash drives in a RAID-0 configuration to see if they could increase read/write speeds. RAID - adding disks to a Pi RAID - adding disks to a Pi ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |