Resize / var directory on Linux without Gparted

0

The resizing of the / var directory was achieved with the Gparted live CD due to the urgency I had in executing the process, however, while waiting for the Gparted .iso it occurred to me to try to resize the partition "live". To complete this task I read that I had to disassemble first / var.

It happens that I tried to disassemble / var but the system threw me a message that said (words more, words less) that there was a running process in / var and when it was busy the dismantling could not be performed.

I was in charge of researching and I did not find a concrete and convincing explanation of why / var can not be dismounted from the same operating system in which it is currently running, so I decided to try it.

I rebooted the machine (so as not to have any additional process that would prevent me from executing the process) and forcibly disassembled / var through the terminal. The machine in response to my action generated a "blink" visible on the monitor, I clarify that it was not rebooted because when the screen turned on again it did not boot but asked for a username and password as if it were returning from a state of suspension or hibernation.

  

Then I had doubts about everything mentioned above. These doubts are:

     

1) Is it possible to resize "live" or "hot" / var?

     

2) Why did my machine "blink" when disassembling / var forcibly?

     

3) Which processes do you manage are important enough so that   try to disassemble / var the system I threw the message that I mentioned   previously?

     

4) Why being so important at the programming level (among other things) the folder / var the system (Debian for example) in its installation process to perform a "guided" partitioning provides a space so infimo in comparison to the entire disk? Is there a special reason for this?

Observation: I know that / var is a reference for certain services associated with web development (Apache, docker, among others) but I do not think they are the ones that generate this problem since there is no "resistance" of the system when stopping these services per terminal.

Observation 2: I have read many forums and technology sites but they do not explain for sure a convincing reason for each of the doubts raised and I am one of those who likes to understand as best as possible each process, tool, etc.

I thank you in advance for all the help provided.

    
asked by Huskie 23.05.2018 в 02:33
source

1 answer

1

The lsof command can help you, you put the mount point and it tells you the processes that are with open files.

Here is an example of how to use it:

[root@sa08 ~]# lsof /bbdds1b/datos 

COMMAND   PID     USER   FD   TYPE DEVICE SIZE/OFF      NODE NAME mysqld  15393 mtsasr1b  cwd    DIR 253,26     4096        67 /bbdds1b/datos/databases mysqld  15393 mtsasr1b    3uW  REG 253,26 79691776        68 /bbdds1b/datos/databases/ibdata1 mysqld  15393 mtsasr1b    8uW  REG 253,26 50331648        69 /bbdds1b/datos/databases/ib_logfile0
    
answered by 21.06.2018 / 11:12
source