Forum Discussion

rg-f5's avatar
rg-f5
Icon for Nimbostratus rankNimbostratus
Apr 19, 2024

F5 terminal - help to run commands - disk space full

Hello, I am learning F5 and I have searched through many of posts.

I really need to under how the f5 works. 

 

When i load up my f5 in cli - i see this 

(cfg-sync In Sync) (Active) (/Common) (tmos)#

 

I want to run this command df -h

it is always an invalid argument. 

I have an error and I need to clean up disk space, systemd-journald[438] Failed to create new user journal: No space left on device

I would like to free up disk space to get the f5 in working order again, any help on this and commands will be a great help. 

 

Thank you

 

 

6 Replies

  • Hi rg-F5,

    Can you check about UCS file on BIG-IP Device?, maybe you clear it for reduce disk space

  • rg-f5's avatar
    rg-f5
    Icon for Nimbostratus rankNimbostratus

    TeeraratI've checked no ucs stored. 

    (cfg-sync In Sync) (Active) (/Common) (tmos)# how do i get to the right directory or clean up disk space please?

    Images have been cleaned out as well.

  • If you're seeing the prompt you've quoted then you are currently in tmsh, rather than bash, which is why your 'df' command isn't working! Easy mistake to make if you are unfamiliar with BIG-IP architecture :)

    root@(perm-vm16)(cfg-sync Standalone)(Active)(/Common)(tmos)# df -h
    Syntax Error: unexpected argument "df"
    root@(perm-vm16)(cfg-sync Standalone)(Active)(/Common)(tmos)# bash
    [root@perm-vm16:Active:Standalone] config # df -h
    Filesystem                             Size  Used Avail Use% Mounted on

     

    Assuming your user account has been granted a sufficiently privileged role, simply running 'bash' in the tmsh shell will drop you to a root privilege bash shell, however if you are a lower privileged user (say, Operator role) you might simply receive an error; in this case you'll need a more privileged account:

    op-test@(perm-vm16)(cfg-sync Standalone)(Active)(/Common)(tmos)# bash
    Syntax Error: "bash" unexpected argument

     

    • rg-f5's avatar
      rg-f5
      Icon for Nimbostratus rankNimbostratus

      hi yes i've just figured out how to use bash

       

      now i want to delete log file contents, ideally var log and free up some space, can you help AaronJB please?

      i prefer to use bash but i do not want to disrupt any services

      • AaronJB's avatar
        AaronJB
        Icon for SIRT rankSIRT

        You can pretty safely delete anything in /var/log with a numerical extension like .1 or .2.gz as those are old rotated-out logfiles - if you need to delete any logs which are currently being written to then the best thing is to delete the historical logs and then force log rotation to happen (some help possibly here: https://my.f5.com/manage/s/article/K13367 )

         

        Also have a good look in the following locations for suspiciously large files - I've seen people accidentally record huge pcaps there on more than one occasion:

        /config
        /root

        Also this directory usually holds software images - they can be large and consume a lot of space on small systems:
        /shared/images

         

        Searching the entire filesystem for the largest files can also sometimes net good rewards, but it's a slow process:

        du -a / | sort -n -r | head -n 20


        HTH!

  • rg-f5's avatar
    rg-f5
    Icon for Nimbostratus rankNimbostratus

    AaronJBthank you, i've just done this when logging in to the cli 

    bash 

    cd /var/log

    ls

    df -h

    /dev/mapper/vg--db--vda-dat.log 2.9G 2.9G 0 100% /var/log

    /dev/mapper/vg--db--vda-dat.share 15G 5.4G 8.5G 39%

     

    i'm not seeing any.1 or .2gz files?

    I have alot of other files as well. 

    How can I delete or free up space from the ones listed above please?

    I am new to F5 just picking it up now.

     

    I also just did ls -al /var/log and i still cannot see  .1 or .2.gz files out of the big list output displayed.

     

    i can see messages.1.gz and this has 0 in size.

    messages has 307000