<div dir="ltr"><div>Don't quote me, but I seem to recall something about the later versions of the Pi being friendlier to the idea of an external HDD. Better power management or something like that... I'll see if I can find where I saw that.</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, 11 Feb 2019 at 17:24, Stuart Seeley <<a href="mailto:stuart@lowlevel.ca">stuart@lowlevel.ca</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto"><div>I'm curious how this performs for you guys... I seem to recall some kind of hardware limitation where the ethernet and the usb couldnt work at the same time...</div><div id="gmail-m_4342056126815620324AppleMailSignature"><br></div><div id="gmail-m_4342056126815620324AppleMailSignature">ie: I would download a file over smb... and there would be disk reading or network activity but never simultaneously...</div><div id="gmail-m_4342056126815620324AppleMailSignature"><br></div><div id="gmail-m_4342056126815620324AppleMailSignature">Might have been raspberry pi 1 or 2...</div><div id="gmail-m_4342056126815620324AppleMailSignature"><br></div><div id="gmail-m_4342056126815620324AppleMailSignature">Stuart<br><br>Sent from my iPhone</div><div><br>On Feb 11, 2019, at 1:59 PM, Raymond Chen <<a href="mailto:raymondchen625@gmail.com" target="_blank">raymondchen625@gmail.com</a>> wrote:<br><br></div><blockquote type="cite"><div><div dir="ltr">That happened to my SD card a lot when my Pi served WordPress. <div>Does your hard drive have to connect to the PI directly? If your router supports network storage, connecting your hard drive to it and mount it through SMB is another option.<div><br></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Feb 11, 2019 at 5:57 AM Charles M <<a href="mailto:chaslinux@gmail.com" target="_blank">chaslinux@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div dir="auto">What if you connect the HD ro a powered USB hub and then connect the hub to the Pi? Yes it adds more wires, but should solve the voltage issues.</div></div><div dir="auto"><br></div><div dir="auto">Otherwise saw those cheap Kingston 120GB SSDs for a crazy $27.99 at CC with lots in stock.</div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Feb 10, 2019 at 6:42 PM Khalid Baheyeldin <<a href="mailto:kb@2bits.com" target="_blank">kb@2bits.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>I am looking to replace the SD card in the Pi with an external USB hard drive, because</div><div>of how using the SD card as the regular filesystem, kills it quick if the Raspberry Pi is busy.</div><div><br></div><div>The disk in question is a 2.5" HDD in an unpowered SATA to USB enclosure. <br></div><br><div>What is on the web is that the Raspberry Pi does not provide enough current to power on <br></div><div>regular hard drives. One overcomes this by having the following line in /boot/config.txt:</div><div><br></div><div>max_usb_current=1<br></div><div><br></div><div>And now the Pi will provide enough current for some disks to work.</div><div><br></div><div>I plugged in the 2.5" USB disk into an old Pi 2, and I got this:</div><br><div>[1915663.656110] <b>Under-voltage detected!</b> (0x00050005)<br>[1915665.896054] usb 1-1.2: new high-speed USB device number 6 using dwc_otg<br>[1915666.027408] usb 1-1.2: New USB device found, idVendor=152d, idProduct=0539<br>[1915666.027426] usb 1-1.2: New USB device strings: Mfr=10, Product=11, SerialNumber=3<br>[1915666.027437] usb 1-1.2: Product: USB to ATA/ATAPI Bridge<br>[1915666.027448] usb 1-1.2: Manufacturer: JMicron<br>[1915666.027458] usb 1-1.2: SerialNumber: 00A1234568BF<br>[1915666.028810] usb-storage 1-1.2:1.0: USB Mass Storage device detected<br>[1915666.034242] scsi host0: usb-storage 1-1.2:1.0<br>[1915667.097004] scsi 0:0:0:0: Direct-Access FUJITSU zzzzz 0100 PQ: 0 ANSI: 6<br>[1915667.098779] sd 0:0:0:0: [sda] 488397168 512-byte logical blocks: (250 GB/233 GiB)<br>[1915667.099523] sd 0:0:0:0: [sda] Write Protect is off<br>[1915667.099542] sd 0:0:0:0: [sda] Mode Sense: 67 00 10 08<br>[1915667.100531] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, supports DPO and FUA<br>[1915667.126638] sd 0:0:0:0: Attached scsi generic sg0 type 0<br>[1915667.167254] sda: sda1 sda2 < sda5 ><br>[1915667.171010] sd 0:0:0:0: [sda] Attached SCSI disk<br>[1915669.896159] <b>Voltage normalised</b> (0x00000000)<br>[1915765.621420] sda: sda1 sda2 < sda5 ><br>[1915802.971527] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: (null)<br></div><div><br></div><div><div> I was able to mount filesystems from the hard disk, even without the above max current parameter.</div></div><div>So, it seems that this step is not necessary anymore.</div><div><br></div><div>But then I saw these in dmesg:</div><div><br></div><div>[1919494.831934] usb 1-1.2: reset high-speed USB device number 72 using dwc_otg<br>[1919499.991904] usb 1-1.2: device descriptor read/64, error -110<br>[1919515.351869] usb 1-1.2: device descriptor read/64, error -110<br>[1919515.571861] usb 1-1.2: reset high-speed USB device number 72 using dwc_otg<br>[1919520.711888] usb 1-1.2: device descriptor read/64, error -110<br>[1919536.071810] usb 1-1.2: device descriptor read/64, error -110<br>[1919536.291810] usb 1-1.2: reset high-speed USB device number 72 using dwc_otg<br>[1919546.831810] usb 1-1.2: device not accepting address 72, error -110<br>[1919546.931778] usb 1-1.2: reset high-speed USB device number 72 using dwc_otg<br>[1919557.471762] usb 1-1.2: device not accepting address 72, error -110<br>[1919557.472224] usb 1-1.2: USB disconnect, device number 72<br>[1919557.490276] sd 1:0:0:0: [sdb] Synchronizing SCSI cache<br>[1919557.492644] sd 1:0:0:0: [sdb] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x01 driverbyte=0x00<br>[1919557.492687] sd 1:0:0:0: [sdb] tag#0 CDB: opcode=0x28 28 00 1c 9c b8 00 00 00 08 00<br>[1919557.492703] print_req_error: I/O error, dev sdb, sector 480032768<br>[1919557.492841] sd 1:0:0:0: [sdb] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x01 driverbyte=0x00<br>[1919557.492863] sd 1:0:0:0: [sdb] tag#0 CDB: opcode=0x28 28 00 00 00 08 18 00 00 08 00<br>[1919557.492874] print_req_error: I/O error, dev sdb, sector 2072<br>[1919557.492916] blk_partition_remap: fail for partition 5<br>[1919557.492936] Buffer I/O error on dev sdb5, logical block 256, async page read<br>[1919557.493019] blk_partition_remap: fail for partition 1<br>[1919557.493032] Buffer I/O error on dev sdb1, logical block 3, async page read<br>[1919557.495651] sd 1:0:0:0: [sdb] Synchronize Cache(10) failed: Result: hostbyte=0x01 driverbyte=0x00<br>[1919557.741765] usb 1-1.2: new high-speed USB device number 73 using dwc_otg<br>[1919562.871741] usb 1-1.2: device descriptor read/64, error -110<br>[1919578.231704] usb 1-1.2: device descriptor read/64, error -110<br>[1919578.451696] usb 1-1.2: new high-speed USB device number 74 using dwc_otg<br>[1919583.591696] usb 1-1.2: device descriptor read/64, error -110</div><div><br></div><div>Perhaps power saving on the USB ports or by the enclosure's electronics?<br></div><div><br></div><div>The other thing is telling the Pi to boot from that USB disk. This requires adding this line to config.txt <br></div><div>while still running from the SD card:</div><div><br></div><div>program_usb_boot_mode=1<br><br></div><div>Then rebooting, and the Pi should boot from the hard disk.</div><div><br></div><div>However, this is not the whole story. <br></div><div><br></div><div>I always installed Raspian on the Pi's using NOOBS. You download a .zip file, extract it to an SD</div><div>card that is formatted as vfat, and off you go. Very easy.</div><div><br></div><div>Eventually, I want to copy the running system's SD card to the hard disk to continue from where</div><div>it is now. <br></div><div><br></div><div>I could not find information on how to install Raspian (or NOOBS) to a hard disk, nor how to have</div><div>the disk partition properly for Raspbian.</div><div><br></div><div>For example, in <a href="https://www.maketecheasier.com/boot-up-raspberry-pi-3-external-hard-disk/" target="_blank">this article</a>, the author walks through the steps of copying the existing running SD <br></div><div>card to the hard disk, but he copies to /dev/sda (the entire disk, not a specific partition on it).</div><div><br></div>So questions:</div><div dir="ltr"><br></div><div dir="ltr">1. How do I install NOOBS to the hard disk? Do I just format it as vfat and copy the contents of <br></div><div>the NOOBS zip to it?<br></div><div dir="ltr"><div><br></div><div>2. How to partition the hard disk for Raspbian?</div><div><br></div><div>3. How to make sure that power saving mode would not affect the USB disk?</div></div></div></div></div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div><br></div>-- <br><div><div dir="ltr" class="gmail-m_4342056126815620324gmail-m_-1162165320922556724m_6067004574317403951gmail-m_-8586752941265418113gmail_signature"><div dir="ltr"><div>Khalid M. Baheyeldin<br><br></div></div></div></div></div></div></div></div>
_______________________________________________<br>
kwlug-disc mailing list<br>
<a href="mailto:kwlug-disc@kwlug.org" target="_blank">kwlug-disc@kwlug.org</a><br>
<a href="http://kwlug.org/mailman/listinfo/kwlug-disc_kwlug.org" rel="noreferrer" target="_blank">http://kwlug.org/mailman/listinfo/kwlug-disc_kwlug.org</a><br>
</blockquote></div></div>-- <br><div dir="ltr" class="gmail-m_4342056126815620324gmail-m_-1162165320922556724gmail_signature">Charles McColm<br>Computer Recycling: <a href="http://www.comprec.org" target="_blank">http://www.comprec.org</a><br>Fasteroids: <a href="http://www.fasteroids.ca" target="_blank">http://www.fasteroids.ca</a><br>Twitter/Identica/Google+: @chaslinux</div>
_______________________________________________<br>
kwlug-disc mailing list<br>
<a href="mailto:kwlug-disc@kwlug.org" target="_blank">kwlug-disc@kwlug.org</a><br>
<a href="http://kwlug.org/mailman/listinfo/kwlug-disc_kwlug.org" rel="noreferrer" target="_blank">http://kwlug.org/mailman/listinfo/kwlug-disc_kwlug.org</a><br>
</blockquote></div>
</div></blockquote><blockquote type="cite"><div><span>_______________________________________________</span><br><span>kwlug-disc mailing list</span><br><span><a href="mailto:kwlug-disc@kwlug.org" target="_blank">kwlug-disc@kwlug.org</a></span><br><span><a href="http://kwlug.org/mailman/listinfo/kwlug-disc_kwlug.org" target="_blank">http://kwlug.org/mailman/listinfo/kwlug-disc_kwlug.org</a></span><br></div></blockquote></div>_______________________________________________<br>
kwlug-disc mailing list<br>
<a href="mailto:kwlug-disc@kwlug.org" target="_blank">kwlug-disc@kwlug.org</a><br>
<a href="http://kwlug.org/mailman/listinfo/kwlug-disc_kwlug.org" rel="noreferrer" target="_blank">http://kwlug.org/mailman/listinfo/kwlug-disc_kwlug.org</a><br>
</blockquote></div>