Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
tuyop
Sep 14, 2006

Every second that we're not growing BASIL is a second wasted


Fun Shoe

No problem. For your specific project I think the steps are going to be:

1. Create a mount point and mount your drive(s).
2. Edit fstab so that those devices will mount to the mount points on boot. This part is risky because if you mess it up your pi might not boot again, in which case you'll just have to re-image your card and that's half the fun.
3. Download and configure smb or nfsutils, which are the programs that will share your mounted drives to the network and interpret and route traffic to/from those drives.
4. On your client computer, mount or connect to the host RPi and carry on.

Some things that'll make life easier are: plug the pi into your router directly. Assign it a static IP (and a useful hostname).

Adbot
ADBOT LOVES YOU

beefnoodle
Aug 7, 2004

IGNORE ME! I'M JUST AN OLD WET RAG


I have a Pi 3B in a physical container that makes access to the SD card a pain for regular access. What's the best way to back up the whole device (files + configuration) over the wire?

endlessmonotony
Nov 4, 2009


These are some bad posts, but they're not as bad as OOCC. I pray you recover enough to someday throw OOCC's keyboard into the sea and claim your rightful role as the worst C-SPAM poster.

beefnoodle posted:

I have a Pi 3B in a physical container that makes access to the SD card a pain for regular access. What's the best way to back up the whole device (files + configuration) over the wire?

Entire device backup is a real pain without physical access to the SD card. It's goddamn near impossible.

Do you want to backup the entire device, or just your configs and certain folders of files?

xtal
Jan 9, 2011
Hi, I'm an obnoxious prick. If you see me posting outside of CSPAM, please tell me to go back where I belong.


tuyop posted:

No problem. For your specific project I think the steps are going to be:

1. Create a mount point and mount your drive(s).
2. Edit fstab so that those devices will mount to the mount points on boot. This part is risky because if you mess it up your pi might not boot again, in which case you'll just have to re-image your card and that's half the fun.
3. Download and configure smb or nfsutils, which are the programs that will share your mounted drives to the network and interpret and route traffic to/from those drives.
4. On your client computer, mount or connect to the host RPi and carry on.

Some things that'll make life easier are: plug the pi into your router directly. Assign it a static IP (and a useful hostname).

From their description they're going to use Virtual Here instead of anything step 3 onwards.

https://www.virtualhere.com/usb_server_software

There's info here but I don't know anything else about it since it looks proprietary.

beefnoodle
Aug 7, 2004

IGNORE ME! I'M JUST AN OLD WET RAG


endlessmonotony posted:

Entire device backup is a real pain without physical access to the SD card. It's goddamn near impossible.

Do you want to backup the entire device, or just your configs and certain folders of files?

Coming from the Windows/Mac world, I'm used to thinking in terms of system images. If configs + certain folders means my services (running via PM2) are easy to recover, then I'll take it.

xtal
Jan 9, 2011
Hi, I'm an obnoxious prick. If you see me posting outside of CSPAM, please tell me to go back where I belong.


endlessmonotony posted:

Entire device backup is a real pain without physical access to the SD card. It's goddamn near impossible.

Do you want to backup the entire device, or just your configs and certain folders of files?

This is an important question because if you want full device backup you normally don't have the drive mounted at that point, so while it can be done over the wire, it won't be easy in this case. If you just want to back up stuff like /etc, /home and /var you can use rsync, rsnapshot or Borg depending on your use case. (rsync if you want to copy all the files to another disk on an ad hoc basis, rsnapshot if you want incremental snapshot backups, and Borg if you want to upload them to a repository.)

xtal fucked around with this message at 22:33 on Jan 19, 2021

endlessmonotony
Nov 4, 2009


These are some bad posts, but they're not as bad as OOCC. I pray you recover enough to someday throw OOCC's keyboard into the sea and claim your rightful role as the worst C-SPAM poster.

beefnoodle posted:

Coming from the Windows/Mac world, I'm used to thinking in terms of system images. If configs + certain folders means my services (running via PM2) are easy to recover, then I'll take it.

A system image is really loving hard on Pi hardware without connecting it to a separate host and reader. PC equivalent would be pulling the drive and plugging it into a new system as a non-OS drive.

The OS install is a bit trickier to restore doing the whole backing up specific folders - basically, Windows equivalent is backing up registry and the config folders.

krissgjeng
May 2, 2012


