Hello,
please check attached image, I have a dedicated server managed by Plesk and one of its partions is full, how it’s possible to clean it up ? from plesk or SSH…
Thanks in advance for your help.
Hello,
please check attached image, I have a dedicated server managed by Plesk and one of its partions is full, how it’s possible to clean it up ? from plesk or SSH…
Thanks in advance for your help.
do you want to wipe it or move?
can you explain more please ?
the problem that there is no more empty space on /dev/sda5 as you can see in the attached image, so I don’t know what is the best solution to give this partition od hard disck more espace ?? maybe by moving some files or deleting ? any advice ?
You should find out - what files consume that space: chances are that these are temporary files, that got accumulated over time and were not deleted. Or that they are logfiles, that you can copy offsite and so clear up space. Also you have plenty of space on /dev/sda6 maybe you can move part of files to whereever that disk is mounted (you can find out by running command “mount” from ssh session) and then create symlink pointing to that place.
Thanks Aleksejs, when I typed “mount” I got the following:
/dev/sda1 on / type ext3 (rw,usrquota)
none on /proc type proc (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
/dev/sda5 on /usr type xfs (rw)
/dev/sda6 on /var type xfs (rw,usrquota)
none on /tmp type tmpfs (rw,size=1g)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
but i don’t know how to clean or move from partition to other by SSH
deleting files:
rm filename
or
rm -r dirname
moving:
mv /path/to/source/file /path/to/destination/
creating a symbloic link (a shortcut):
ln -s /where/should/the/link/point /how/should/the/link/be/called
So… let us pretend, that you found out, that the directory /usr/bbparis/temp contains only old temporary files that are not needed. Then you would do:
rm -r /usr/bbparis/temp/* !!!BE VERY CAREFUL WITH THIS
If you have a lot of pictures that you need to move from one disk to another, say /usr/bbparis/pictures/ then, first move this directory to other disk:
mkdir /var/bbparis
mv /usr/bbparis/pictures /var/bbparis/
then create symlink
ln -s /var/bbparis/pictures /usr/bbparis/pictures
IF NOT SURE - THEN BETTER NOT DO ANYTHING, THOUGH
Read manual pages carefully beforehand:
man mv
man ln
man rm
man mkdir
Thanks Aleksejs,
My problem not with the commands of SSH, but with folder /dev/sda5 because I can’t access to it, so for example I write :
cd /dev/sda5 and this line give me an error
cd /dev I can access to /div but than I’m not able to access to sda5
so I’m now able to access sda5 to be able to check if it’s including big files to move or delete them…also when I’m inside /dev and I write the command
ls
I got a lot of names like
ptycd
ptycc
so there is no way toi clean sda5 ?
You can not access /dev/sda5 - that is device name for disk partition. You do not do anything in /dev directory!
According to what you listed when you run “mount” this disk is mounted to:
/dev/sda5 on /usr type xfs (rw)
/dev/sda6 on /var type xfs (rw,usrquota)
/usr/
That is how unix filesystem works:
you have physical disk. In your case it is called /dev/sda, that has three partitions:
/dev/sda1
/dev/sda5
/dev/sda6
Now /dev/sda1 is mounted as root partition / except directories /usr (which is located on /dev/sda5 and hence this partition is mounted there) and /var (which correspondingly is /dev/sda6).
So /you need to find unnecessary files in /usr directory. I suggest you run:
du -sk /usr/*
it will show you summary of what directories/files consume how much space (in kilobytes).
I run it and I got the following:
63608 /usr/bin
0 /usr/etc
0 /usr/games
4264 /usr/include
48 /usr/kerberos
196048 /usr/lib
138908 /usr/lib64
10840 /usr/libexec
9022736 /usr/local
15812 /usr/sbin
264404 /usr/share
0 /usr/src
0 /usr/tmp
I’m trying to check what can I move or delete in "local " folder
now run the same for /usr/local
du -sk /usr/local/*
and so on - until you find “who ate all my memory” (~;
oky my teacher, I’m following your advices, and I appreciate your help
Hello again, I removed 3 BIG files from here
/usr/local/psa/PMM/tmp
so there is a command to Refresh my server info ?
wooow I did, I logout from my Plesk and login again, and this is the result:
7.2 GB free of 9.3 GB on /usr/
in fact, Plesk installed on this partition, and I removed 3 TMP files and everything ok now, thanks a lot for all who tried to help me, and BIIIIIIIG thanks to
Aleksejs
really I appreciate your help and your teaching way.
I am glad I could help. May there be no problems with your servers in future! (~;