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 😛

Tux, as originally drawn by Larry Ewing

Image via Wikipedia

Today I am thinking a little more about this perversion of nature CentOS. Inspired by the recently released CentOS 6 version, I have something to say. In itself, this nonsense is a development RedHat and is a server fork on their Red Had Enterprise Linux. Uses their rpm package manager (which is terribly great, yes but no).

Let me start with what made me start writing and thinking about what a freak this CentOS is and is there any ground in my servers. About a week ago, Veris came out 6 and I decided to update my current one 5.6 installation of our VPS hosting. I was quite unpleasantly surprised to see, that it did not report my update packages. I decided, that something I'm wrong and checked on the Internet. I was shocked to see the manufacturer's recommendation is to do a clean installation and distributive upgrade from 5.6 is not recommended and is done with a kilo of black magic and therefore not possible in the standard way. Hmmm, quite an interesting moment. 😆 And this is an enterprise distribution, very interesting. I don't see how he can even rank in this category except, that the manufacturer and put that loud name. Let's accept the following 2 script – one is doing a new install the other is not doing.

1. Scripts – I download the server, unplug it, it stops all the services it supports. I'm installing it for 1 an hour or more the business I work for suffers great losses as money. I'm losing my job as a system administrator, probably or I'll take hefty fines. Not to comment on all the hassle along with the settings and the correct archive of data and settings. The result of herniated nerves is that we have a clean system. Obviously, the option is not acceptable.

2. Scripts – We don't do a distribution upgrade, the system stays that way while security patches are running. Until at some point its maintenance is stopped, after a while it is hacked due to a breach in one of the services it offers., due to the inability to provide a distributive upgrade. Data is stolen or just the server is compromised – salty fines again or you lose your job.

Quite interestingly, both scenarios end quite unpleasantly for their system administrator due to a capital error in the design of the distribution, the selection and laziness of the company that develops it in order not to ensure compatibility between the packages.. While on the other hand there are not so many enterprise distributions that are upgraded quietly and gently, without bearing loud names. I have Debian server which is from version 3 upgraded to the current version 6 he is currently experiencing 3 major upgrades and there was no denial of access to services. In principle, one of the main principles of the admin is – “If it works, it does not touch” but that's why people find holes, they patch, that's why new packages come out to improve stability or speed up productivity. In conclusion, apart from my personal opinion, but also the opinion of many of my friends, where CenOS is better than me is not worth it.

Enhanced by Zemanta