Author Topic: Increase Disk Size in /?  (Read 13193 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
Increase Disk Size in /?
« on: May 16, 2020, 11:07:17 PM »
Hi,

I have tried a number of methods to increase size in / and reduce the size in /home, but I am drawing blanks.

I tried this - https://serverfault.com/questions/771921/how-to-shrink-home-and-add-more-space-on-centos7
Which I get as far as "lvremove /dev/mapper/centos-home" then get an error of  "Volume group "centos" not found Cannot process volume group centos"

And this method has the same problem.
https://serverfault.com/questions/765302/how-to-move-disk-space-from-centos-home-to-centos-root

Offline
*
Re: Increase Disk Size in /?
« Reply #1 on: July 09, 2020, 08:10:17 PM »
Bump

Re: Increase Disk Size in /?
« Reply #2 on: July 09, 2020, 11:08:39 PM »
This is a forum about CWP not Linux administration.
Do you actually know whether your storage uses LVM? Do you understand the benefits?

Shared hosting is very cheap.  ::)

Offline
*
Re: Increase Disk Size in /?
« Reply #3 on: July 11, 2020, 01:03:17 AM »
I love people who are sarcastic, rather than helpful, imagin thinking you are so smart, and have the knowladge, yet you are unwilling to impart that on others, and wish to belittle them.

Additionally, you might not have noticed the forum name here, it's clearly labled "OTHER", you know, for none CWP stuff? Perhaps even, I don't know, other stuff!

If you don't have anything nice to say, don't say it.

« Last Edit: July 11, 2020, 01:06:04 AM by Idontknow »

Re: Increase Disk Size in /?
« Reply #4 on: July 11, 2020, 10:07:42 AM »
If you care to look around, I do sometimes help on this forum.
On the 'net, in general, I actually contribute widely including supporting open source projects, give advice to improve methodologies and guide others.
What I object to is spoon-feeding those who do not make the effort. Some of us have spent years in training, enhanced by industry experience to gain knowledge, at no little expense/sacrifice.

You have already looked at some relevant serverfault articles (a good place to start) but stopped immediately when the setup didn't match your environment. You need to (at least partially) understand your own setup.
Clues:
mount | grep dev
fdisk -l
fsck -f
resize2fs

Quote
If you don't have anything nice to say, don't say it.
I left Kindergarten many moons ago.  :o
« Last Edit: July 11, 2020, 10:09:50 AM by cynique »

Offline
*
Re: Increase Disk Size in /?
« Reply #5 on: July 11, 2020, 01:26:21 PM »
If you care to look around, I do sometimes help on this forum.
On the 'net, in general, I actually contribute widely including supporting open source projects, give advice to improve methodologies and guide others.
What I object to is spoon-feeding those who do not make the effort. Some of us have spent years in training, enhanced by industry experience to gain knowledge, at no little expense/sacrifice.

I have looked at your posts, and you do have a habit of being exceptionally rude, maybe to feel superior, because after all, you "spent years in training", and us plebs are just doing it as a bit of a hobby, maybe going on forums for a little help because we got stuck, shame on us for trying to learn, we should go through all those years of training! Nothing like a lovely bit of gatekeeping.

Quote
You have already looked at some relevant serverfault articles (a good place to start) but stopped immediately when the setup didn't match your environment. You need to (at least partially) understand your own setup.

Yes, I got stuck, so I came to a forum for some help, to try and learn, I love learning, being spoon-fed is not helpful, how does one learn without understanding why something is being typed.

Quote
Clues:
mount | grep dev
fdisk -l
fsck -f
resize2fs

Okay, thanks.

Quote
Quote
If you don't have anything nice to say, don't say it.
I left Kindergarten many moons ago.  :o

Could have fooled me.

Re: Increase Disk Size in /?
« Reply #6 on: July 11, 2020, 04:23:03 PM »
.. us plebs are just doing it as a bit of a hobby..
Herein lies the problem. There are many whose 'hobby' actually means they have paying customers - the industry is swamped by 'cowboys'. I host clients almost as a hobby because I don't earn sufficient to earn a living/minimum wage. I wouldn't have considered it had I not had a background/qualifications in IT and was willing to research/Google a lot.
[I can fly a plane but it doesn't make me a pilot.]

Of course, everyone has to start somewhere but jumping in at VPS (and dedicated server) level without fundamental knowledge is not really the best way to go about things. I started with shared hosting, then Reseller before progressing to VPS etc. and that was with my background.
(Can I be a surgeon without studying anatomy?)

Offline
*
Re: Increase Disk Size in /?
« Reply #7 on: July 11, 2020, 08:32:11 PM »
I'm not selling anything to anyone, I am playing around in my own little sandbox, the only customer I have is myself. My goal is learning, I have IT qualifications, not that it means much, since there are plenty of people who are amazing with these things who are self-taught.

I mean, I could hire someone to fix everything for me all nice, and pretty, but where is the fun, and learning in that?

Offline
*
Re: Increase Disk Size in /?
« Reply #8 on: July 13, 2020, 03:46:11 PM »
I'm not selling anything to anyone, I am playing around in my own little sandbox, the only customer I have is myself. My goal is learning, I have IT qualifications, not that it means much, since there are plenty of people who are amazing with these things who are self-taught.

I mean, I could hire someone to fix everything for me all nice, and pretty, but where is the fun, and learning in that?
I like to do it myself too ;)
Are you looking for an online
 spell checker? Here is a good deal for you!

