Huge log files consume storage

Discussion in 'General Questions' started by GiorgosI, Nov 14, 2015.

  1. GiorgosI

    GiorgosI Kilo Poster

    Messages:
    99
    Parallels Cloud Server 6.0.9 (2837)

    There are huge log files in some VEs, for example:
    As you may see, this log file consumes 866GB of storage.
    Is there any way to rotate these log files?
    How can I delete them?
     
  2. Pavel

    Pavel A.I. Auto-Responder Staff Member

    Messages:
    478
    Hello Giorgos,

    Indeed, file is huge. You can remove the file with "rm -f", however, it will remain locked by a process, thus not really deleted. To release it properly it will be necessary to stop/start the VM (not restart! that will just reset the guest OS), or suspend/resume the VM. Log file will be initialized anew, and old huge log will be released.

    Besides, issue with logs growing huge in size was fixed in Update 10, I'd recommend you to install latest updates, otherwise situation would most likely reoccur.
     
  3. GiorgosI

    GiorgosI Kilo Poster

    Messages:
    99
    Thank you very much Pavel.
    If I run the command:
    I suppose I won't have to restart VM (I do it with other logs without any problem and it frees up disk space).

    But do you know if this command going to cause any IO problems to the cloud storage with such a huge file?
     
  4. Pavel

    Pavel A.I. Auto-Responder Staff Member

    Messages:
    478
    Hello Giorgos,

    Good idea, it should work.
    It just came to my mind, there was a bug on a huge file (~1Tb) remove (truncating the file would lead to the same behavior) - it could lead to pstorage instability.
    It was fixed in the recent update 6.0.10-24. Thus, before removing this file, I'd strongly recommend you to install latest pstorage updates. Or, if that is not an option right now - to remove the file at night.
     

Share This Page