Repartition Hard Drive to Create Larger / Partition

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

Repartition Hard Drive to Create Larger / Partition

Postby linuxbrad » Apr 5th, '16, 20:47

Hello,

First let me apologize if this question has already been answered elsewhere. I did try to search for it on the forums but I didn't find exactly what I needed.

I have a Dell i5 with 8 GB RAM and 1 TB HDD. I installed Mageia 4 on this machine and then have since upgraded to Mageia 5. It is a single-boot machine only running Mageia 5 (I'm all in! :ugeek: ). Recently, I noticed that I started to get some errors that prevented me from updating some packages. The error I got was something along the lines of:

Code: Select all
Transaction Check Error:
  installing package XXXX needs #MB on the / filesystem
Error Summary
-------------
Disk Requirements:
  At least #MB more space needed on the / filesystem.


I had a look at my partitions to see what space I had and found that the / partition was 99% full. After uninstalling some packages got the following:

Code: Select all
[bradfonseca@localhost ~]$ df -H /
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda1        13G   11G  1.4G  90% /


and:

Code: Select all
[bradfonseca@localhost ~]$ df -H
Filesystem      Size  Used Avail Use% Mounted on
devtmpfs        4.2G     0  4.2G   0% /dev
tmpfs           4.2G  157M  4.0G   4% /dev/shm
tmpfs           4.2G  877k  4.2G   1% /run
/dev/sda1        13G   11G  1.4G  90% /
tmpfs           4.2G     0  4.2G   0% /sys/fs/cgroup
tmpfs           4.2G  111k  4.2G   1% /tmp
/dev/sda6       968G  107G  862G  11% /home
tmpfs           828M   13k  828M   1% /run/user/500


Basically, I have 13 GB partition for root, which is possibly smaller than what I have on my Android smartphone! I realize that this was an issue created by the Mageia 4 install ("Mageia 4 and earlier used to assign up to 12 GB to the root partition, which could be confusing for some end users (as 12 GB can be quickly filled after you've installed some games or several desktop environments).").

My problem now is I would like to resize the / partition, ideally without having to do a fresh install and having to completely reinstall everything. Is this possible? I've created a Mageia 5 Install USB but haven't checked to see if there are any utilities that will let me do this. Also, what would you suggest would be a "big enough" partition for root? 50 GB? 100 GB? I have 1 TB so I have space.

Thanks in advance for your help.

Brad
--
Brad Fonseca
IM: Find me on Signal (https://signal.org/) on phone or desktop [if you know the number]
IM: @bradfonseca:matrix.org
User avatar
linuxbrad
 
Posts: 42
Joined: May 1st, '13, 04:36

Re: Repartition Hard Drive to Create Larger / Partition

Postby Lebarhon » Apr 5th, '16, 21:02

Hello,
With a tool like Parted Live, you can shrink /home and increase / from about 6 or 7 GB. A live tool is mandatory because you must do that while the partitions aren't mounted.
http://gparted.org/livecd.php
Lebarhon
 
Posts: 408
Joined: Mar 22nd, '11, 22:24
Location: France

Re: Repartition Hard Drive to Create Larger / Partition

Postby linuxbrad » Apr 5th, '16, 21:15

Lebarhon wrote:Hello,
With a tool like Parted Live, you can shrink /home and increase / from about 6 or 7 GB. A live tool is mandatory because you must do that while the partitions aren't mounted.
http://gparted.org/livecd.php


Thank you for your response. May I ask why I can't go any bigger than 6 or 7 GB? Does Mageia have any live tools included? Again, I need to check the M5 Install USB I created to see if it has anything.

Regards,

Brad
--
Brad Fonseca
IM: Find me on Signal (https://signal.org/) on phone or desktop [if you know the number]
IM: @bradfonseca:matrix.org
User avatar
linuxbrad
 
Posts: 42
Joined: May 1st, '13, 04:36

Re: Repartition Hard Drive to Create Larger / Partition

Postby doktor5000 » Apr 5th, '16, 22:39

linuxbrad wrote:May I ask why I can't go any bigger than 6 or 7 GB?

Well you probably want more space in your /home, but you could easily also increase / by say 50 GB but that would be pretty pointless.
25GB / should be sufficient for a casual install, unless you plan to install a lot of big packages like games and such.

Although you should still take a look what takes up space and could be cleaned up. As root please post the output of
Code: Select all
du -mx /|sort -rn | head -25
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: 17629
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: Repartition Hard Drive to Create Larger / Partition

Postby linuxbrad » Apr 6th, '16, 17:44

doktor5000 wrote:
linuxbrad wrote:May I ask why I can't go any bigger than 6 or 7 GB?

Well you probably want more space in your /home, but you could easily also increase / by say 50 GB but that would be pretty pointless.
25GB / should be sufficient for a casual install, unless you plan to install a lot of big packages like games and such.


Since I have 1 TB of total space I think 50 GB would be safe. You can never have enough space for applications (or anything else for that matter).

doktor5000 wrote:Although you should still take a look what takes up space and could be cleaned up. As root please post the output of
Code: Select all
du -mx /|sort -rn | head -25


Okay, here is the output:
Code: Select all
[root@localhost bradfonseca]# du -mx / | sort -rn | head -25
10116   /
7894    /usr
3941    /usr/share
2501    /usr/lib64
1748    /var
1488    /usr/share/texmf-dist
1200    /usr/share/texmf-dist/fonts
880     /usr/lib
809     /var/log
801     /var/log/journal/61016a35edb84a18a686214f2132bb59
801     /var/log/journal
503     /var/cache
472     /var/cache/urpmi
472     /usr/bin
433     /var/cache/urpmi/rpms
409     /usr/lib64/libreoffice
403     /usr/share/texmf-dist/fonts/type1
374     /usr/share/doc
359     /opt
316     /usr/share/texmf-dist/fonts/type1/public
264     /usr/share/games
239     /var/lib
228     /usr/share/texmf-dist/fonts/vf
220     /usr/lib64/libreoffice/program
218     /usr/share/texmf-dist/tex
[root@localhost bradfonseca]#


Not sure what to make of it. I hope you'll explain to me what I'm seeing here. :?:

Thanks for the help!

Brad
--
Brad Fonseca
IM: Find me on Signal (https://signal.org/) on phone or desktop [if you know the number]
IM: @bradfonseca:matrix.org
User avatar
linuxbrad
 
Posts: 42
Joined: May 1st, '13, 04:36

Re: Repartition Hard Drive to Create Larger / Partition

Postby linuxbrad » Apr 6th, '16, 17:55

linuxbrad wrote:
Not sure what to make of it. I hope you'll explain to me what I'm seeing here. :?:



Actually, the man pages were fairly helpful.

Code: Select all
du -mx / | sort -rn | head -25


This means check my disk usage associated with my Mageia 5 filesystem and display the file sizes in MB blocks. Take this output and sort it so the largest files show up first. Then display the first 25 lines of this output. Am I right? :geek:

Thanks,

Brad
--
Brad Fonseca
IM: Find me on Signal (https://signal.org/) on phone or desktop [if you know the number]
IM: @bradfonseca:matrix.org
User avatar
linuxbrad
 
Posts: 42
Joined: May 1st, '13, 04:36

Re: Repartition Hard Drive to Create Larger / Partition

Postby jiml8 » Apr 6th, '16, 18:24

Just FWIW, I run a very large Linux workstation, and I have 28G devoted to /, and it is 66% full at the present time.

From the output you provided, your journal is out of control. It is occupying way too much space. Take a look in /var/log/journal and follow into the subdirectory(s) you find there looking for .journal files. You will probably find many old and large files that do you no good. Delete them.

You might want to go into /etc/systemd and edit journald.conf to limit the amount of space the journal is allowed to use on your system. On mine, SystemMaxUse is uncommented and set to 100M, while SystemMaxFileSize=10M and MaxFileSec=1month.

To uncomment them, remove the # symbol that is in front of the line.
jiml8
 
Posts: 1253
Joined: Jul 7th, '13, 18:09

Re: Repartition Hard Drive to Create Larger / Partition

Postby doktor5000 » Apr 6th, '16, 20:39

linuxbrad wrote:Actually, the man pages were fairly helpful.

Code: Select all
du -mx / | sort -rn | head -25


This means check my disk usage associated with my Mageia 5 filesystem and display the file sizes in MB blocks. Take this output and sort it so the largest files show up first. Then display the first 25 lines of this output. Am I right? :geek:

You're scaring me, you actually read the man pages? :o
And yes you are correct. ;)

And I'd not say that the journal is out of control, but you may want to check if there are orphaned journal files, as root via
Code: Select all
find /var/log/journal -type f -name "*~"

which finds all files ending with ~ character but those probably don't occupy that much space.
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: 17629
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: Repartition Hard Drive to Create Larger / Partition

Postby jiml8 » Apr 6th, '16, 23:44

doktor5000 wrote:And I'd not say that the journal is out of control,


On my system (with the settings I indicated previously):
Code: Select all
37      /var/log/journal/d3b60e79ee19433d99c2fe3a93e9b0ae
37      /var/log/journal

Or, less than 5% of OP's journal size. OP is showing a journal of over 800M. In my book that is out of control.
jiml8
 
Posts: 1253
Joined: Jul 7th, '13, 18:09

Re: Repartition Hard Drive to Create Larger / Partition

Postby jiml8 » Apr 6th, '16, 23:47

OP also has a huge /var/cache/ It needs to be cleaned out. Looks like an update started, then failed, with lots of RPMs cached and not installed. OP might just want to go ahead and manually install those using urpmi.
jiml8
 
Posts: 1253
Joined: Jul 7th, '13, 18:09

Re: Repartition Hard Drive to Create Larger / Partition

Postby linuxbrad » Apr 8th, '16, 16:02

jiml8 wrote:Just FWIW, I run a very large Linux workstation, and I have 28G devoted to /, and it is 66% full at the present time.


Based on what you're saying I should be fine with 13 GB for a / partition, as long as I don't install a lot of extraneous stuff. I keep an eye on things for now then.

jiml8 wrote:From the output you provided, your journal is out of control. It is occupying way too much space. Take a look in /var/log/journal and follow into the subdirectory(s) you find there looking for .journal files. You will probably find many old and large files that do you no good. Delete them.

You might want to go into /etc/systemd and edit journald.conf to limit the amount of space the journal is allowed to use on your system. On mine, SystemMaxUse is uncommented and set to 100M, while SystemMaxFileSize=10M and MaxFileSec=1month.

To uncomment them, remove the # symbol that is in front of the line.


Thanks! I will dig into /var/log/journal and clean out what I can. I will also set up the limits you suggest for the journal.
--
Brad Fonseca
IM: Find me on Signal (https://signal.org/) on phone or desktop [if you know the number]
IM: @bradfonseca:matrix.org
User avatar
linuxbrad
 
Posts: 42
Joined: May 1st, '13, 04:36

Re: Repartition Hard Drive to Create Larger / Partition

Postby linuxbrad » Apr 8th, '16, 16:06

jiml8 wrote:OP also has a huge /var/cache/ It needs to be cleaned out. Looks like an update started, then failed, with lots of RPMs cached and not installed. OP might just want to go ahead and manually install those using urpmi.


I'll have a look at /var/cache too. Is it okay to just delete the files within? For updates, I usually use the Mageia Control Centre. According to it, my system is up to date.

Also, should I clear out /var/cache/urpmi too?

Thanks for all the help with this. This situation just highlights that good hard drive hygeine is a best practice. :idea:
--
Brad Fonseca
IM: Find me on Signal (https://signal.org/) on phone or desktop [if you know the number]
IM: @bradfonseca:matrix.org
User avatar
linuxbrad
 
Posts: 42
Joined: May 1st, '13, 04:36

Re: Repartition Hard Drive to Create Larger / Partition

Postby linuxbrad » Apr 8th, '16, 16:34

Hello All,

I've gone ahead and did the clean up suggested by jimI8. Here is the output of 'df' command:

Code: Select all
[root@localhost ~]# df -H
Filesystem      Size  Used Avail Use% Mounted on
devtmpfs        4.2G     0  4.2G   0% /dev
tmpfs           4.2G   56M  4.1G   2% /dev/shm
tmpfs           4.2G  869k  4.2G   1% /run
/dev/sda1        13G  9.4G  2.6G  79% /
tmpfs           4.2G     0  4.2G   0% /sys/fs/cgroup
tmpfs           4.2G  107k  4.2G   1% /tmp
/dev/sda6       968G  107G  862G  11% /home
tmpfs           828M   13k  828M   1% /run/user/500


and here is the output of the series of commands suggested by doktor5000:

Code: Select all
[root@localhost ~]# du -mx / | sort -rn | head -25
8847    /
7894    /usr
3941    /usr/share
2501    /usr/lib64
1488    /usr/share/texmf-dist
1200    /usr/share/texmf-dist/fonts
880     /usr/lib
479     /var
472     /usr/bin
409     /usr/lib64/libreoffice
403     /usr/share/texmf-dist/fonts/type1
374     /usr/share/doc
359     /opt
316     /usr/share/texmf-dist/fonts/type1/public
264     /usr/share/games
239     /var/lib
228     /usr/share/texmf-dist/fonts/vf
220     /usr/lib64/libreoffice/program
218     /usr/share/texmf-dist/tex
212     /usr/share/atom
209     /usr/share/foomatic/db/source
209     /usr/share/foomatic/db
209     /usr/share/foomatic
191     /usr/share/apps
190     /var/tmp


Please let me know if there anything else I should do at this point, short of the repartition I initially asked about. However, at this point and based on jimI8's comments, I might wait and see before doing anything that drastic.

Regards,

Brad
--
Brad Fonseca
IM: Find me on Signal (https://signal.org/) on phone or desktop [if you know the number]
IM: @bradfonseca:matrix.org
User avatar
linuxbrad
 
Posts: 42
Joined: May 1st, '13, 04:36


Return to Basic support

Who is online

Users browsing this forum: artee and 1 guest

cron