I haven't had problems backing up to a disk image.
While not ideal to back up a running system. as long as you are not having anything major writing to your memory card, such as updates or other file transfers you should be fine. at worst some log files may be corrupted.

An example command i use is: sudo pv /dev/mmcblk0 | lzop -o /mnt/remote_share/pibak.img.lzo
i use pv to get a progress bar and lzop to compress the image.
otherwise you could just use: sudo cat /dev/mmcblk0 > /mnt/remote_share/pibak.img

I have restored backups with images made using this method without problems in the past.

beefnoodle
Aug 7, 2004

IGNORE ME! I'M JUST AN OLD WET RAG


krissgjeng posted:

I haven't had problems backing up to a disk image.
While not ideal to back up a running system. as long as you are not having anything major writing to your memory card, such as updates or other file transfers you should be fine. at worst some log files may be corrupted.

An example command i use is: sudo pv /dev/mmcblk0 | lzop -o /mnt/remote_share/pibak.img.lzo
i use pv to get a progress bar and lzop to compress the image.
otherwise you could just use: sudo cat /dev/mmcblk0 > /mnt/remote_share/pibak.img

I have restored backups with images made using this method without problems in the past.

Trying this tactic, thanks. Now to get past the permission denied error I'm getting on the destination share. It's always something....

krissgjeng
May 2, 2012


beefnoodle posted:

Trying this tactic, thanks. Now to get past the permission denied error I'm getting on the destination share. It's always something....

Here's an example of my smb mount: sudo mount -t cifs -o rw,uid=1000,gid=1000,username=myusername,password=mypassword //192.168.80.200/remote_sharename /mnt/remote_share
uid and gid is my userid, use the "id" command to see yours.

tuyop
Sep 14, 2006

Every second that we're not growing BASIL is a second wasted


Fun Shoe

Anyone get the Linuxserver versions of sonarr and radarr images to work properly on an rpi 3b? They just wonít display their webpages, and donít even seem to be creating config files in the mounted directories, even after clowning those directories with the right user.

SpaceSDoorGunner
May 4, 2018




beefnoodle posted:

I have a Pi 3B in a physical container that makes access to the SD card a pain for regular access. What's the best way to back up the whole device (files + configuration) over the wire?

Just how difficult? At least as a beginner I think I would either decide what I wanted to back up or just say gently caress it take the whole thing apart to get card and save a copy on my main computer

Kinda unfortunate you ended up with a case like that, every case Iíve used made removing the sd easy, that is an odd design choice.

mewse
May 2, 2006




Lots of pi applications end up with it outside in a weatherproof box, it's not unheard of. There's linux software called backup ninja that can harvest whatever paths you specify and mysql databases etc and store incremental backups remotely using rdiff-backup, it's a beast to set up though so it depends how robust you want your backups to be. Using dd on-device to image the mounted sd card seems easiest if it works.

tuyop
Sep 14, 2006

Every second that we're not growing BASIL is a second wasted


Fun Shoe

tuyop posted:

Anyone get the Linuxserver versions of sonarr and radarr images to work properly on an rpi 3b? They just wonít display their webpages, and donít even seem to be creating config files in the mounted directories, even after clowning those directories with the right user.

Cool, turned out to be an OS issue? https://docs.linuxserver.io/faq#my-host-is-incompatible-with-images-based-on-ubuntu-focal

beefnoodle
Aug 7, 2004

IGNORE ME! I'M JUST AN OLD WET RAG


mewse posted:

Lots of pi applications end up with it outside in a weatherproof box, it's not unheard of. There's linux software called backup ninja that can harvest whatever paths you specify and mysql databases etc and store incremental backups remotely using rdiff-backup, it's a beast to set up though so it depends how robust you want your backups to be. Using dd on-device to image the mounted sd card seems easiest if it works.

Yeah it's in a custom case for an embedded tool. I'll read up on the tools you mentioned, thanks.

i vomit kittens
Apr 25, 2019




Does anyone else using PiHole have issues with it locking the filesystem after losing power suddenly? I have two Pis, a Zero and a 4. I've experienced the same problem on both, but only when they're running PiHole; the one that's doing other things works fine after a power outage. The only way to fix it seems to be reimaging.

Blue Footed Booby
Oct 4, 2006

got those happy feet




Slippery Tilde

i vomit kittens posted:

