If /dev/md1 is made out of /dev/sda2 and /dev/sdb2, it will not work, as those partitions will still be the same size as they were before...
I have md0 as the boot, md1 as the rest. Inside md1 are all my lvm partitons. The grow command is supposed to expand the size of that md1 from its current 200+GB to fill the rest of the 500gb drive.
I thought you could then expand the lvm partions inside of that.
If the grow command does not make the raid device larger, then what does it do?
# cat /proc/mdstat Personalities : [raid1] md0 : active raid1 sdc1[2](S) sdb1[1] sda1[0] 104320 blocks [2/2] [UU]
md1 : active raid1 sdc2[2](S) sdb2[1] sda2[0] 245007232 blocks [2/2] [UU]
unused devices: <none>
Thanks for the input...glad I posted before I did this.
Hi Bob,
On Thu, Jul 2, 2009 at 13:18, Bob Hoffmanbob@bobhoffman.com wrote:
If /dev/md1 is made out of /dev/sda2 and /dev/sdb2, it will not work, as those partitions will still be the same size as they were before...
The grow command is supposed to expand the size of that md1 from its current 200+GB to fill the rest of the 500gb drive.
I thought you could then expand the lvm partions inside of that.
I'm not talking about the logical volumes (that you called lvm partitions), but the physical partitions that make /dev/md1, which are /dev/sda2, /dev/sdb2 and /dev/sdc2. You're not really supposed to change the sizes of those, so although you will have a 500GB disk, you will still have a 250GB partition...
Actually, it is indeed possible that you could fail a 250GB disk, add a 500GB disk, create a larger partition on it and try to add it back to /dev/md1, but I don't know if that will work or not, it might not as the partitions are not exactly the same size, I never tried to do something like that... If you want to try that, I suggest you have good backups of your data before you start.
The other situation (copying the partition table of the smaller disk to the bigger disk and creating new partitions) is one that I already used many times, and it always worked right for me.
HTH, Filipe
At Thu, 2 Jul 2009 13:26:11 -0400 CentOS mailing list centos@centos.org wrote:
Hi Bob,
On Thu, Jul 2, 2009 at 13:18, Bob Hoffmanbob@bobhoffman.com wrote:
If /dev/md1 is made out of /dev/sda2 and /dev/sdb2, it will not work, as those partitions will still be the same size as they were before...
The grow command is supposed to expand the size of that md1 from its current 200+GB to fill the rest of the 500gb drive.
I thought you could then expand the lvm partions inside of that.
I'm not talking about the logical volumes (that you called lvm partitions), but the physical partitions that make /dev/md1, which are /dev/sda2, /dev/sdb2 and /dev/sdc2. You're not really supposed to change the sizes of those, so although you will have a 500GB disk, you will still have a 250GB partition...
Actually, it is indeed possible that you could fail a 250GB disk, add a 500GB disk, create a larger partition on it and try to add it back to /dev/md1, but I don't know if that will work or not, it might not as the partitions are not exactly the same size, I never tried to do something like that... If you want to try that, I suggest you have good backups of your data before you start.
According to the mdadm man page, a RAID1 set can be made from different sized disks/partitions. It will be sized the size of the smallest disk/partition in the set. Going through a series of fail/replace you could end up with a RAID1 set that is smaller than the smallest disk/partition, at which point the GROW option will grow the RAID1 set. And no, I have not done this. It also states that the kernel needs have the proper support to do this.
The other situation (copying the partition table of the smaller disk to the bigger disk and creating new partitions) is one that I already used many times, and it always worked right for me.
HTH, Filipe _______________________________________________ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
At Thu, 2 Jul 2009 13:18:43 -0400 CentOS mailing list centos@centos.org wrote:
If /dev/md1 is made out of /dev/sda2 and /dev/sdb2, it will not work, as those partitions will still be the same size as they were before...
I have md0 as the boot, md1 as the rest. Inside md1 are all my lvm partitons. The grow command is supposed to expand the size of that md1 from its current 200+GB to fill the rest of the 500gb drive.
I thought you could then expand the lvm partions inside of that.
If the grow command does not make the raid device larger, then what does it do?
It only works once you have replaced all of the smaller drives with larger ones. If /dev/sdc is your spareset drive, when you replace it you'd partition it (manually) to have a larger #2 partition. Then you would fail over say sdb to sdc and make sdb the spareset drive and then pull it and replace it with a large disk and partition it like sdc, then you would fail sda over to sdb and replace sda with a large disk, and partition it like sdc. NOW you can grow the raid set & LVM vg.
# cat /proc/mdstat Personalities : [raid1] md0 : active raid1 sdc1[2](S) sdb1[1] sda1[0] 104320 blocks [2/2] [UU]
md1 : active raid1 sdc2[2](S) sdb2[1] sda2[0] 245007232 blocks [2/2] [UU]
unused devices: <none>
Thanks for the input...glad I posted before I did this.
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos