Page 1 of 1

[SOLVED] Increase root size

PostPosted: Jun 17th, '13, 07:20
by RoyD
Hi, I want to increase the size of root. What is the safest way of doing this? My signature shows what I have.
I thought do a backup of home, boot from the Mageia 3 install disk and go to upgrade then reconfigure the root to the larger size.
Any thoughts?
Thanks Roy

Re: Increase root size

PostPosted: Jun 17th, '13, 08:54
by djennings
What you propose will not work. In an upgrade you are not offered the chance to change disc partitions.

Apart from a reinstall in which you keep your existing /home partition, the easiest way to achieve what you want is to create a new partition and mount part of your file system on the new partition (/usr or /var)
I think diskdrake will allow you to do this on a running system, and it will copy the data over to the new partition for you as well. You must be sure to check that the /etc/fstab file has been correctly updated with new partition layout, and run through the boot setup GUI in Mageia Control Centre as well to make sure it will boot the new set up.

If diskdrake refuses to move these folders on a running system, then you will have to boot from a Live CD and use Gparted to move your partitions about, but once again you will have to take particular care with how fstab and boot are set up.

Personally I think I would just do a reinstall with a saved /home

EDIT
--------

Looking at your other post I see /usr/share is consuming quite a lot of space. I am pretty sure that diskdrake will let you remount /usr/share on a running system.
Of course the more partitions you have the more wasted space you will have, so I would still favour a reinstall.

Re: Increase root size

PostPosted: Jun 17th, '13, 08:57
by magfan
Well, there is no general answer to this question. From which version do you want to upgrade? Do you already have different partitions besides the standard ones (/,swap,/home)? If you enlarge one partition you will have to shrink another one first. So, if you do only have the standard partitions you will have to shrink /home. I do not consider this a good idea during the upgrade process.

It seems to me you have two clean possibilities to enlarge your root partition. In any case you have to make a backup of /home:

1. If you have more than the standard partitions you may keep /home unchanged and install Mageia 3 with your desired partition layout on the remaining part of the disk. Make sure the option format /home is not enabled (should be the default)!
2. If you have only standard partitions you could simply make a fresh installation of Mageia 3 with your desired partition layout. In this case you will definitely have to copy back your backup to the new /home partition.

The last possibility you have is to upgrade to Mageia 3 and use a tool like gdisk later to adjust partition sizes. Again: changing existing partitions during an upgrade process are risky...

Re: Increase root size

PostPosted: Jun 17th, '13, 10:15
by filip
In such cases Parted Magic was very convenient and reliable. At least in my experience.

Probably LiveCD or LiveDVD of Mageia would serve equally well for changing partition layout.

Re: Increase root size

PostPosted: Jun 17th, '13, 20:34
by doktor5000
@filip: Please at least let him answer. There's no use in beating him with many suggestions, which are totally different from each other.
I know you only want to help ;)

Re: Increase root size

PostPosted: Jun 18th, '13, 07:24
by RoyD
Thank you for all your suggestions.
This weekend I will reinstall to Mageia 3 KDE but I will try some of the suggestions first gdisk or Parted Magic just to see how they work or don“t. Cheers Roy

I do have a question with the upgrade . I have several physical drives. I remove the other drives so my main drive is sda and I change fstab so it will install correctly (as per Mageia instructions and it does work). When I add my other drives it moves the main drive to sdd. Why is this? but more importantly how can I make this drive think its always sda. Do I need to plug this into sata 1 or is it an adjustment in the bios?.

Re: Increase root size

PostPosted: Jun 18th, '13, 12:49
by jkerr82508
It shouldn't really matter whether it's sda or sdd. Provided that drive is set in the BIOS as the boot drive, grub will see it as hd0. The reason that UUID's are used in menu.lst and fstab is so that the system will boot and run normally regardless of the sdx assignment.

I have only one system on which I have multiple hard drives and on that system the drive attached to SATA1 is always assigned sda and that attached to SATA2 is always assigned sdb. However, I've read that this may not be the case on all systems.

Jim

Re: Increase root size

PostPosted: Jun 18th, '13, 13:36
by RoyD
I have always had this problem and this last upgrade was so easy as I knew what the problem was and could prepare for it. The following information from Mageia 3 Errata -
When using mgaapplet to upgrade, after installing the mageia-prepare-upgrade package, on systems where the bios boot menu is used to select booting from a drive other then sda, /boot/grub/device.map, and menu.lst files need to be fixed to point to the correct drives and "dracut -f" must be run manually (as root).
I would prefer not to do all that above If all I need to do is plug my main drive into sata1 ( much easier. ) and its fixed for ever. So thank you for the information.

Re: Increase root size

PostPosted: Jun 18th, '13, 16:39
by ghmitch
Even better than UUIDs are LABELs. For each partition you create a simple Label. This can be done with MCC partitioning tool OR with tune2fs. In fstab and grub, etc you use "LABEL=<label you have assigned>" instead of "/dev/sdxy" or "UUID=...". This way you can have each partition with a uniq name you can remember easily and it will NEVER change unless YOU change it.

Re: Increase root size

PostPosted: Jun 18th, '13, 17:20
by wintpe
label and UUID do exactly the same thing.

just UUID is a bit more random so you can assign it to a set of disks.

the effect is the same that irespective of the disk ordering, the same device gets mounted.

display the uuid of a disk with blkid

generate a UUID for use with a new disk,

uuidgen

assign it to a disk,

tunefs /dev/sda -U numbergeneratedfromabove.

then add it to /etc/fstab as

UUID=bf281eb3-bcf0-4a2d-b088-42548d261343 /local/2 ext4 acl,noatime,discard,nodiratime 1 2

this idea was origionaly thoughtup by veritas , as the uuid in the private region.

so that disks could be deported from one system, and re-impoted into another in a cluster.

regards peter

Re: Increase root size

PostPosted: Jul 5th, '13, 07:23
by RoyD
Hi All, Thank you for all your suggestions. In the end I didnt try all the options I decided to just reinstall. I did move my main drive to sata 1 and Mageia sees it as Sda. Only one item I have found is that the IDE once plugged in shows it is Sda. In the near I will change this drive to a Sata. Now I have a 30gb root. That should fix the problem. :D