Does anyone else using PiHole have issues with it locking the filesystem after losing power suddenly? I have two Pis, a Zero and a 4. I've experienced the same problem on both, but only when they're running PiHole; the one that's doing other things works fine after a power outage. The only way to fix it seems to be reimaging.

I had an install eat itself after a power outage, but I have no way to verify it was pihole's fault. Mostly I just have issues with it not connecting to the internet after a power cycle until I disconnect and reconnect the ethernet.

Blue Footed Booby fucked around with this message at 15:13 on Jan 22, 2021

Cojawfee
May 31, 2006
I think the US is dumb for not using Celsius

For something like that, I highly suggest getting a cheap battery backup, the simplest 400-600 VA unit ought to do it. You can install the APC UPS daemon on a pi and you can set it up to safely shut down the pi when power is cut to make sure your file system doesn't get borked.

Rescue Toaster
Mar 13, 2003


I have a big Liebert always online UPS and setup network ups tools on my raspberry pi, then my NAS and pfsense router are ups clients. Works great. If you get fancy with the configs you can do things like have the NAS shut down almost immediately, but the wireless stays up for 10-15 minutes before it shuts down the UPS.

Slight caution: The FreeNAS network ups tools automatic configs are *completely hosed* as a network ups client and will not shutdown until after power is cut, 100%. You have to manually edit the config files.

tuyop
Sep 14, 2006

Every second that we're not growing BASIL is a second wasted


Fun Shoe

Rescue Toaster posted:

I have a big Liebert always online UPS and setup network ups tools on my raspberry pi, then my NAS and pfsense router are ups clients. Works great. If you get fancy with the configs you can do things like have the NAS shut down almost immediately, but the wireless stays up for 10-15 minutes before it shuts down the UPS.

Slight caution: The FreeNAS network ups tools automatic configs are *completely hosed* as a network ups client and will not shutdown until after power is cut, 100%. You have to manually edit the config files.

Would you mind sharing your config details? Are you using nut for this? Somehow mine went wrong and suddenly started causing a shutdown every time ethernet was plugged in. I've just completely forgotten how I set it up at this point.

tuyop fucked around with this message at 03:02 on Jan 21, 2021

Rescue Toaster
Mar 13, 2003


I'm in the middle of rebuilding my rpi image using docker for some of the things it's running (unifi controller for example). Once I take another swing at the nut config I'll post it. There was something odd about shutting down the rpis properly if I recall.

Rexxed
May 1, 2010

Dis is amazing!
I gotta try dis!



The Pi foundation is releasing a $4 dual core microcontroller. Seems neat.
https://hackaday.com/2021/01/20/raspberry-pi-enters-microcontroller-game-with-4-pico/

Hadlock
Nov 9, 2004





No wifi/bluetooth

ante
Apr 9, 2005

SUNSHINE AND RAINBOWS

I don't really understand it.

It's not a bad chip, but there's literally no advantage over anything that ST / Espressif / Microchip / Cypress have.

It's an Arm Cortex M0, same as a low power STM32.
It's got a couple cool peripherals, but nothing that's unheard of in some of the other manufacturers.

The price is also decent, but not amazing or anything. It's fine. It seems like an okay microcontroller.


Why?

Dominoes
Sep 20, 2007



My guess is to leverage the brand name and popularity into a different market, and capture the python-only-programmer demographic.

Even further to your point, the low-power STM32s use the range of Arm cores; the L4 I'm using on the latest proj is an M4. From what I gather, the reason to use an M0 is to get the lowest price possible, which seems likely here.

Space Gopher
Jul 31, 2006
BLITHERING IDIOT

Hadlock posted:

No wifi/bluetooth

And no OS, and youíd be hard pressed to put a full network stack in there. But thatís not really the point. The Pi is a way to put a complete (if low-powered) computer into a hobby project. This is a way to put basic smarts on the level of an IR remote or old-school CD boombox into a project.

Although it does look like the silicon is capable of some cool things with a bit of creative pushing. Dual DVI output entirely in software is blowing my mind a little, even if the PHY part needs a custom board and isnít entirely in spec.

Hadlock
Nov 9, 2004





The pi foundation sort of has a platinum level reputation for commercial support + absolutely stellar consumer documentation, and in general they guarantee product availability to commercial customers for 4-8 years which is pretty awesome if you're a digital sign maker of whatever it is you use pis for

So I can sort of see buying this over something else especially if you already have a pre-existing relationship with the mfg

