Hi I wanted to find out, how can i install grub2. I am trying to do a raid2 and it is coming up with this msg Only grub 2 is able to boot raid arrays with hard disks larger then 2tb

Status: 
Active

Comments

Howdy -- well, there isn't a simple way to upgrade to a different Grub version on CentOS. You would need to compile it manually, or find a version from a third party repository -- and we wouldn't recommend either of those.

Also, you might run into problems in the future when upgrading the kernel, as the kernel packages would be expecting the original Grub version.

What we might suggest as an alternative would be to place the /boot directory onto it's own partition. That partition wouldn't need to be large, and should fall well under the 2TB limit.

Another alternative is that I believe Ubuntu 12.04 and Debian 7 both provide grub2 -- I see a grub2 package in both of those repositories.

Yes that's right, Ubuntu 12 uses grub2 by default.

I made 3 partions swap 20gb, / 400gb and /home 2.67tb In webmin - hardware - Linux Raid, i added Mirrored Raid1, but it shows like this

Device name    Active?    RAID level          Usable size    Member disk devices  
/dev/md0 Yes   Mirrored (RAID1) 19.52 GB         /dev/sdb2 | /dev/sdb3 | /dev/sdb4

Its picking the swap partition as usable size

It looks like your Linux RAID screen is showing a RAID device named "/dev/md0" that has been configured with RAID1.

That RAID1 device was configured to use 3 partitions -- /dev/sdb2, /dev/sdb3, and /dev/sdb3.

IF those devices are meant to be swap, /, and /home, then it sounds like you may want those partitions to be 3 separate RAID devices, rather than all being part of the same RAID device.

When using software RAID, you typically would want to take two identical partitions on two different drives, and make those identical partitions into a RAID device.

I created the same partitions on another hdd just the same as the main hdd. So it is like this 21gb is the /swap, 461gb is the / root, and 2.5tb the /home I removed the 20gb from the raid and started again, i added the 2 larger partitions. Device file /dev/md0 RAID level Mirrored (RAID1) Filesystem status Active but not mounted Usable size 450428736 blocks (429.56 GB) Persistent superblock? Yes Chunk size Default RAID status active, resyncing Partitions in RAID
SATA device B partition 3 SATA device B partition 4

In disk utility - multi-disk devices. It shows 461 GB Raid-1 Array, So does it mean 461gb and 2.5tb are both on the 461gb partition?

Is there a way of doing each partition by it self? Last time i used raider -R1 on a 1tb hdd and it worked fine with all the partitions.

Would it have worked if when i installed centos 6.5 in the first place to do the raid then? Do know what the beat solution.

Can grub2 be loaded from ubuntu onto centos? Don't want to reinstall it will take more time to load all this again.

Hmm, are you by chance trying to convert a server that's using a single drive and no RAID, and convert that over to RAID1?

There isn't a simple way to use Grub2 with CentOS though. It's not a simple thing to install it, and future kernel updates won't work properly, as they're expecting to see the CentOS grub version.

Grub2 works with Ubuntu and Debian, as the packages for those distributions are designed to work with it -- the packages on CentOS aren't designed to work with Grub2.

Yes this hdd is a fresh install. I have 2 hdds, both are 3tb. I used raider before on 1tb hdds to do the raid and it worked fine.

Raider -R1 is coming up with this Only grub 2 is able to boot raid arrays with hard disks larger then 2tb.

Okay, gotcha, I think I understand what you're trying to do a bit better.

Here are the problems though --

I don't think putting Grub2 on your CentOS server is going to work. Even if you manage to get it on there, it's just going to cause you maintenance problems in the future when you attempt to upgrade packages.

The second problem is that converting a server on a single drive, over to RAID, is an incredibly complex procedure.

I wasn't previously familiar with "raider", and it's great that there's a tool to help with that.

However, if raider isn't working properly -- there really isn't a simple way to resolve that on an existing system.

The ideal way to setup RAID is to do so while performing the CentOS installation.

I know this isn't your preference, but since it sounds like you're dealing with a fairly fresh installation -- my recommendation would be to start from scratch, perform the CentOS installation again, and during the installation, have the CentOS installer setup RAID for you.

If you're dealing with a fairly fresh CentOS and Virtualmin install, I think you'd spend a lot less time reinstalling those and configuring the RAID during the installation, than you would trying to convert your existing setup to use RAID.

If you have any existing Virtual Servers that were added into Virtualmin, you could always generate backups of those using Virtualmin's Backup and Restore screen, and you could restore those backups once you've reinstalled CentOS and Virtualmin.

