0

Lately I am trying to update the packages in my Centos (Physical Box) and got error about not enough space. What is the best way to resize a mount point that is no LVM?

Follows are some information:

[root@sever ~]# yum update
:#skipped
:#skipped
Disk Requirements:
At least 26MB needed on the / filesystem.


[root@sever ~]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda9             9.5G  9.0G   28M 100% /
/dev/sda8             9.5G  151M  8.9G   2% /tmp
/dev/sda6              95G  4.6G   86G   6% /usr
/dev/sda5             139G  825M  131G   1% /var
/dev/sda3              95G  213M   90G   1% /var/log
/dev/sda2              95G  4.2G   86G   5% /home
/dev/sda1             965M   34M  882M   4% /boot
tmpfs                 1.9G     0  1.9G   0% /dev/shm


[root@sever ~]# fdisk -l

Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1         127     1020096   83  Linux
/dev/sda2             128       12875   102398310   83  Linux
/dev/sda3           12876       25623   102398310   83  Linux
/dev/sda4           25624       60801   282567285    5  Extended
/dev/sda5           25624       44228   149444631   83  Linux
/dev/sda6           44229       56976   102398278+  83  Linux
/dev/sda7           56977       58251    10241406   82  Linux swap / Solaris
/dev/sda8           58252       59526    10241406   83  Linux
/dev/sda9           59527       60801    10241406   83  Linux

If I would like to shift some spaces from /dev/sda5 to /dev/sda9, is it possible? Thanks for any comment.

user3162764
  • 37
  • 1
  • 5
  • You're going to need to tell us more about this server. Is it a physical box? Virtualized somehow? – EEAA Mar 19 '14 at 15:38
  • Hello, it is a physical box Centos – user3162764 Mar 19 '14 at 15:55
  • Do you have any free storage available on this server's attached storage? – EEAA Mar 19 '14 at 15:56
  • Sure. /dev/sda5 139G 825M 131G 1% /var-- I would like to shift some space from this to the "/", is it possible? – user3162764 Mar 19 '14 at 15:58
  • Please edit your question and include these details. – EEAA Mar 19 '14 at 15:58
  • 4
    The filesystem layout you have seems pretty much conform best practices, so the question should begin with is simply why you're running out of space on your root partition in the first place. `du -s` is your friend. – HBruijn Mar 19 '14 at 16:12
  • 2
    Given your current layout I would be tempted to boot a livecd, and **shift space between sda8(/tmp) -> sda9(/root)**. This should be a quick easy fix with gparted, just decrease the sda8 size, and change the sda9 start point. For any other changes you are probably looking at a backup/re-partition/reinstall/restore. – Zoredache Mar 19 '14 at 16:37
  • You don't say what filesystem you're running, but modern best practices typically don't include splitting the OS across so many partitions. That was much more relevant back before journaling filesystems. – BMDan Mar 19 '14 at 17:22
  • 2
    And you've discovered one of the reasons why we _do_ use LVM to begin with. – Michael Hampton Mar 19 '14 at 18:15
  • One of my favorite commands to debug filesystem usage ( on GNU userspaces ) is `du -hsx /* | sort -h ` which shows the highest users on / on the bottom of the output. Repeat as necessary until you find the culprits. – erik258 Mar 19 '14 at 19:36

0 Answers0