Hopefully they release a wireless thing eventually for custom smart home devices

Varkk
Apr 17, 2004




Space Gopher posted:

And no OS, and youíd be hard pressed to put a full network stack in there. But thatís not really the point. The Pi is a way to put a complete (if low-powered) computer into a hobby project. This is a way to put basic smarts on the level of an IR remote or old-school CD boombox into a project.


It runs micropython which I think has full network support. At least my Weimos D1 board does. It is kind of neat it can either be an access point you can connect to or if you put in your SSID etc it can connect to your home wifi. Then if you connect via ssh you have the micropython shell. I was hoping this Pi device would be similar. I think they are looking at getting in to the space where the Arduinos excel and the full OS of the Pi is overkill and can get in the way.

brand engager
Mar 23, 2011



Hadlock posted:

The pi foundation sort of has a platinum level reputation for commercial support + absolutely stellar consumer documentation, and in general they guarantee product availability to commercial customers for 4-8 years which is pretty awesome if you're a digital sign maker of whatever it is you use pis for

So I can sort of see buying this over something else especially if you already have a pre-existing relationship with the mfg

Hopefully they release a wireless thing eventually for custom smart home devices

Oh did they finally release documentation on the rest of the soc?

Hadlock
Nov 9, 2004





brand engager posted:

Oh did they finally release documentation on the rest of the soc?

I emailed broadcom to check up on open sourcing their main binary blob and this was the verbatim content

brand engager
Mar 23, 2011



That microcontroller thing seems pretty nice, no broadcom bullshit and they've got docs for the chip available thats a nice change.

ante
Apr 9, 2005

SUNSHINE AND RAINBOWS

It's weird seeing people discuss this in the context of "a linux board, but more of a lightweight OS" instead of "a pretty standard microcontroller, just like the ESP32" where running Linux isn't really part of the discussion

Rexxed
May 1, 2010

Dis is amazing!
I gotta try dis!



Yeah who would run linux on a microcontroller? I'm sure it's possible since I ran linux on a 386 but I mean, why besides just to do it. It doesn't seem practical with the Pi Zero or Zero W being available for $1 and $6 more (and yeah of course they're hard to get for those exact prices but I think I have two zero w's I totally meant to make stuff with two years ago in a box).

Blue Footed Booby
Oct 4, 2006

got those happy feet




Slippery Tilde

Cojawfee posted:

For something like that, I highly suggest getting a cheap battery backup, the simplest 400-600 VA unit ought to do it. You can install the APC UPS daemon on a pi and you can set it up to safely shut down the pi when power is cut to make sure your file system doesn't get borked.

Duly noted! Currently I have the pi in a little aluminum case, hooked to a powered USB drive enclosure for full-size drives that currently contains an SSD held in position with cut up toilet paper tubes. This is probably going to end with a case made from an amazon box and burning my house down.

Now off to get sonarr and transmission working.

Blue Footed Booby fucked around with this message at 15:46 on Jan 22, 2021

repiv
Aug 13, 2009



brand engager posted:

That microcontroller thing seems pretty nice, no broadcom bullshit and they've got docs for the chip available thats a nice change.

Yeah I bet this is a trial run for rolling their own higher performance chip for the pi5 or pi6, to get away from Broadcom's NDA hell

FISHMANPET
Mar 3, 2007

Sweet 'N Sour
Can't
Melt
Steel Beams


Hey, question about powering my Raspberry Pi. I'm building a project and the whole thing is powered by a big 5V 5A AC-DC Adapter. It's a pretty basic one I picked up on Amazon, so I wouldn't trust it to always perfectly output exactly 5V. I know I can put 5V directly onto one of the 5V pins on the Pi to power it, and that's worked well enough for me as I'm testing and building this out. I'm driving a display over I2C and a neopixel ring light, which all require the data to be 5V. I've got a level shifter that converts the 3.3V signals from the GPIO pins to the 5V the peripherals require, and it gets set to 5V by an input voltage.

It looks like if the Pi is powered via USB, the 5V is filtered so it's reliably 5V, but if I'm dumping 5V directly onto the rail it's reliant on my adapter to properly filter that voltage. So I'm wondering if I should be looking at some way to provide power over the USB port directly. I'm a little bit concerned about a voltage spike damaging the pi, but more concerned about having a reliable 5V signal to drive the peripherals. And in that case, does anyone know of a way to basically get a cable or adapter with a USB-C connector on one end, and a way to wire directly to my 5v adapter on the other end?

