/root partition 100%

114 views
Skip to first unread message

Vishwash Chandra

unread,
Oct 5, 2016, 6:47:21 AM10/5/16
to vg...@googlegroups.com
hello everyone
my server Centos 7  /root partition is 100% full,how can resize /root partition without any data loss.

--
Regard
Vishwash Chandra
Red Hat Certified Engineer
Certificate No. :- 805010880650872
Mobile :- +91-9328025996

Pinakin Bhatt

unread,
Oct 5, 2016, 7:17:06 AM10/5/16
to vg...@googlegroups.com
Hi..

have you checked Inode is free ?
kindly send output of following command

df -hi

Regards,
Pinakin

--
Please read http://www.catb.org/~esr/faqs/smart-questions.html before posting.
You received this message because you are subscribed to the "Vibrant GNU/Linux User Group".
To stop receiving emails from this group, mail to VGLUG+unsubscribe@googlegroups.com
To post to this group, send email to VG...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/VGLUG

---
You received this message because you are subscribed to the Google Groups "VGLUG" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vglug+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Pinakin Bhatt

unread,
Oct 5, 2016, 7:17:55 AM10/5/16
to vg...@googlegroups.com
Hi..

And also send output of following command

lsof -i

Regards,
P

Vishwash Chandra

unread,
Oct 5, 2016, 7:30:14 AM10/5/16
to vg...@googlegroups.com



login as: root
ro...@192.168.5.142's password:
Last login: Wed Oct  5 15:05:47 2016 from 192.168.5.112
ABRT has detected 2 problem(s). For more info run: abrt-cli list --since 1467173                                                                                                                     356
mktemp: failed to create file via template '/tmp/.colorlsXXX': No space left on                                                                                                                      device
-bash: $TMP: ambiguous redirect
[root@localhost ~]# df -hi
Filesystem     Inodes IUsed IFree IUse% Mounted on
/dev/sda6        4.1K  3.1K  1.1K   76% /
devtmpfs         465K   426  465K    1% /dev
tmpfs            470K     1  470K    1% /dev/shm
tmpfs            470K   518  470K    1% /run
tmpfs            470K    13  470K    1% /sys/fs/cgroup
/dev/sda5         59M  125K   59M    1% /usr
/dev/sda3         32M   58K   32M    1% /home
/dev/sda1        9.8M   329  9.8M    1% /boot
/dev/sda2        196M  101K  196M    1% /var
[root@localhost ~]# df -hi
Filesystem     Inodes IUsed IFree IUse% Mounted on
/dev/sda6        4.1K  3.1K  1.1K   76% /
devtmpfs         465K   426  465K    1% /dev
tmpfs            470K     1  470K    1% /dev/shm
tmpfs            470K   518  470K    1% /run
tmpfs            470K    13  470K    1% /sys/fs/cgroup
/dev/sda5         59M  125K   59M    1% /usr
/dev/sda3         32M   58K   32M    1% /home
/dev/sda1        9.8M   329  9.8M    1% /boot
/dev/sda2        196M  101K  196M    1% /var
[root@localhost ~]# df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda6        20G   20G   48K 100% /
devtmpfs        1.9G     0  1.9G   0% /dev
tmpfs           1.9G     0  1.9G   0% /dev/shm
tmpfs           1.9G   17M  1.9G   1% /run
tmpfs           1.9G     0  1.9G   0% /sys/fs/cgroup
/dev/sda5        59G  4.0G   55G   7% /usr
/dev/sda3        59G   51G  7.8G  87% /home
/dev/sda1       9.8G  108M  9.7G   2% /boot
/dev/sda2       196G   74G  122G  38% /var
[root@localhost ~]# df -hi
Filesystem     Inodes IUsed IFree IUse% Mounted on
/dev/sda6        4.1K  3.1K  1.1K   76% /
devtmpfs         465K   426  465K    1% /dev
tmpfs            470K     1  470K    1% /dev/shm
tmpfs            470K   518  470K    1% /run
tmpfs            470K    13  470K    1% /sys/fs/cgroup
/dev/sda5         59M  125K   59M    1% /usr
/dev/sda3         32M   58K   32M    1% /home
/dev/sda1        9.8M   329  9.8M    1% /boot
/dev/sda2        196M  101K  196M    1% /var
[root@localhost ~]# lsof -i
COMMAND    PID    USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
avahi-dae  722   avahi   12u  IPv4  20012      0t0  UDP *:mdns
avahi-dae  722   avahi   13u  IPv4  20013      0t0  UDP *:56012
chronyd    735  chrony    1u  IPv4  18695      0t0  UDP *:ntp
chronyd    735  chrony    2u  IPv6  18696      0t0  UDP *:ntp
chronyd    735  chrony    3u  IPv4  18697      0t0  UDP localhost:323
chronyd    735  chrony    5u  IPv6  18698      0t0  UDP localhost:323
dhclient   862    root    6u  IPv4  20361      0t0  UDP *:bootpc
dhclient   862    root   20u  IPv4  21004      0t0  UDP *:10642
dhclient   862    root   21u  IPv6  21005      0t0  UDP *:54798
rpcbind   1064     rpc    7u  IPv4  21917      0t0  UDP *:sunrpc
rpcbind   1064     rpc    8u  IPv4  21918      0t0  UDP *:device
rpcbind   1064     rpc    9u  IPv4  21919      0t0  TCP *:sunrpc (LISTEN)
rpcbind   1064     rpc   10u  IPv6  21920      0t0  UDP *:sunrpc
rpcbind   1064     rpc   11u  IPv6  21921      0t0  UDP *:device
rpcbind   1064     rpc   12u  IPv6  21922      0t0  TCP *:sunrpc (LISTEN)
vsftpd    1068    root    3u  IPv4  22532      0t0  TCP *:ftp (LISTEN)
sshd      1074    root    3u  IPv4  22568      0t0  TCP *:ssh (LISTEN)
sshd      1074    root    4u  IPv6  22570      0t0  TCP *:ssh (LISTEN)
rpc.statd 1079 rpcuser    7u  IPv4  22227      0t0  UDP *:42061
rpc.statd 1079 rpcuser    8u  IPv4  22230      0t0  TCP *:37373 (LISTEN)
rpc.statd 1079 rpcuser    9u  IPv4  22669      0t0  UDP localhost:834
rpc.statd 1079 rpcuser   10u  IPv6  22233      0t0  UDP *:36432
rpc.statd 1079 rpcuser   11u  IPv6  22236      0t0  TCP *:60151 (LISTEN)
master    2090    root   13u  IPv4  23732      0t0  TCP localhost:smtp (LISTEN)
master    2090    root   14u  IPv6  23733      0t0  TCP localhost:smtp (LISTEN)
nmbd      2099    root   11u  IPv4  23842      0t0  UDP *:netbios-ns
nmbd      2099    root   12u  IPv4  23843      0t0  UDP *:netbios-dgm
nmbd      2099    root   13u  IPv4  23845      0t0  UDP 192.168.5.142:netbios-ns                                                                                                                    
nmbd      2099    root   14u  IPv4  23846      0t0  UDP 192.168.5.255:netbios-ns                                                                                                                    
nmbd      2099    root   15u  IPv4  23847      0t0  UDP 192.168.5.142:netbios-dg                                                                                                                     m
nmbd      2099    root   16u  IPv4  23848      0t0  UDP 192.168.5.255:netbios-dg                                                                                                                     m
smbd      2104    root   31u  IPv6  23892      0t0  TCP *:microsoft-ds (LISTEN)
smbd      2104    root   32u  IPv6  23893      0t0  TCP *:netbios-ssn (LISTEN)
smbd      2104    root   33u  IPv4  23894      0t0  TCP *:microsoft-ds (LISTEN)
smbd      2104    root   34u  IPv4  23895      0t0  TCP *:netbios-ssn (LISTEN)
smbd      2213    root   35u  IPv4  24803      0t0  TCP 192.168.5.142:microsoft-                                                                                                                     ds->192.168.5.112:50316 (ESTABLISHED)
smbd      2270    root   35u  IPv4  25033      0t0  TCP 192.168.5.142:microsoft-                                                                                                                     ds->192.168.5.167:51637 (ESTABLISHED)
smbd      3681    root   35u  IPv4  36379      0t0  TCP 192.168.5.142:microsoft-                                                                                                                     ds->192.168.5.102:61757 (ESTABLISHED)
sshd      4437    root    3u  IPv4  41733      0t0  TCP 192.168.5.142:ssh->192.1                                                                                                                     68.5.112:52623 (ESTABLISHED)
[root@localhost ~]# ^C
[root@localhost ~]#

