Migration from RAID1 to RAID5 turned out to be many times easier than I thought 🙄 In general they are 5 simple little wait steps and 1 a beer for courage.

For me, the system has been created RAID array md0 in which they participate 2 sda and sdb disk. I will add a 3rd sdc to them to create RAID5 from 3 disk. In general, this acrobatics is for the scientific purpose of a virtual I have not yet tested it in a real environment, but I don't expect dramas on a real machine when the time comes.

  1. We create the same file system layout as on our other disks – sfdisk -d /dev/sdb | sfdisk /dev/sdc
  2. We are upgrading our current RAID5 array – mdadm –grow /dev/md0 –level=5
  3. We add the new disk to the array – mdadm –manage /dev/md0 –add /dev/sdc . Here comes the thin point that the array is still RAID1 and will not start syncing because our new drive is spare
  4. The most important moment sdc becomes active and synchronization begins – mdadm –grow /dev/md0 –raid-devices=3 . Good time to open your beer if it is not done 😉 Do not interrupt the process under any circumstances!!!
  5. After the synchronization is over, it has to resize the partition because the loss of space in RAID1 is 1 / n and in RAID5 is 1-1 / n

The biggest bonus is that there is no need to restart the system or remove and create additional arrays.

sfdisk -d /dev/sdb | sfdisk /dev/sdc
mdadm --grow /dev/md0 --level=5
mdadm --manage /dev/md0 --add /dev/sdc
mdadm --grow /dev/md0 --raid-devices=3
resize2fs /dev/md0

Good evening 😛

We are preparing a new hosting service and during the tests when trying to connect between WHMCS and Cloudmin we had the following error

CURL Error: 7 – couldn’t connect to host


Fun, I immediately check the connection between the machines where the WHMCS and the Cloudmin are, everything works. I'm checking the 10000th port and it's open and I have access to it 🙄 . Fun!

I'm doing a quick cloudmin server

tcpdump -i br0 host WHMCS_IP

and for mine (not very big) amazement I see that trying to connect to the 80's or 443 (if SSL is enabled) ports without asking me for one. By default, webmin and cloudmin, which is an application to the former, run on SSL 10000 port. Because this stupid system is IonCube encrypted, you can't edit your code to fix Indian nonsense, so you have to take a radical approach.. Before leaving the system, I replace the destination port with iptables

iptables -t nat -A OUTPUT -d cloudmin_ip -p tcp -m tcp --dport 443 -j DNAT --to-destination cloudmin_ip:10000

where you replace cloudmin_ip with the IP of your cloudmin installation. After this small manipulation, the connection between WHMCS and Cloudmin took place, but the module still has other problems besides this 😆 :mrgreen:

In general, for a year of using WHMCS I am extremely disappointed with it – it is quite wooden, support team support is slow, the documentation of the code and various other things diverge from reality, quite a lot of bugs and is quite wooden. If I knew it was so bad I would prefer to use it with a reset license instead of giving 300$ for something that works somehow!

http://www.youtube.com/watch?v = GF2-TKfQOsk

2 fast RAID 5 advice

  1. If you have RAID 5 system keep the disks in MBR instead of in GPT – at least he gave it to me +10 – +15% difference
  2. Be sure to set / sys / block / md0 / md / stripe_cache_size because it is too small by default. Here the values ​​are according to depends on me 32768 gave the most decent result

When you make the RAID layer above it, do it on the LVM, so you will save a lot of trouble if you set not very well estimated partition sizes.. The idea is that if you don't use XFS or ZFS or some other FS that allows resizing partitions like EXT2 / 3/4 for example things become a big hassle when you realize, that you didn't do the most- good division. In general, you get maximum plasticity if you need to reduce or increase the size of the partition and at the same time you are protected against unpleasant events of your data. In general, something of this kind is obtained

| / | /var | /usr | /home  |
|       LVM Volume         |
|       RAID Volume        |
| Disk 1 | Disk 2 | Disk 3 | 

From about 2 weeks php 5.3 enters history slowly but surely. On the 11th, it announced the end of its support and that only security patches would be released for 1 year. In general, PHP 5.4 goes into old stable stages and PHP 5.5 becomes stable, which is a bit fun because some of the add-ons and plugins of php still do not work quite correctly but also a version 5.5 is quite new so I will refrain from migrating to it.

So let me tell you about my migration to 5.4 from 5.3. I had released it in advance information for obsolete features, those that have changed dramatically and those that will no longer be maintained so that we do not have drama on both sides whether it will ignite or not 😉 So this morning I chose the time to start the migration around 7 as he got up, that there is minimal pain during migration if it does not go smoothly. To my great surprise, everything went more than smoothly – I compiled my PHP 5.4.17 I started apache and oh heavens everything is there. A quick look through the logs has no roar of depricated or unfamiliar features at all – apparently the boys did a good job. Then all I had to do was recompile the add-ons that were compiled with the old API like APC, RAR and others. Second restart and everything fell asleep. Separately, I expect improvements in performance because everywhere people point with their thumb to some tablets that show how PHP 5.4 consumes less RAM and executes scripts faster.