[SOLVED] Increase root size

This forum is dedicated to basic help and support :

Ask here your questions about basic installation and usage of Mageia. For example you may post here all your questions about getting Mageia isos and installing it, configuring your printer, using your word processor etc.

Try to ask your questions in the right sub-forum with as much details as you can gather. the more precise the question will be, the more likely you are to get a useful answer

[SOLVED] Increase root size

Postby RoyD » Jun 17th, '13, 07:20

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
Last edited by RoyD on Jul 5th, '13, 07:24, edited 1 time in total.
Using Mageia 5 KDE 32bit on an Intel(R) Core(TM)2 Quad CPU Q6600, Asus P5K-E, XFX GeForce 8800 GTS 512mb, 4096 MB ram
User avatar
RoyD
 
Posts: 139
Joined: Jan 7th, '12, 06:33
Location: New Zealand

Re: Increase root size

Postby djennings » Jun 17th, '13, 08:54

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.
Last edited by djennings on Jun 17th, '13, 09:07, edited 1 time in total.
User avatar
djennings
 
Posts: 613
Joined: Jun 2nd, '11, 23:51
Location: Wokingham, UK

Re: Increase root size

Postby magfan » Jun 17th, '13, 08:57

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...
magfan
 
Posts: 334
Joined: Apr 3rd, '12, 12:33

Re: Increase root size

Postby filip » Jun 17th, '13, 10:15

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.
filip
 
Posts: 478
Joined: May 4th, '11, 22:10
Location: Kranj, Slovenia

Re: Increase root size

Postby doktor5000 » Jun 17th, '13, 20:34

@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 ;)
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18067
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: Increase root size

Postby RoyD » Jun 18th, '13, 07:24

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?.
Using Mageia 5 KDE 32bit on an Intel(R) Core(TM)2 Quad CPU Q6600, Asus P5K-E, XFX GeForce 8800 GTS 512mb, 4096 MB ram
User avatar
RoyD
 
Posts: 139
Joined: Jan 7th, '12, 06:33
Location: New Zealand

Re: Increase root size

Postby jkerr82508 » Jun 18th, '13, 12:49

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
jkerr82508
 
Posts: 946
Joined: Mar 26th, '11, 01:34
Location: Fife, Scotland

Re: Increase root size

Postby RoyD » Jun 18th, '13, 13:36

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.
Using Mageia 5 KDE 32bit on an Intel(R) Core(TM)2 Quad CPU Q6600, Asus P5K-E, XFX GeForce 8800 GTS 512mb, 4096 MB ram
User avatar
RoyD
 
Posts: 139
Joined: Jan 7th, '12, 06:33
Location: New Zealand

Re: Increase root size

Postby ghmitch » Jun 18th, '13, 16:39

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.
ghmitch
 
Posts: 325
Joined: Mar 30th, '11, 03:05
Location: Eureka California USA

Re: Increase root size

Postby wintpe » Jun 18th, '13, 17:20

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
Redhat 6 Certified Engineer (RHCE)
Sometimes my posts will sound short, or snappy, however its realy not my intention to offend, so accept my apologies in advance.
wintpe
 
Posts: 1204
Joined: May 22nd, '11, 17:08
Location: Rayleigh,, Essex , UK

Re: Increase root size

Postby RoyD » Jul 5th, '13, 07:23

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
Using Mageia 5 KDE 32bit on an Intel(R) Core(TM)2 Quad CPU Q6600, Asus P5K-E, XFX GeForce 8800 GTS 512mb, 4096 MB ram
User avatar
RoyD
 
Posts: 139
Joined: Jan 7th, '12, 06:33
Location: New Zealand


Return to Basic support

Who is online

Users browsing this forum: No registered users and 1 guest

cron