Nimit Gajjar

unread,
Oct 5, 2016, 8:15:50 AM10/5/16
to vg...@googlegroups.com
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda6        20G   20G   48K 100% /
devtmpfs        1.9G     0  1.9G   0% /dev
tmpfs           1.9G     0  1.9G   0% /dev/shm
tmpfs           1.9G   17M  1.9G   1% /run
tmpfs           1.9G     0  1.9G   0% /sys/fs/cgroup
/dev/sda5        59G  4.0G   55G   7% /usr
/dev/sda3        59G   51G  7.8G  87% /home
/dev/sda1       9.8G  108M  9.7G   2% /boot
/dev/sda2       196G   74G  122G  38% /var

You can use this space. You have to check in root which files/folder wants more space you can make it Hard Link and redirect on /var folder.

Thank You
Nimit Gajjar
Regards
Nimit Gajjar

tell      : +91 8734851688

e-mail : nimit....@gmail.com
Skype : nimit.gajjar

Vishwash Chandra

unread,
Oct 5, 2016, 8:47:10 AM10/5/16
to vg...@googlegroups.com
but how ???

Panchal..Chetan

unread,
Dec 11, 2016, 3:21:16 AM12/11/16
to vglug
Run below command
#lsof |grep -i deleted 
Find the deleted file's representation and and kill the process.
#cd /var 
#du -shx * |sort -rh |head -10 (showing top 10 dir which is taking more space) 
Thanks and regards,

Chetan Panchal
P Please don't print this e-mail unless you really need to.

ElectroMech

unread,
Dec 15, 2016, 12:03:33 AM12/15/16
to vglug
Hi,

/dev/sda2       196G   74G  122G  38% /var

You can use this space. You have to check in root which files/folder wants more space you can make it Hard Link and redirect on /var folder.

Hard link can not be created across the file system. I hope it should be soft link.

Please check what are the folders occupying more space in root file system with 

du -sh /* --exclude=PATTERN 

(add all mounting points are PATTERN so it want be listed)

Then create on directory in /usr/exampledir

rsync all the data from /exampledir to /usr/exampledir

Rename you existing directory in root fs /exampledir /exampledir1

create soft link in / (root filesystem) as below

ln -s /usr/exampledir /exampledir

That is done :)



--
--
Nilesh Vaghela
(RHCSA RHCE)
ElectroMech Corporation | Skyiwave Pvt. Ltd.
Redhat Channel Partner and Training Partner
Amazon aws consulting Partner
302, New York Plaza, Opp Judges Bunglow, Bodakdev, Ahmedabad
22, 1st Floor, Vardhaman Complex, Subhanpura , Baroda.
www.electromech.info
Reply all
Reply to author
Forward
0 new messages