[CentOS] Resize all partitions bigger

Fri Jun 25 18:13:12 UTC 2010
Tom H <tomh0665 at gmail.com>

On Fri, Jun 25, 2010 at 12:24 PM, Robert Arkiletian <robark at gmail.com> wrote:
> On Fri, Jun 25, 2010 at 6:44 AM, Jerry McAllister <jerrymc at msu.edu> wrote:
>> On Thu, Jun 24, 2010 at 11:05:52PM -0700, Robert Arkiletian wrote:
>>
>>> I effectively have 1 drive /dev/sda  (it's actually a hardware raid 10 array)
>>>
>>> I have lots of free sapce. I want to resize my partitions (boot, home,
>>> /) bigger.
>>> Going to use Clonezilla to make an image of each partition and save it
>>> on another box.
>>>
>>> Then re-partition and format new bigger partitions.
>>> Then restore images with Clonezilla.
>>>
>>> But I know UUID's will be wrong and I don't feel like creating new
>>> ones. I just want to use /dev/sdx
>>
>> ???
>>
>>>
>>> Am I correct in assuming I only need to edit /etc/fstab and /etc/grub.conf
>>> or is there anything else I need to edit?
>>
>> You might be better off using dump(8) and restore(8) to copy and
>> restore the disk partitions.   Dump will preserve the information
>> you need and then restore will allow it to use the new larget
>> partition cleanly.    Some of your other cloning software (I don't
>> know about Clonezilla) including dd(1) will try to duplicate the
>> space as it was on the old partitions and not use the new space.
>> So dump the partitions
>>   redo the partitions
>>   restore in to the new partitions
>> If you are changing root (/) and/or /boot you have to build a minimal
>> bootable system on it/them.   But, really root and /boot do not need
>> to be very large if you put growing stuff in its own partitions
>> such as /home, /usr, /var.
>>
>
> Thanks for the advice. My initial question remains.
>
> Am I correct in assuming I only need to edit /etc/fstab and /etc/grub.conf
> to boot from the new partitions?

You can "preserve" the filesystem UUIDs by re-applying them. For extX
filesystems with "tune2fs -U <uuid> <device>".