Offline
*
Re: Increase Disk Size in /?
« Reply #9 on: July 13, 2020, 06:09:36 PM »
it will be very helpful if someone posts a solution to this issue here !

Re: Increase Disk Size in /?
« Reply #10 on: July 13, 2020, 10:17:43 PM »
This topic is still alive!?

There is no one solution - it all depends on how your discs are configured!!!
  • If you use 'straight' partitioning then you're likely going to need to boot into a 'rescue' mode.
  • If you use xfs formatted partitions, then you can't shrink them to allow space for another partition.
  • If you can boot from a systemrescuecd ISO, then you might be able to use gparted to resize partitions.
  • You could purchase additional disc space and move say, home to it, leaving more space to extend root.

Any example that I could demonstrate here would not fit in with your particular situation. If you really are stuck then perhaps your hosting provider will help, though don't expect it if it's a cheap unmanaged service.
I've already listed some of the key commands, so find out what they do and run them. When you know how your disc is/are configured, then do an internet search on how you can resize them. Plus, find out about disc mount points while you're at it.

Here is one of my CWP setups:
Code: [Select]
df -h
Filesystem                 Size  Used Avail Use% Mounted on
devtmpfs                   908M     0  908M   0% /dev
tmpfs                      919M     0  919M   0% /dev/shm
tmpfs                      919M   97M  823M  11% /run
tmpfs                      919M     0  919M   0% /sys/fs/cgroup
/dev/mapper/system-root    7.8G  4.1G  3.4G  55% /
/dev/vda1                  488M  270M  183M  60% /boot
/dev/mapper/system-backup  5.0G  2.0G  2.8G  42% /backup
/dev/mapper/system-home     40G  740M   37G   2% /home
/dev/mapper/system-tmp     2.0G  4.3M  1.9G   1% /tmp
/dev/mapper/system-var     2.9G  838M  2.0G  31% /var
tmpfs                      184M     0  184M   0% /run/user/0
Another CentOS VPS
Code: [Select]
df -h
Filesystem                   Size  Used Avail Use% Mounted on
devtmpfs                     485M     0  485M   0% /dev
tmpfs                        496M     0  496M   0% /dev/shm
tmpfs                        496M   51M  446M  11% /run
tmpfs                        496M     0  496M   0% /sys/fs/cgroup
/dev/mapper/centos_uk2-root   12G  6.5G  4.4G  60% /
/dev/vda1                    477M  133M  316M  30% /boot
/dev/mapper/centos_uk2-tmp   2.0G  3.0M  1.9G   1% /tmp
/dev/dm-5                    3.8G   16M  3.6G   1% /backup
/dev/dm-6                     20G   46M   19G   1% /home
tmpfs                        100M     0  100M   0% /run/user/0
Here is an entirely different Debian setup
Code: [Select]
df -h
Filesystem      Size  Used Avail Use% Mounted on
udev            236M     0  236M   0% /dev
tmpfs            50M  5.4M   44M  11% /run
/dev/sda1       2.4G  1.4G  918M  60% /
tmpfs           247M     0  247M   0% /dev/shm
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs           247M     0  247M   0% /sys/fs/cgroup
/dev/sda6       3.0G  9.2M  2.8G   1% /home
tmpfs            50M     0   50M   0% /run/user/0
« Last Edit: July 13, 2020, 10:32:17 PM by cynique »

Re: Increase Disk Size in /?
« Reply #11 on: July 14, 2020, 10:44:37 AM »
It occurs to me, that many may not need to increase the size of root. If root is 12GB or more, then it's more likely that you need to manage your server better.
Check the size of log files and rotate them more frequently, if you have /var mounted on root.
Are you managing the /backup space, if mounted on root?
Clean up the update cache: yum clean all
Do you have large/numerous databases that are mounted on root, if so move them to their own /var/mysql disc.
The list could go on but these are the main space hoggers.

Offline
*
Re: Increase Disk Size in /?
« Reply #12 on: July 14, 2020, 09:43:33 PM »
It occurs to me, that many may not need to increase the size of root. If root is 12GB or more, then it's more likely that you need to manage your server better.
Check the size of log files and rotate them more frequently, if you have /var mounted on root.
Are you managing the /backup space, if mounted on root?
Clean up the update cache: yum clean all
Do you have large/numerous databases that are mounted on root, if so move them to their own /var/mysql disc.
The list could go on but these are the main space hoggers.

Damn, I forgot to check where the databases are mounted, the backups I moved, the logs I keep clean, but completly forgot about the databases, that is most likley the issue!

Offline
*
Re: Increase Disk Size in /?
« Reply #13 on: August 22, 2022, 04:21:39 PM »
Hi,
Please suggest a solution for my problem.
Attached screenshots.

Thanks in advance!!!

https://www59.zippyshare.com/v/9qfIu4Xg/file.html
https://www59.zippyshare.com/v/uz51PLjj/file.html

« Last Edit: August 22, 2022, 04:26:05 PM by nilshinde »