TRY THIS Raspberry Pi 3 Misc Thoughts

SMTC

Member
Joined
Jan 22, 2009
Messages
190
Reaction score
13
Did I miss something?

I took a fresh download of the image and loaded up a brand new Pi3. Before going too far I did the IncredibleFax install which FIRST insisted I update a pile of stuff, which I did.

Couple of warnings during the process about keeping some config PHP files as original or to overwrite with repo keeper version. Kept original, did not overwrite as the file compares looked like keeping stuff was reasonable.

Now I have not gotten very far with my install save add a couple of extensions and a SIP trunk group.

But the logfiles are ugly. Errors galore with PHP files missing parentheses and stuff. IS THIS NORMAL for out of the box so to speak?

....trying desperately to get off CAC (which crashed again last night)...

j
 

SMTC

Member
Joined
Jan 22, 2009
Messages
190
Reaction score
13
Thanks Ward for the suggestion but do I want XiVo now? Before, you were touting Elastix, then before it was Incredible PBX (over FreeBPX modules). I am certainly willing to Pioneer it a bit, but it took me quiite a while to get proficient enough, and with all the tweeks and mods, to get my original PIAF perfectly stable (and it ran for years actually until no longer supported BTW).

Since, I have been struggling and I think I just want to a STABLE and RELIABLE configuration installed. The warnings of BETA and not for production are a bit of a concern. What does one use that is not Beta, and is suitable for small PBX production???

I've sunsetted the PIAF 1.7x P4 server (which was great!), am about to give up on C@C/CentOS with IPBX 13.2. I tried the Pi2 (GUI far too slow) and now Pi3 (which is snapping better!) and would like to move over to that. I also have a spare Dell Vostro Core-Duo laptop with a new HD (which I had loaded the Elastix on). I have decided to bring the PBX back in house since at least I have some level of control of who is friggin in the riggin.
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,168
Reaction score
5,199
The beta warning really applied to the first release. Asterisk 13.10 with XiVO 16.10 is rock solid. This isn't a new product. XiVO has been under development for the better part of a decade. Works even better on a real computer.
 

SMTC

Member
Joined
Jan 22, 2009
Messages
190
Reaction score
13
Hi Ward - again thanks!

I will halt config of the PI3 and will save the image I have and re-image the 32GB microSD with the XiVO Pi3 image.

As a long time PIAF user, I hope the config is intuitive enough. Things like getting email to work off the ISP that blocks port 25 etc., and transferring custom IVR .wav files and MP3 MOH files, and getting the Voice activated stuff to work without the no wait for the speaker error message will be the top first hurdles.

I'll chime in with my progress. :-D

J
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,168
Reaction score
5,199
As far as implementing an SMTP RelayHost with ISPs that block port 25 downstream SMTP traffic, that's now covered in the main tutorial.
 

jerrm

Guru
Joined
Sep 23, 2015
Messages
838
Reaction score
405
I will halt config of the PI3 and will save the image I have and re-image the 32GB microSD with the XiVO Pi3 image.
General Pi tip - most tutorials talk about expanding your partition as one of the first steps -- DON'T do this until your own personal baseline image is complete.

Expanding the partition to fill the disk is usually the last thing I do before going to "production." Much easier to backup and restore 4GB images than 32GB.
 

SMTC

Member
Joined
Jan 22, 2009
Messages
190
Reaction score
13
Maybe I need to read through the DD command thing again, but I didn't quite follow the intended process and how it relates to the Pi3? Maybe just using smaller micro-SD card while you get it "personalized", then image over to the big boy (and expand using raspi-config) as a final step?
 

jerrm

Guru
Joined
Sep 23, 2015
Messages
838
Reaction score
405
Maybe I need to read through the DD command thing again, but I didn't quite follow the intended process and how it relates to the Pi3? Maybe just using smaller micro-SD card while you get it "personalized", then image over to the big boy (and expand using raspi-config) as a final step?
Using a smaller SD card can help speed up the backup if you are using a utility that images the entire card, but is not necessary. Just keep the boot + system partitions under 4GB total and you can truncate the backup image to 4GB even if the backup utility

I generally keep the total final partition size at about 95% of the SD card capacity. The free space should help with wear-leveling, and it assures the image can be restored to another brand/model sd card (not all cards are identical capacity - murphy's law makes sure the new 32GB card will be 64 bytes smaller than the image you are trying to restore).
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,168
Reaction score
5,199
Because backups are such an important part of using a Raspberry Pi, we wanted to follow up with some test results of using the methodology documented here: http://www.linuxweblog.com/dd-image. Basically, the idea is that you begin by formatting your big SDcard (8GB or larger) with all zeros. That makes it suitable for compression down the road. Then you load the Incredible PBX image onto the card in the usual way and expand the image to fill the card as part of the install procedure using raspi-config. After that, you can make regular backups of the card with compression and not waste space based solely on the size of the card.

To prove the point, here are the sizes of the usual backup images you would get using DD on the original Incredible PBX image file and the installed image after expansion onto an 8GB card:

CrIIJTVXYAA95hn.jpg


And here are the results when the two card images are compressed using gzip (which isn't the best compression tool for this but it works):

CrIG5aFWgAA0Szh.jpg


As you can see, there's about a 4MB difference in the size of the backups but some of that is attributable to the fact that we actually went through the basic install scenario on the 8GB card before making a backup.

The trick to this is YOU MUST FORMAT THE MICROSD CARD ORIGINALLY WITH ALL ZEROS! The command to do it on a Mac would look like this where /dev/disk4 is your microSD card on the Mac:

Code:
sudo dd bs=1m if=/dev/zero of=/dev/disk4

Or you can integrate it into the existing Mac shell script we've provided so that the main image creation procedure looks like this:

Code:
sudo diskutil unmountDisk $sdhcdev
sudo dd bs=1m if=/dev/zero of=$sdhcdev
sudo dd bs=1m if=incrediblepbx-xivo.img of=$sdhcdev
sudo sync
echo " "
echo "Transfer completed."
diskutil list
sudo diskutil eject $sdhcdev

NOTE: This methodology roughly doubles the time to initially make your SD card since it has to make two passes through the card.

The command to actually create future backups of the card with compression in one pass on a Mac would look like this where /dev/disk4 is your actual microSD card plugged into your Mac:

Code:
sudo dd bs=1m if=/dev/disk4 | gzip -c > incrediblepbx-xivo.img.gz
 
Last edited:

jerrm

Guru
Joined
Sep 23, 2015
Messages
838
Reaction score
405
The trick to this is YOU MUST FORMAT THE MICROSD CARD ORIGINALLY WITH ALL ZEROS!
Zeroing out the free space can be done from the pi itself before backup:
Code:
cat /dev/zero > wipe.it ; rm wipe.it
This can be very worthwhile for compressed image size if there has been much activity deleting files on the Pi.


If you're sure the disk partitions will fit in a 4GB image, even though the card itself is 8+GB, speed up the backup using(Linux syntax - not sure what the exact mac equivalent would be):
Code:
dd if=/dev/sdx of=/path/to/image bs=1G count 4
This won't greatly impact the compressed file size, but saves time reading 4+GB of zeros.


For production I schedule a modified version of the backup script from RasPBX to backup directly to an image file on a remote mount and also to an USB sd card reader. If the primary sd card fails, just pull the one from the reader and boot with it. If that one fails, the remote image is available.
 
Last edited:

Trimline2

Guru
Joined
May 23, 2013
Messages
524
Reaction score
96
You still need backups. These cards wear out!

Curiosity. I got struck by lightning 2 weeks ago and I am on a backup server that is LOUD. I ordered the PI 3 due in tomorrow.

How often do you replace the cards? Is there a better medium that won't wear out? I'm forging ahead with the install, but now wondering what I need in reserves... Gracias.
 

jerrm

Guru
Joined
Sep 23, 2015
Messages
838
Reaction score
405
Curiosity. I got struck by lightning 2 weeks ago and I am on a backup server that is LOUD. I ordered the PI 3 due in tomorrow..
Random corruption is more an issue than "wearing out." A year+ should not be a problem, probably a good bit longer, especially with an over-provisioned card.

I do try to be conservative with what gets written. I use the fs2ram package for /var/log. I also minimize logging in general and disable CEL unless I need to debug something.
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,168
Reaction score
5,199
Great suggestion on zeroing out the card before backups, @jerrm. There's considerably more disk activity with XiVO because of the elaborate logs that XiVO maintains. They're working on a way to turn some of that off if desired, but it's not yet available. So... I would expect microSD cards will have a shortened life span with XiVO because of all the disk write activity.

For safety's sake, I'd recommend xivo-service stop before zeroing out the card on the RasPi to avoid any surprises.
 
Last edited:

Members online

Forum statistics

Threads
25,779
Messages
167,505
Members
19,199
Latest member
leocipriano
Get 3CX - Absolutely Free!

Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.
Top