Clone FreePBX from 2TB hard drive to 240GB SSD

Some time ago I installed FreePBX on a 160GB hard drive. Since I had a couple of 2TB hard drives that were lying around unused, a month or so ago I decided to clone the 160GB drive to a 2TB drive using the local drive to local drive option in Clonezilla. Just recently I was running out of space on a 240GB SSD on another computer. I upgraded the 240GB to a 480GB SSD leaving the 240GB available.

I would now like to clone FreePBX from the 2TB drive to the 240GB SSD. Note that, according to gparted, the partitions on the 2TB appear as follows:

partition=/dev/sdb1 file_system=ext4 mount_point= label=bootvol size=1.95 GiB used=425.44 MiB unused=1.54 GiB flags=boot
partition=/dev/sdb2 file_system=lvm2 pv mount_point=SangomaVG label= size=147.10 GB used=140.13 GiB unused=6.96 GiB flags=lvm
partition=unallocated size=1.67 TiB

Obviously the local disk to local disk option in Clonezilla won’t clone from a larger 2TB disk to a smaller 240GB disk.

Anybody have a recommendation on the best way to go about this?

What sizes are the actual partitions? If they are still 160gb in total from the original first clone, you could clone partition to partition directly.

I actually did something similar a few months ago. I built a new server with the same base OS and then used rsync to clone from old server to new.

@arielgrin The two partitions on the 160GB (original hard drive) are identical in size to the partitions on the 2TB drive. The data on the 160GB drive is outdated (i.e.,by one month or so) but you’ve given me an interesting possibility:

Use the local disk to local disk option in Clonezilla to clone the 160GB drive to the 240GB drive, and then use gparted (or some other method) to copy each of the two partitions on the 2TB drive (where the data is up to date) to the respective partitions on the 240GB SSD.

For future reference, here is what worked. I used the local disk to local disk option in Clonezilla to clone the 160GB drive (original drive, but outdated by about a month) to the 240GB SSD. I then checked to confirm that I could boot FreePBX from the SSD, altho’ as noted the clone was outdated. I then used gparted Live to copy the 2GB ext4 bootvol partition. However, (note that I’m using the most recent release of both gparted and Clonezilla), I was unable to copy the 150GB lvm2 partition using either gparted or Clonezilla, as the option to copy a lvm2 partition doesn’t seem to exist in either gparted or Clonezilla.

While in Clonezilla, I dropped into the command line and used dd to copy the lvm2 partition, as follows:

sudo dd if=/dev/sdb2 of=/dev/sdc2 bs=4M

It took approximately 2 hours for Clonezilla to copy the 160GB disk to the 240GB disk using the local disk to local disk option, and about 90 minutes for dd to copy 150GB from the second partition on the fixed 2TB disk to the second partition on the 240GB SSD. The SSD was connected via USB.

After FreePBX was rebooted with the SSD as the startup disk, I used gparted to resize the lvm2 partition to fill the unused portion of the SSD.

As expected, FreePBX seems much snappier running on the SSD. For example, the GNOME desktop running under X Windows starts up quickly and both the FreePBX GUI and the Webmin GUI are more responsive.

So far I’m a happy camper.


You should not have a desktop at all on this. You manage Asterisk via FreePBX. And you manage FreePBX via The web interface that you can reach from any allowed network.

I mean, sure it can work, but why all the overhead?Eating resources that the phone system could be using, or resources you would not have to have purchased in the first place.

@sorvani Hmmm, well I suppose whether or not one has a desktop running X Windows or GNOME, etc., depends on a number of factors, including the resources available on the system, i.e., CPU, RAM, number of phones, as well as the purpose for which someone is using FreePBX.

At the moment the CPU is a beefy Intel Core2 Duo E8400 at 3GHz (I’m joking about the beefy part) with a humungous 8GB RAM. This might surprise you, but–I’m monitoring this closely–the GNOME desktop and Webmin GUI alongside the FreePBX GUI don’t seem to consume a lot of resources. (And the GNOME desktop on CentOS is breathtaking, as is Webmin!)

If it appears that the GNOME desktop or something else is considerably slowing FreePBX down, I’ll haul another motherboard out of the closet with a multicore i7 or Xeon processor. I expect that should fix that pretty quick.

Seriously, FreePBX is just a hobby for me, something to play with, experiment with, and test things out. If I were running a production FreePBX system, I would certainly agree with you wholeheartedly.

@sdhegde I totally agree, why have two or more machine when one quite big one can do it all? Save money, save trees, be green. Very simplistically , look at your ‘top’ screen (press 1 to show all cores), when the top left 'load average:" first number goes above 3 (you have four cores? ) then its time to maybe sort of think about it.

So don’t sweat it , a E8400 bare metal CPU with 8G of ram running Asterisk/FreePBX/apache/mysql/php/postfix and all the rest needed by "a voip server’ will be hardly ticking over with 50 extensions all transcoding and recording in a call center , add your desktop, a Plex
Media server and a general purpose web site or two but limiting to a few local extensions, then everything still slick as SOACS.

I have a 16G i5 that does all that and still has plenty of room to fire up a few VM’s using KVM or VirtualBOX “for fun”

(I wouldn’t suggest you do this on a RaspBerry Pi or a Pentium 4, although in truth the Rasperry is still quite viable for a desktop + personal voip server if you don’t need YouTube or gaming)

@dicko Thanks for your reply. There’s a bunch of useful info in there. Over the years since I started playing with FreePBX, I’ve frequently seen your handle (“dicko”) replying to issues in the forum and hold you in high regard. (Chris Sherwood from Crosstalk Solutions is another.)

With regard to FreePBX, I’m trying to be as minimalist as possible, with ancient and cheap IP phones (Cisco 7911s, a 7961, 7945, 7975, some 8961s which I’m in the process of trying to register, an Aastra 6753i, Nortel/Avaya 1140E & 1120E), a SPA122, and a Sangoma S500 (my prized phone!) which I picked up for free at a Sangoma seminar here in Vancouver BC a couple of years ago, and other goofy discarded stuff. I’ve eaten many, many, days trying to get these phones to register with FreePBX, but after a lot of cursing and hair pulling I’m nearly there with them all.

BTW, I have installed FreePBX on a Raspberry Pi 4, and am quite surprised by the impressive performance of the little thing.

One point of clarification I have regards what you said about the ‘top’ command. I’ve used many UNIX systems over the years and always regarded the ‘load average’ values as the number of processes in the run queue. So if, as in the old days when the CPU had only one processor (i.e., one core), a load average of greater than 1.00 meant that the CPU was beyond capacity, and that things were backing up. As you point out-and something I hadn’t realized before–on a 4 core CPU, a load average of less than 4.00 (for example, 3.00) is OK. Thanks for pointing this out.

FYI, the E8400 Core 2 Duo CPU is a two core CPU (I can confirm that in ‘top’ by pressing the ‘1’ key) so a load average which is consistently less than 2.00 on an E8400 should be fine.

I’m sure things are more complicated than this, but I find this helpful as a rule of thumb.

1 Like

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.