CentOS has information on setting up RAID during the installation here:

http://www.centos.org/docs/5/html/Deployment_Guide-en-US/s1-raid-config....

I reinstalled centos and set it up with raid.

I done a md0 = /, md1 = /swap, and md2 = /home for all the partitions. Would this be correct?

Or should i have done md0 = / and md2 with /swap and /home as lvm?

What is LVM, whould it be more fast?

You probably don't need LVM if you don't have specific use for it. :) It introduces a layer of complexity that's unnecessary if you don't need it for specific things.

From Wikipedia:

LVM can be considered as a thin software layer on top of the hard disks and partitions, which creates an abstraction of continuity and ease-of-use for managing hard drive replacement, re-partitioning, and backup.

LVM is commonly used for the following purposes:

  • Managing large hard disk farms by allowing disks to be added and replaced without downtimes and services disruption, in combination with hot swapping.
  • On small systems (like a desktop at home), instead of having to estimate at installation time how big a partition might need to be in the future, LVM allows file systems to be easily resized later as needed.
  • Performing consistent backups by taking snapshots of the logical volumes.
  • Creating single logical volumes of multiple physical volumes or entire hard disks (somewhat similar to RAID 0, but more similar to JBOD), allowing for dynamic volume resizing.

Thanks Locutus for the detailed info.

So it is ok the way i done?

Yes, what you described sounds great. It should then be setup when RAID when it boots, and you can begin the process of setting up Virtualmin and other things that you need.

It has synced ok. What a pain to install everything again. At the moment just trying to in stall some modules in the un-used section.

I had to reinstall virtualmin twice, the first attempt alot of the setting were not working, it was asking for path locations. 2nd time made it work ok.

What php version can i upgrade to? ie 5.4 or 5.5

Thanks for all you help with this

We're sorry that it was a pain to reinstall things. Unfortunately, the alternative for getting RAID up and running would have been even more difficult and time consuming.

Regarding PHP -- when possible, we recommend using the packages that come with your distribution. Although it's PHP 5.3, it incorporates the bugfixes and security fixes of newer PHP version, and is extremely well tested.

However, if you need an alternate PHP version, there is documentation here on setting up PHP 5.4.16 from the CentOS SCL repository, alongside your existing PHP version:

http://virtualmin.com/documentation/web/multiplephp

I managed to install php5.4, but i get this error when installing phpmyadmin.

Installing package php54-php-mcrypt .. Installing package(s) with command yum -y install php54-php-mcrypt ..

Loaded plugins: fastestmirror, refresh-packagekit, replace, security Loading mirror speeds from cached hostfile * base: mirror.mhd.uk.as44574.net * epel: mirrors.coreix.net * extras: mirrors.vooservers.com * updates: centos.mirroring.pulsant.co.uk Setting up Install Process No package php54-php-mcrypt available. Error: Nothing to do

.. install failed!

Installing package php54-mcrypt .. Installing package(s) with command yum -y install php54-mcrypt ..

Loaded plugins: fastestmirror, refresh-packagekit, replace, security Loading mirror speeds from cached hostfile * base: mirror.mhd.uk.as44574.net * epel: mirrors.coreix.net * extras: mirrors.manchester.m247.com * updates: mirror.simwood.com Setting up Install Process No package php54-mcrypt available. Error: Nothing to do

.. install failed!

If i use the OG version of php 5.3, it installs phpmyadmin ok. When i do yum install php-mcrypt, it shows the 5.3 version is already installed nothing to do. Is there a way to fix this? Do i have to remove the 5.3 version and then install 5.4?

It doesn't appear that the CentOS SCL repository that provides PHP 5.4 includes the mcrypt module -- that's something only available when using PHP 5.3.

Due to that, it's only going to be possible to use phpMyAdmin with PHP 5.3.

Note that even if phpMyAdmin is using PHP 5.3, you can still have other domains, or even other directories within this one domain, using your alternate PHP version.

You can configure that in Server Configuration -> PHP Versions.

Yes i saw that, it shows php 5 and the php 5.4. I changed it also in the server template to test. So would it be better to remove the 5.3 version to make it work?

Since the mcrypt PHP module is not included with PHP 5.4 in that repository, it won't be possible to get phpMyAdmin working with PHP 5.4.

Removing PHP 5.3 won't help, and would cause problems to attempt that.

The best solution is to use PHP 5.3 for phpMyAdmin, since it runs well on that PHP version.

ok cool. will see how it goes.

Thanks for all the support you have given me