Cojawfee
May 31, 2006
I think the US is dumb for not using Celsius

FISHMANPET posted:

Hey, question about powering my Raspberry Pi. I'm building a project and the whole thing is powered by a big 5V 5A AC-DC Adapter. It's a pretty basic one I picked up on Amazon, so I wouldn't trust it to always perfectly output exactly 5V. I know I can put 5V directly onto one of the 5V pins on the Pi to power it, and that's worked well enough for me as I'm testing and building this out. I'm driving a display over I2C and a neopixel ring light, which all require the data to be 5V. I've got a level shifter that converts the 3.3V signals from the GPIO pins to the 5V the peripherals require, and it gets set to 5V by an input voltage.

It looks like if the Pi is powered via USB, the 5V is filtered so it's reliably 5V, but if I'm dumping 5V directly onto the rail it's reliant on my adapter to properly filter that voltage. So I'm wondering if I should be looking at some way to provide power over the USB port directly. I'm a little bit concerned about a voltage spike damaging the pi, but more concerned about having a reliable 5V signal to drive the peripherals. And in that case, does anyone know of a way to basically get a cable or adapter with a USB-C connector on one end, and a way to wire directly to my 5v adapter on the other end?

There is stuff like this: https://www.amazon.com/Poyiccot-Type-C-Screw-Terminal-Connector/dp/B07PPZBDJV?th=1

And things like this: https://www.amazon.com/SHNITPWR-Universal-Adjustable-100V-240V-Converter/dp/B08BL55LMB/\

Or this: https://www.amazon.com/SHNITPWR-Universal-Adjustable-100V-240V-Converter/dp/B08BL5Y9ZM

Those aren't product endorsements or anything, just an idea of what's out there.

Klyith
Aug 3, 2007

GBS Pledge Week


FISHMANPET posted:

Hey, question about powering my Raspberry Pi. I'm building a project and the whole thing is powered by a big 5V 5A AC-DC Adapter. It's a pretty basic one I picked up on Amazon, so I wouldn't trust it to always perfectly output exactly 5V.
Is the transformer a modern switchmode one, or some big heavy transformer brick? Modern switching supplies have consistent output volts that don't vary or spike just because you're not using all the amps. I wouldn't worry too much about the power being bad enough to hurt anything even if it's a fairly cheap supply.

quote:

And in that case, does anyone know of a way to basically get a cable or adapter with a USB-C connector on one end, and a way to wire directly to my 5v adapter on the other end?

You could look at USB-C adapters for a car phone charger or something like that. Afaik USB-C connectors are really tricky, which is why USB-C wires and accessories are still pretty expensive. So something that already had USB-C on the end of a wire, meant for charging rather than data, would be a thing you could take the wire apart and solder to your power wire.

FISHMANPET
Mar 3, 2007

Sweet 'N Sour
Can't
Melt
Steel Beams


Klyith posted:

Is the transformer a modern switchmode one, or some big heavy transformer brick? Modern switching supplies have consistent output volts that don't vary or spike just because you're not using all the amps. I wouldn't worry too much about the power being bad enough to hurt anything even if it's a fairly cheap supply.

It's this which says it has circuitry onboard to output a stable voltage.



Yeah this would be what I was thinking of. Knowing something that simple exists, it's really the same amount of work to put a wire from my adapter to the Pi, vs a wire from my adapter to that, and just plug it into the USB port.

Adbot
ADBOT LOVES YOU

Blue Footed Booby
Oct 4, 2006

got those happy feet




Slippery Tilde

Blue Footed Booby posted:

...

Now off to get sonarr and transmission working.

I got it working with authentication disabled in transmission. Then when I enable auth it tells me there's an authentication error. Except the web interface works using the same exact name and password (I copy pasted from a text file to make sure). Sonarr is in a docker container; transmission is not. Turning off both whitelist options in transmission via the config changed nothing. Googling is finding a bunch of things my problem definitely isn't, like issues that happen when sonarr and the torrent client are in different containers, or not stopping the daemon before editing the config json file.

Any thoughts? My past few issues were the result of me doing something dumb but I'm having trouble figuring out how to narrow down what the dumb thing is with nothing useful in the log for sonarr, and no log at all for transmission.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply