Best way to increase Fedora partitions ~ / ?
FedoraForum.org - Fedora Support Forums and Community
Page 1 of 2 1 2 LastLast
Results 1 to 15 of 27
  1. #1
    Join Date
    Jul 2014
    Location
    EU
    Posts
    291

    Best way to increase Fedora partitions ~ / ?

    What is the best way to increase size of Fedora partitions ~ / ?
    Click image for larger version. 

Name:	Screenshot from 2018-01-27 08-59-13.png 
Views:	382 
Size:	78.1 KB 
ID:	29370
    Last edited by boycottsystemd; 27th January 2018 at 11:23 AM.

  2. #2
    Join Date
    Jun 2005
    Location
    Montreal, Que, Canada
    Posts
    5,545

    Re: Best way to increase Fedora partitions ~ / ?

    You are showing that you want to expand sda9 (/home). One way "Use gparted, option to resize/move option" and stretch the size into the unallocated area. gparted will do the scripting to adjust /home to the new size.
    There are other ways, but it depends on which partition you want to resize.
    Relocating or reformatting the partition would also require a change to /etc/fstab
    Leslie in Montreal

    Interesting web sites list
    http://forums.fedoraforum.org/showth...40#post1697840

  3. #3
    Join Date
    Jul 2014
    Location
    EU
    Posts
    291

    Re: Best way to increase Fedora partitions ~ / ?

    Quote Originally Posted by lsatenstein
    You are showing that you want to expand sda9 (/home). One way "Use gparted, option to resize/move option" and stretch the size into the unallocated area. gparted will do the scripting to adjust /home to the new size.
    There are other ways, but it depends on which partition you want to resize.
    Relocating or reformatting the partition would also require a change to /etc/fstab
    I need increase size of ~ (home) and / (root) partition.

  4. #4
    Join Date
    Jun 2005
    Location
    Montreal, Que, Canada
    Posts
    5,545

    Re: Best way to increase Fedora partitions ~ / ?

    Quote Originally Posted by boycottsystemd
    What is the best way to increase size of Fedora partitions ~ / ?
    Click image for larger version. 

Name:	Screenshot from 2018-01-27 08-59-13.png 
Views:	382 
Size:	78.1 KB 
ID:	29370
    This is what I would do, if I was to increase the sizes of each / and /home.

    Login as ROOT and no other logon. Then using gparted

    Unmount /home
    with gparted, increase the size of /home
    after gparted completes,
    using gparted, mount /home

    The above only works from root logon


    I also think that / is large enough for a long time to come. See my comments at the end of my post.

    If you do really want to resize / then do the following.
    I would be relocating /home and then after that is done,
    I would delete the original /home and increase the size of /
    You must be able to use the command line via virtual terminal.


    1) create a new partition for /home, beginning from the right side of the unallocated space. Make it the size you would like it to be. Make the label /sda13home. format with ext4
    2)
    3) take note of the /dev/sda?? I would guess it's going to be /dev/sda13
    4) cd to /mnt and create /mnt/sda13 #(mkdir -p /mnt/sda13 )
    5) mount /dev/sda13 /mnt/sda13
    6) rsync -av /home/* ./sda13 #or ... cp -ra /home/* sda13

    At this stage, cd to sda13 and confirm that /home was copied over, and it respected all your file timestamps and nothing is missing.

    Now you want to do modify the /etc/fstab by doing the following:
    7) cp /etc/fstab /tmp
    8) blkid /dev/sda* >> /tmp/fstab
    9) vi /tmp/fstab and remove all but the one blkid line that does not apply. Reorder the blkid line that remains so it looks like the line with
    /home It should have /home as the mount (2nd field)
    The line will look something like this
    UUID=xxxxxxxxxxxx /home ext4 default ... and so forth
    Put a # on the very original /home line to comment it out #UID=
    Now to replace the /etc/fstab

    10) cd /etc
    11) cp fstab fstabbackup
    12) cp /tmp/fstab .
    13 reboot


    When the system comes up, you will be using the new /home. The original /home will still show up in gparted

    If all is ok at this point, keep the original /home on /dev/sda9 for a day or so.

    In a day or so, delete the original /home (/dev/sda9)
    Next, gparted should show that the space held by the original /home is merged with the unallocated area

    Since the / partition is mounted, Linux will not let you resize it. To increase the size of / you have to do a similar thing as done above.

    Only if you had a second Fedora system on the computer that can list all the partitions on the /dev/sda then it is a trivial matter to use gparted to increase the size the existing / to occupy some of the space of the original /home.

    I personally have not ever experienced / requiring more than 25gigs. Your 30gigs space should be ample.

    My disclaimer. Backup your stuff. My own linux is on my 5th drive and my steps I listed are what I would do.
    Last edited by lsatenstein; 28th January 2018 at 07:26 PM. Reason: Added a second option
    Leslie in Montreal

    Interesting web sites list
    http://forums.fedoraforum.org/showth...40#post1697840

  5. #5
    Join Date
    Jan 2013
    Location
    Ventura, CA
    Posts
    427

    Re: Best way to increase Fedora partitions ~ / ?

    First of all you must boot up with a live iso that contains gparted (you could also use fdisk, etc) so that the fedora partitions of your harddrive are not mounted. Make sure you are working on the correct harddrive! (click on right of gparted to see the various harddrives). Then change size of your /home by clicking on "change size" (or similar) and then dragging the right side of your home partition so that you have taken up all of the unallocated area (or at least enough so that you have enough space to enlarge your /home and your / partitions. Then click the green arrow to complete change. After gparted completes the action (this can take a while), free up enough space from your /home partition so that eventually you can add it to your fedora root partition. Do this by right-clicking on /home and choose "change size of partition" (or similar). Click on left side of this partition and move it to the right until you have freed up enough space for your fedora root partition. Click on the green arrow to make the change (this can take a long while). You should now have unallocated space just to the right of your root partition. Click on the root partition and then choose "change size of partition" (or similar) and then drag right side of your / to completely take up the unallocated space. Click on the green arrow to make change permanent (again this will take a while to complete).

    You could also use dd (or rsync) to copy your /home and root partitions. You would then delete them (only after making sure your archived partitions are good) on your drive and then create two larger partitions with gparted and then copy your saved /home and / into the "new" partitions. In any case this can be somewhat time-consuming.
    Last edited by donatom; 28th January 2018 at 07:06 PM.

  6. #6
    Join Date
    Jun 2005
    Location
    Montreal, Que, Canada
    Posts
    5,545

    Re: Best way to increase Fedora partitions ~ / ?

    The last time I tried, the live ISO does not allow installation of gparted. Its restricted to only allow installations to hard disk.
    Leslie in Montreal

    Interesting web sites list
    http://forums.fedoraforum.org/showth...40#post1697840

  7. #7
    Join Date
    Dec 2007
    Location
    Australia
    Posts
    1,891

    Re: Best way to increase Fedora partitions ~ / ?

    A rescue disk like systemrescuecd will do it. It includes gparted. Or there's a gparted live disk as well.
    Last edited by nsnbm; 28th January 2018 at 10:20 PM.

  8. #8
    Join Date
    Jan 2013
    Location
    Ventura, CA
    Posts
    427

    Re: Best way to increase Fedora partitions ~ / ?

    Quote Originally Posted by Isatanstein
    The last time I tried, the live ISO does not allow installation of gparted. Its restricted to only allow installations to hard disk.
    I started up a Fedora 27 Workstation iso via qemu and was able to install and start up gparted. This, of course, is not a permanent install (the install is only in RAM). If you have a live iso installed into a thumb drive incorporating a persistent over-lay, this would work quite well I imagine. nsnbm's suggestion of using systemresuecd is probably a better idea.

  9. #9
    Join Date
    Jun 2005
    Location
    Montreal, Que, Canada
    Posts
    5,545

    Re: Best way to increase Fedora partitions ~ / ?

    Read my response as bold text in the first part of my comment (see #4).
    You can make /home larger without needing a second system.
    Leslie in Montreal

    Interesting web sites list
    http://forums.fedoraforum.org/showth...40#post1697840

  10. #10
    Join Date
    Jul 2014
    Location
    EU
    Posts
    291

    Re: Best way to increase Fedora partitions ~ / ?

    Quote Originally Posted by lsatenstein
    This is what I would do, if I was to increase the sizes of each / and /home.

    Login as ROOT and no other logon. Then using gparted

    Unmount /home
    with gparted, increase the size of /home
    after gparted completes,
    using gparted, mount /home

    The above only works from root logon


    I also think that / is large enough for a long time to come. See my comments at the end of my post.

    If you do really want to resize / then do the following.
    I would be relocating /home and then after that is done,
    I would delete the original /home and increase the size of /
    You must be able to use the command line via virtual terminal.


    1) create a new partition for /home, beginning from the right side of the unallocated space. Make it the size you would like it to be. Make the label /sda13home. format with ext4
    2)
    3) take note of the /dev/sda?? I would guess it's going to be /dev/sda13
    4) cd to /mnt and create /mnt/sda13 #(mkdir -p /mnt/sda13 )
    5) mount /dev/sda13 /mnt/sda13
    6) rsync -av /home/* ./sda13 #or ... cp -ra /home/* sda13

    At this stage, cd to sda13 and confirm that /home was copied over, and it respected all your file timestamps and nothing is missing.

    Now you want to do modify the /etc/fstab by doing the following:
    7) cp /etc/fstab /tmp
    8) blkid /dev/sda* >> /tmp/fstab
    9) vi /tmp/fstab and remove all but the one blkid line that does not apply. Reorder the blkid line that remains so it looks like the line with
    /home It should have /home as the mount (2nd field)
    The line will look something like this
    UUID=xxxxxxxxxxxx /home ext4 default ... and so forth
    Put a # on the very original /home line to comment it out #UID=
    Now to replace the /etc/fstab

    10) cd /etc
    11) cp fstab fstabbackup
    12) cp /tmp/fstab .
    13 reboot


    When the system comes up, you will be using the new /home. The original /home will still show up in gparted

    If all is ok at this point, keep the original /home on /dev/sda9 for a day or so.

    In a day or so, delete the original /home (/dev/sda9)
    Next, gparted should show that the space held by the original /home is merged with the unallocated area

    Since the / partition is mounted, Linux will not let you resize it. To increase the size of / you have to do a similar thing as done above.

    Only if you had a second Fedora system on the computer that can list all the partitions on the /dev/sda then it is a trivial matter to use gparted to increase the size the existing / to occupy some of the space of the original /home.

    I personally have not ever experienced / requiring more than 25gigs. Your 30gigs space should be ample.

    My disclaimer. Backup your stuff. My own linux is on my 5th drive and my steps I listed are what I would do.
    Thank you. I'm sorry I can't login into LXDE or GNOME as root user. I can login into tty as root user.

  11. #11
    Join Date
    Jan 2013
    Location
    Ventura, CA
    Posts
    427

    Re: Best way to increase Fedora partitions ~ / ?

    Another perhaps simpler way would be to boot up systemrescuecd (from a usb thumb drive), start up gparted and create two partitions from the unallocated space. It makes things easier if you label each new partition (right click on new partition and click on "Label" in the rescuecd). You might label your root "FedoraRoot". "FedoraHome" might be a good label for your /home partition. Then start up your fedora system and use rsync to copy your root partition to one of the new partitions you have created and do the same for your /home partition. Before doing anything, backup both home and your root partition using rsync (to another harddrive or usb drive).

    Here are the rsync commands to copy your partitions:

    Code:
    sudo rsync -axHAX --progress / /path/to/mounted/new/partition/for-root
    "/" after --progress obviously refers to your root partition

    Code:
    sudo rsync -ar --progress /home  /path/to/your/new/mounted/home/partition
    Then (still in your old system) go into /etc/fstab in your new root partition and change /home and / to correspond to the new partitions:
    Code:
    sudo gedit /mount-point-of-new-partition/etc/fstab
    Just change the old path to the new one or the old UUID number to the new number. To get UUID, just run "sudo blkid" and look for the path or label of your new root and /home partitions.

    Lastly update grub on your old system: "sudo grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg" (this should work on your efi-boot system).
    Reboot and you should see your old fedora system and your new one. Eventually you will delete the old partitions and update grub from your new fedora partition.

  12. #12
    Join Date
    Jun 2005
    Location
    Montreal, Que, Canada
    Posts
    5,545

    Re: Best way to increase Fedora partitions ~ / ?

    Gnome allows you to log in as root. At the login prompt, choose other and enter root and root's password.

    With lxde you need to log in as root, which should give you gparted access.

    Otherwise, as root and using fdisk with the -g to add space to the /home partition.
    Read about fdisk with "man fdisk" and checkout SIZES You would want +20g or perhaps +40g
    I think the command is sudo fdisk -s+40g /dev/sda9

    Check with others who used fdisk to expand file space.
    Leslie in Montreal

    Interesting web sites list
    http://forums.fedoraforum.org/showth...40#post1697840

  13. #13
    Join Date
    Jul 2014
    Location
    EU
    Posts
    291

    Re: Best way to increase Fedora partitions ~ / ?

    Quote Originally Posted by lsatenstein
    Gnome allows you to log in as root. At the login prompt, choose other and enter root and root's password.
    I've tried it again and I'm sorry it isn't working.

  14. #14
    Join Date
    Jul 2014
    Location
    EU
    Posts
    291

    Re: Best way to increase Fedora partitions ~ / ?

    Quote Originally Posted by donatom
    Another perhaps simpler way would be to boot up systemrescuecd (from a usb thumb drive), start up gparted and create two partitions from the unallocated space. It makes things easier if you label each new partition (right click on new partition and click on "Label" in the rescuecd). You might label your root "FedoraRoot". "FedoraHome" might be a good label for your /home partition. Then start up your fedora system and use rsync to copy your root partition to one of the new partitions you have created and do the same for your /home partition. Before doing anything, backup both home and your root partition using rsync (to another harddrive or usb drive).

    Here are the rsync commands to copy your partitions:

    Code:
    sudo rsync -axHAX --progress / /path/to/mounted/new/partition/for-root
    "/" after --progress obviously refers to your root partition

    Code:
    sudo rsync -ar --progress /home  /path/to/your/new/mounted/home/partition
    Then (still in your old system) go into /etc/fstab in your new root partition and change /home and / to correspond to the new partitions:
    Code:
    sudo gedit /mount-point-of-new-partition/etc/fstab
    Just change the old path to the new one or the old UUID number to the new number. To get UUID, just run "sudo blkid" and look for the path or label of your new root and /home partitions.

    Lastly update grub on your old system: "sudo grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg" (this should work on your efi-boot system).
    Reboot and you should see your old fedora system and your new one. Eventually you will delete the old partitions and update grub from your new fedora partition.
    Thank you. I've copied home folder, edited fstab, regenerated grub but files from new home folder are not visible.

  15. #15
    Join Date
    Jan 2013
    Location
    Ventura, CA
    Posts
    427

    Re: Best way to increase Fedora partitions ~ / ?

    Quote Originally Posted by boycottsystemd
    I've copied home folder, edited fstab, regenerated grub but files from new home folder are not visible.
    Have you either run "# mount -a" or restarted your system to activate changes in the fstab file so that your system will auto mount your new /home partition?

Page 1 of 2 1 2 LastLast

Similar Threads

  1. Fedora 26 - LVM disk - increase SWAP size
    By stevewalsh in forum Using Fedora
    Replies: 5
    Last Post: 25th September 2017, 10:34 AM
  2. Fedora 24 increase home LVM
    By chadit in forum Using Fedora
    Replies: 3
    Last Post: 10th October 2016, 05:28 AM
  3. Fedora USB Mouse Polling Increase
    By CeTis in forum Guides & Solutions (Not For Questions)
    Replies: 2
    Last Post: 11th May 2012, 09:31 PM
  4. Increase the Fedora partition
    By Computerphile in forum Using Fedora
    Replies: 3
    Last Post: 31st July 2011, 02:25 AM
  5. Huge increase in Fedora Core hacking
    By darkhatter in forum Fedora Focus
    Replies: 10
    Last Post: 14th November 2006, 03:09 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •