Pages

Tuesday, January 21, 2020

QNAP NAS - Error FW003 when trying to update firmware

Have you received error FW003 when trying to update the firmware of your QNAP Network Attached Storage (NAS)?
You have found the right page!
 
If you encounter error FW003 when trying to update the firmware of your QNAP NAS, it means that the system disk partition (which is used by the NAS to actually work and is separated from the actual storage space) does not have enough free space to perform the update operations. For example, if the size of the new version of the firmware is 185 MB and the available space is only 180 MB, you will get this error.
 
The only way to solve is to free enough disk space to perform the update. To do this you will have to connect to the NAS via SSH (using PuTTY on Windows, or a terminal on Linux/MacOS), and start looking for files that can be sacrificed to make room for the update.
 
To achieve this, once connected to the NAS via SSH, you will have to perform the following operations:
 
  1. Confirm you have not enough free space on the system disk by issuing this command:

    [~] # df

    You'll get an output like the following:


    You have to check the column "Mounted on" and find "/mnt/HDA_ROOT". Check if available space is effectively smaller than the firmware update package. If so, go on. If not, contact QNAP support.

  2. Confirm no /mnt/update file or folder and no /tmp/update_process file exist: if they exist, you need to delete them using:

    [~] # rm -rf /mnt/update
    [~] # rm -f /tmp/update_process
     
  3. Repeat step 1. If available space on /mnt/HDA_ROOT is now larger than needed, proceed with the firmware update. If available space on /mnt/HDA_ROOT is still smaller than needed, proceed to Step 4.
     
  4. Now you will have to look for the files that are occupying too much space on your /mnt/HDA_ROOT partition. This is different for every system, so there is not a unique solution. It's basically trial-and-error. Start with:

    [~] # ls -als /mnt/HDA_ROOT/

    To get the list of directories on this partition. Now check every directory using the following command:

    [~] # ls -als /mnt/HDA_ROOT/directoryname

    where directoryname stands for each directory (and their subdirectories) on the partition. My suggestion: start with the .logs and lost+found directories. For example:

    [~] # ls -als /mnt/HDA_ROOT/.logs

    You might get something like this:
    -rw-r--r-- 1 admin administ 184.7M Jan 21 2020 conn.log
    -rw-r--r-- 1 admin administ 345.3M Jan 18 2020 event.log
    As you can see those files have become huge, so you can safely delete them (they are log files, so not needed by the system) using the command:

    [~] # rm -f /mnt/HDA_ROOT/.logs/conn.log
    [~] # rm -f /mnt/HDA_ROOT/.logs/event.log

    As specified above, this is just an example. You will have to find the files that actually occupy too much space ON YOUR SYSTEM.
     
  5. Once deleted these files, and freed up enough space, proceed with the firmware update as usual.

3 comments:

  1. I changed step 4 as follows:

    # du -hs /mnt/HDA_ROOT/*
    ...(du like "disk usage", hs like human readable summary) to see which folder is taking up the space.
    In my scenario it was
    112M /mnt/HDA_ROOT/update_pkg

    My next step was
    # rm -rf /mnt/HDA_ROOT/update_pkg/*
    after doing research, I found if it's safe to remove its content.

    Step 5:
    Success!

    Remarks:
    I used the command above to check the used space during update process:
    /mnt/HDA_ROOT/update is taking up about 180MB during update. /mnt/HDA_ROOT/update_pkg stays empty and will probably grow again when modules in the Web interface are installed/updated.

    ReplyDelete
    Replies
    1. Thank you for sharing this with us. It's a neat solution and easier to apply, although deleting the log files every now and then remains a good practice.

      Delete
    2. This worked!!! many tnx. And Xenowolf indeed...thanks for the addition

      Delete