/root partition is full ! how can resize ?

General support questions
He3am
Posts: 19
Joined: 2013/04/07 07:07:14

/root partition is full ! how can resize ?

Post by He3am » 2013/12/30 18:48:27

hi
my server is /root partition is 100% full
how can resize /root or free this partition ?
after full mysql is down and cpanel not open

SteveC
Posts: 19
Joined: 2013/10/29 20:39:42

Re: /root partition is full ! how can resize ?

Post by SteveC » 2013/12/30 20:10:15

Your first step is probably to move (copy/verify/delete) files from the root partition to a partition that has more available space, as many things break when the / partition is full.

# df -h

will show you where your free space (if any) is, on your mounted partitions.

# du -sh /*

will show you how much drive space each of your top-level directories are consuming, which might help identify files that don't need to be on the root partition (WARNING: DO NOT JUST RANDOMLY MOVE/DELETE DIRECTORIES FROM / JUST BECAUSE THEY ARE LARGE - DOING SO MAY MAKE YOUR SYSTEM UNBOOTABLE.)

If you can provide some additional details (e.g., the output from the above two commands), I might be able to provide additional recommendations.

User avatar
vonskippy
Posts: 839
Joined: 2006/12/30 03:00:04
Location: Western Slope Colorado

Re: /root partition is full ! how can resize ?

Post by vonskippy » 2013/12/30 20:26:33

Do you mean your "root" partition i.e. /

Or do you mean root's partition i.e. /root

Post more details, since the solution will depend on what size your drives are, what partition types you have, and how much free space there is to resize to.
For the 2.5^15th time :: Better Details = Better Answers

He3am
Posts: 19
Joined: 2013/04/07 07:07:14

Re: /root partition is full ! how can resize ?

Post by He3am » 2013/12/30 20:57:35

root@[~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/vg_h3722021210-lv_root 50G 46G 931M 99% /
tmpfs 16G 6.5M 16G 1% /dev/shm
/dev/md127p1 485M 92M 369M 20% /boot
/dev/mapper/vg_h3722021210-lv_home 155G 123G 25G 84% /home
/usr/tmpDSK 485M 59M 401M 13% /tmp

SteveC
Posts: 19
Joined: 2013/10/29 20:39:42

Re: /root partition is full ! how can resize ?

Post by SteveC » 2013/12/30 21:07:45

Can you post the output of:

# du -sh /*

also? (I know this takes a while, so you might be processing it already) and, sorry I didn't think of it in my first post, but:

# fdisk -l

(that's a lower-case L). This will show us what drive partitions you have on the system (and whether you've got any unallocated/unmounted partition space on your drive(s)) It looks like you're near limits on your mounted filesystems - less than 1GB free on your / partition, and only 25GB free on your /home partition. So, while you may be able to identify files to move from the / partition over to the /home partition, if you don't have additional drive space, you may not be able to grow the / partition...

He3am
Posts: 19
Joined: 2013/04/07 07:07:14

Re: /root partition is full ! how can resize ?

Post by He3am » 2013/12/31 20:08:10

root@[~]# fdisk -l

Disk /dev/sdb: 120.0 GB, 120034123776 bytes
255 heads, 63 sectors/track, 14593 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000


Disk /dev/sda: 120.0 GB, 120034123776 bytes
255 heads, 63 sectors/track, 14593 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000e87c2

Device Boot Start End Blocks Id System
/dev/sda1 * 1 64 512000 83 Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2 64 29187 233923584 8e Linux LVM

Disk /dev/md127: 240.1 GB, 240063086592 bytes
2 heads, 4 sectors/track, 58609152 cylinders
Units = cylinders of 8 * 512 = 4096 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 32768 bytes / 65536 bytes
Disk identifier: 0x000e87c2

Device Boot Start End Blocks Id System
/dev/md127p1 * 257 128256 512000 83 Linux
Partition 1 does not end on cylinder boundary.
/dev/md127p2 128257 58609152 233923584 8e Linux LVM
Partition 2 does not end on cylinder boundary.

Disk /dev/mapper/vg_h3722021210-lv_root: 53.7 GB, 53687091200 bytes
255 heads, 63 sectors/track, 6527 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 32768 bytes / 65536 bytes
Disk identifier: 0x00000000


Disk /dev/mapper/vg_h3722021210-lv_swap: 16.9 GB, 16894656512 bytes
255 heads, 63 sectors/track, 2053 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 32768 bytes / 65536 bytes
Disk identifier: 0x00000000


Disk /dev/mapper/vg_h3722021210-lv_home: 169.0 GB, 168954953728 bytes
255 heads, 63 sectors/track, 20540 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 32768 bytes / 65536 bytes
Disk identifier: 0x00000000

SteveC
Posts: 19
Joined: 2013/10/29 20:39:42

Re: /root partition is full ! how can resize ?

Post by SteveC » 2014/01/27 21:58:31

Sorry I got busy and haven't been able to follow up on this for you.

Looks like the drives you have in your system are full, and you don't have any spare drives available in the system to which you can move data. That means you're going to have to figure out where your data sinks are, and determine if you can afford to make them smaller (by deleting some of the files in the particularly large directories.

At a starting point, try:
# du -sh /*

This should give you the size of each of your top-level directories. Mine looks like:

Code: Select all

# du -sh /*
24M     /backup
7.7M    /bin
114M    /boot
160K    /dev
31M     /etc
4.4G    /home
552M    /lib
27M     /lib64
16K     /lost+found
4.0K    /media
4.0K    /mnt
4.5G    /mount
8.0K    /opt
3.1G    /root
15M     /sbin
0       /selinux
4.0K    /srv
0       /sys
8.0K    /tmp
2.0G    /usr
191G    /var
Once you've identified what directory(ies) have the most contained in them, you can dig a level deeper with:
# du -sh /DIRECTORYNAME
(e.g., du -sh /root)
to see what's going in in there.

Be VERY cautious about deleting/moving anything from the core system directories /bin /boot /dev /etc /lib* /root /sbin /sys and /usr - deleting things there without understanding what you're doing could easily result in a non-functioning system.

I'd guess that you've got a lot of things in your root user's directory (/root) that don't need to be there, and you can probably clean some of them out to reclaim space on your / partition. Good luck, and if you still need help, I'll try to check in more frequently.

zor4
Posts: 1
Joined: 2014/08/16 08:53:32

Re: /root partition is full ! how can resize ?

Post by zor4 » 2014/08/16 09:00:27

For this issue I am using ubuntu live cd.
Run terminal.
#sudo gparted
and change size of problem partition (right click on partition, "Resize" option).
GUI of gparted is very simple and native.
enjoy

NameMatch
Posts: 7
Joined: 2014/08/18 10:31:42

Re: /root partition is full ! how can resize ?

Post by NameMatch » 2014/08/18 10:34:47

Hi,

here you have a nice little tutorial about disk management tools fdisk and parted:

fdisk
GNU parted

johanvermeij
Posts: 31
Joined: 2015/11/25 10:36:18

Re: /root partition is full ! how can resize ?

Post by johanvermeij » 2016/09/25 09:20:17

Look for directories crash and abrt under /var

Empty those and you will have a wonderful amount of available space
I sure did :))

Post Reply

Return to “CentOS 6 - General Support”