update froze at 9% and now my NAS542 is beeping. -> How to move NAS "system" to another disk?

Options
deemon
deemon Posts: 9  Freshman Member
First Anniversary Friend Collector First Comment
edited September 2022 in Personal Cloud Storage
2. logged into my NAS542 webUI.
3. went into ControlPanel -> FW Upgrade -> Check Upgrade (last check 2019) -> it found something
4. Upgrade now -> it started -> froze at 9% for like several minutes and then gave me error, that "server connection unexpectedly hung" or something and threw me back to the Control panel.

now situation is this:

0. the physical NAS542 itself is beeping now.

1. when I click on "Check now" it gives me eternal wheel thing. and never goes anywhere.

2. when I click on "Upgrade now" it does ask confirmation (
Please note the device must not be disconnected while the upgrading is running. The Upgrade may take a few minutes. Are you sure you want to upgrade firmware?
) when I click "Yes", I get the wheel thing for a second and see 0% and then it closes the upgrader thing and now I see this:

clicking on "Upgrade now" now second/third/fifth time does the same thing quick wheel and back to this image.


How can I kill and reset the failed/hung upgrade process ? failed download? it thinks it got upgrade but only downloaded partial file? Where can I delete this failed download? and/or where could I download the upgrade file for manual upgrade?



Best Answers

  • Mijzelf
    Mijzelf Posts: 2,639  Guru Member
    First Anniversary 10 Comments Friend Collector First Answer
    Answer ✓
    Options
    The system disk is determined by a symlink on a flash partition. The symlink /i-data/sysvol points to that symlink (/etc/zyxel/sysvol, or something like that. The flash partition is mounted on /etc/zyxel), and that symlink points to /i-data/<some-truncated-volume-UUID>/.
    When the system disk is not found on boot, the symlink in flash is changed to point to another volume, if available. So if you don't have anything special on the system disk, you don't need to do anything.
    AFAIK on the system disk the admin share is located, the package system, and some databases (Twonky, ...)
  • deemon
    deemon Posts: 9  Freshman Member
    First Anniversary Friend Collector First Comment
    edited September 2022 Answer ✓
    Options
    Fixed!
    @Mijzelf Thank you for information

    So system relocate details and commands in order were:

    1. ssh into NAS :
    ssh admin@nas542.local

    2. go into superuser :
    su

    3. go into current sysvol/.system folder :
    cd /etc/zyxel/storage/sysvol/.system/
    /i-data/d2eb3296/.system #

    4. choose the "disk" (8 0-f symbols string) you want to use as new location :
    ls -lah /i-data/

    on my case as example:
    # ls -lah /i-data/
    drwxr-xr-x    5 root     root           0 Sep  8 23:21 .
    drwxr-xr-x   19 root     root           0 Sep  8 23:22 ..
    lrwxrwxrwx    1 root     root          23 Sep  8 23:21 .media -> /i-data/d2eb3296/.media
    lrwxrwxrwx    1 root     root          24 Sep  8 23:21 .system -> /i-data/d2eb3296/.system
    drwxrwxrwx    8 root     root        4.0K Sep  8 23:08 c65dd9d1     <= possible candidate #1
    drwxrwxrwx   12 root     root        4.0K Jun 22  2019 d2eb3296    <= current sysvol (as above links .media and .system point there)
    drwxrwxrwx    7 root     root        4.0K Jun 22  2019 f9b5c33b      <= possible candidate #2
    lrwxrwxrwx    1 root     root          25 Sep  8 23:21 sysvol -> /etc/zyxel/storage/sysvol

    5. copy everything (except name_label file) to the chosen disk .system folder (the folder should already exist). Also the files and folders listed here is what I had. Your system may have somewhat different files there. Anyway my example what I did:
    /i-data/d2eb3296/.system # cp -r zoneinfo /i-data/c65dd9d1/.system/
    /i-data/d2eb3296/.system # cp -r sysvol_5CF4AB67B6FC /i-data/c65dd9d1/.system/
    /i-data/d2eb3296/.system # cp -r songs3.db  /i-data/c65dd9d1/.system/
    /i-data/d2eb3296/.system # cp -r fileye-queue /i-data/c65dd9d1/.system/
    /i-data/d2eb3296/.system # cp -r appletQueue /i-data/c65dd9d1/.system/
    /i-data/d2eb3296/.system # cp -r BackupPlanner.log  /i-data/c65dd9d1/.system/
    /i-data/d2eb3296/.system # cp -r guicfg  /i-data/c65dd9d1/.system/
    /i-data/d2eb3296/.system # cp -r dservice.db   /i-data/c65dd9d1/.system/
    /i-data/d2eb3296/.system # cp -r sch_debug.log* /i-data/c65dd9d1/.system/
    /i-data/d2eb3296/.system # cp -r zy-pkgs /i-data/c65dd9d1/.system/
    /i-data/d2eb3296/.system # cp -r rsyncd.secrets  /i-data/c65dd9d1/.system/
    /i-data/d2eb3296/.system # cp -r zysyncd.log   /i-data/c65dd9d1/.system/
    /i-data/d2eb3296/.system # cp -r stunneld.log   /i-data/c65dd9d1/.system/
    /i-data/d2eb3296/.system # cp -r storage.txt   /i-data/c65dd9d1/.system/
    /i-data/d2eb3296/.system # cp -r zyfw /i-data/c65dd9d1/.system/

    6. change the link "sysvol" in /etc/zyxel/storage to your chosen new disk location (8 symbol hash you chose in step 4.):
    cd /etc/zyxel/storage/
    ln -s -n -f /i-data/<your_8_symbols> sysvol
    ( my example: ln -s -n -f /i-data/c65dd9d1 sysvol )

    7. reboot NAS:
    reboot now

    (
    8. possibly you should/could copy or even move also some other more special stuff from old disk to new (.media, photo, music, video, admin, .PKG folders in old disk root), but I don't know details, as I don't use any (because if I turn any of them on, the file transfer speed plummets to hell, so I chose to not use any plugins or packages or special folders).
    9. Also cleaning up old sysvol disk .system folder, by deleting everything in there except name_label file (but I chose not to as just in case backup).
    )





    ##################################################

    as for fixing the failed/hung/broken FW download action, you need to delete the .tmp file.

    # rm /etc/zyxel/storage/sysvol/.system/zyfw/tmp/*.tmp

    After that I was able to start the upgrade process again correctly.

All Replies

  • deemon
    deemon Posts: 9  Freshman Member
    First Anniversary Friend Collector First Comment
    edited September 2022
    Options
    Status update. Apparently my system volume (the disk where the system files are currently stored) is failing... :-( and the disk kind of went offline, thus the failed update and beeping maybe? After shutting NAS down and restarting it made the disk come back online, but there are serious problems in SMART:

    ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
      1 Raw_Read_Error_Rate     0x002f   200   200   051    Pre-fail  Always       -       12
      5 Reallocated_Sector_Ct   0x0033   195   195   140    Pre-fail  Always       -       169
      7 Seek_Error_Rate         0x002e   200   200   000    Old_age   Always       -       0
      9 Power_On_Hours          0x0032   053   052   000    Old_age   Always       -       34621
     10 Spin_Retry_Count        0x0032   100   100   000    Old_age   Always       -       0
     11 Calibration_Retry_Count 0x0032   100   253   000    Old_age   Always       -       0
     12 Power_Cycle_Count       0x0032   100   100   000    Old_age   Always       -       41
    192 Power-Off_Retract_Count 0x0032   200   200   000    Old_age   Always       -       24
    193 Load_Cycle_Count        0x0032   175   175   000    Old_age   Always       -       76055
    194 Temperature_Celsius     0x0022   119   093   000    Old_age   Always       -       33
    196 Reallocated_Event_Count 0x0032   031   031   000    Old_age   Always       -       169
    197 Current_Pending_Sector  0x0032   200   200   000    Old_age   Always       -       1
    198 Offline_Uncorrectable   0x0030   100   253   000    Old_age   Offline      -       0
    199 UDMA_CRC_Error_Count    0x0032   200   200   000    Old_age   Always       -       0
    200 Multi_Zone_Error_Rate   0x0008   100   253   000    Old_age   Offline      -       0

    how can I migrate the system to another disk?
    (not going to try upgrade before I have migrated the system to another disk).
    System is rather simple. I have 3 separate disks and 3 separate volumes, one per disk. No raids and anything else that may complicate things.
  • ikubuf
    ikubuf Posts: 134  Ally Member
    First Anniversary 10 Comments Friend Collector First Answer
    Options
    If your disk are all using Jbod.

    You can backup your data directly and then download the firmware here
    https://www.zyxel.com/support/Zyxel-security-advisory-for-format-string-vulnerability-in-NAS.shtml

  • deemon
    deemon Posts: 9  Freshman Member
    First Anniversary Friend Collector First Comment
    edited September 2022
    Options
    ikubuf said:
    If your disk are all using Jbod.
    Not using "jbod", but all my disks are separate entities.
    Thank you for firmware direct download links! :-)

    But the question remains, how can I tell NAS542 to move "system" role from disk4(/dev/sdc) (failing) to disk2 or disk3? or from /dev/sdc to /dev/sda.

    /etc/zyxel/storage # l
    lrwxrwxrwx    1 root     root          16 Jan  1  2017 sysvol -> /i-data/d2eb3296
    -rw-r--r--    1 root     root           6 Jun 16  2017 pwron.int
    -rw-rw-rw-    1 root     root           0 Jun 22  2019 enable_nfs.flag
    drwxr-xr-x    2 root     root         368 Jun 22  2019 .
    drwxrwxrwx   13 root     root        3.2K Sep  7 21:07 ..

    /i-data # ls
    drwxr-xr-x   19 root     root           0 Jan  1  1970 ..
    drwxrwxrwx    8 root     root        4.0K Jun 22  2019 c65dd9d1
    drwxrwxrwx   12 root     root        4.0K Jun 22  2019 d2eb3296
    drwxrwxrwx    7 root     root        4.0K Jun 22  2019 f9b5c33b
    lrwxrwxrwx    1 root     root          25 Sep  7 21:06 sysvol -> /etc/zyxel/storage/sysvol
    lrwxrwxrwx    1 root     root          24 Sep  7 21:06 .system -> /i-data/d2eb3296/.system
    lrwxrwxrwx    1 root     root          23 Sep  7 21:06 .media -> /i-data/d2eb3296/.media
    drwxr-xr-x    5 root     root           0 Sep  7 21:06 .


    Theoretically I think it could be done via:
    1. copy all the "system files" (entire ".system" folder on sysvol root, except maybe the name_label file there) to another/new disk same place.
    2. link the sysvol symbolic links in different places (/i-data/.system; /etc/zyxel/storage/sysvol; maybe other places more?) and maybe other links to the new disk.
    3. alter some more variables somewhere?
    4. reboot?

    BUT I don't want to play around with it without knowing first every step I must make. Because when I browse around in the box in ssh, I see a lot of links all over the place. Not quite comfortable changing all the links manually to another disk and expect everything to "just work"... especially if maybe there is a better (command? some config variable somewhere?) way to tell NAS that now use different disk as "sysvol" and it does all the linking itself automatically to the new disk? Maybe even move the system files necessary by itself to another disk?







  • Mijzelf
    Mijzelf Posts: 2,639  Guru Member
    First Anniversary 10 Comments Friend Collector First Answer
    Answer ✓
    Options
    The system disk is determined by a symlink on a flash partition. The symlink /i-data/sysvol points to that symlink (/etc/zyxel/sysvol, or something like that. The flash partition is mounted on /etc/zyxel), and that symlink points to /i-data/<some-truncated-volume-UUID>/.
    When the system disk is not found on boot, the symlink in flash is changed to point to another volume, if available. So if you don't have anything special on the system disk, you don't need to do anything.
    AFAIK on the system disk the admin share is located, the package system, and some databases (Twonky, ...)
  • deemon
    deemon Posts: 9  Freshman Member
    First Anniversary Friend Collector First Comment
    edited September 2022
    Options
    Mijzelf said:
    The system disk is determined by a symlink on a flash partition. The symlink /i-data/sysvol points to that symlink (/etc/zyxel/sysvol, or something like that. The flash partition is mounted on /etc/zyxel), and that symlink points to /i-data/<some-truncated-volume-UUID>/.

    /etc/zyxel/storage # ls -lah
    lrwxrwxrwx    1 root     root          16 Jan  1  2017 sysvol -> /i-data/d2eb3296
    -rw-r--r--    1 root     root           6 Jun 16  2017 pwron.int
    -rw-rw-rw-    1 root     root           0 Jun 22  2019 enable_nfs.flag
    drwxr-xr-x    2 root     root         368 Jun 22  2019 .
    drwxrwxrwx   13 root     root        3.2K Sep  7 21:07 ..


    So, are you saying that after copying all the files from "sysvol/.system" to "<another disk>/.system" and just changing the 1 link at /etc/zyxel/storage/sysvol to another location ... it should be swapped to another disk? Should be rather easy...

    Mijzelf said:
    When the system disk is not found on boot, the symlink in flash is changed to point to another volume, if available. So if you don't have anything special on the system disk, you don't need to do anything.
    What do you mean? Like if I remove the previous disk with sysvol entirely from NAS (and or it critically fails, thus becomes unreadable / disappears), it will be OK? How so? On the sysvol there is this actual firmware that is used on boot or not (ras.bin)? Or have I misunderstood this?


    /i-data/d2eb3296/.system # ls -lah
    -rw-r--r--    1 root     nobody         8 Aug  5  2016 name_label       <== here is volume name eg. 'Volume2'
    drwxr-xr-x   18 root     root        4.0K Oct 26  2016 zoneinfo
    -rw-rw-rw-    1 root     root           0 Jan  1  2017 sysvol_5CF4AB67B6FC     <== what is this file?
    -rw-r--r--    1 nobody   nobody     11.0K Jan  1  2017 songs3.db
    drwxrwxrwx    2 root     root        4.0K Jan  1  2017 fileye-queue
    drwxrwxrwx    7 root     root        4.0K Jan  1  2017 appletQueue
    -rw-r--r--    1 root     root         254 Jan  1  2017 BackupPlanner.log
    drwxrwxrwx    4 root     root        4.0K Jan  2  2017 guicfg
    -rw-r--r--    1 root     root        3.0K Jan  2  2017 dservice.db
    -rw-r--r--    1 root     root        5.0M May 30  2017 sch_debug.log.bak
    drwxrwxrwx   12 root     root        4.0K Jun 22  2019 ..
    drwxrwxrwx    6 1013     1000        4.0K Aug 16 07:28 zy-pkgs
    drwxrwxrwx    3 root     root        4.0K Sep  7 15:05 zyfw          <== here is ras.bin
    -rw-r--r--    1 root     root        5.3K Sep  7 21:07 zysyncd.log
    -rw-r-----    1 root     root       39.2K Sep  7 21:07 stunneld.log
    -rw-rw-rw-    1 root     root        4.1M Sep  8 09:09 storage.txt
    drwxrwxrwx    8 1013     1000        4.0K Sep  8 09:09 .
    -rw-r--r--    1 root     root        4.6M Sep  8 09:09 sch_debug.log
    -rw-------    1 root     root          23 Sep  8 12:38 rsyncd.secrets

    /i-data/d2eb3296/.system # ls -lah zyfw/
    -rwxrwxrwx    1 root     root       57.2M Jun 22  2019 ras.bin       <== isn't this file necessary for boot?
    -rw-r--r--    1 root     root         192 Aug 15 09:26 zyfw_info
    -rw-rw-rw-    1 root     root           0 Sep  7 15:05 zyfw_last_update
    drwxrwxrwx    3 root     root        4.0K Sep  7 15:05 .
    drwxrwxrwx    2 root     root        4.0K Sep  7 15:05 tmp
    drwxrwxrwx    8 1013     1000        4.0K Sep  8 09:09 ..
    -rw-rw-rw-    1 root     root      211.8K Sep  8 12:39 zyfw_debug.log

    Mijzelf said:
    AFAIK on the system disk the admin share is located, the package system, and some databases (Twonky, ...)

    And the actual FW? Os is this ras.bin not used on boot? What happens when it doesn't find it?



    MEANWHILE I think I actually found also the first post failed download file that causes confusion and doesn't let me try to redownload the update from webUI:

    /i-data/d2eb3296/.system/zyfw/tmp # l
    drwxrwxrwx    3 root     root        4.0K Sep  7 15:05 ..
    drwxrwxrwx    2 root     root        4.0K Sep  7 15:05 .
    -rw-rw-rw-    1 root     root       25.9M Sep  7 15:06 521ABAG9C0.bin.tmp

    so probably just deleting it would fix this update failing problem also... and while doing exactly that the command ran like 2 minutes to delete 1 file. It feels it landed exactly on the bad-sector on the disk, as after deleting the file in smart some numbers went instantly up from previous.

    BEFORE rm 521ABAG9C0.bin.tmp

    Vendor Specific SMART Attributes with Thresholds:
    ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
      1 Raw_Read_Error_Rate     0x002f   200   200   051    Pre-fail  Always       -       12
      3 Spin_Up_Time            0x0027   222   186   021    Pre-fail  Always       -       7883
      4 Start_Stop_Count        0x0032   094   094   000    Old_age   Always       -       6629
      5 Reallocated_Sector_Ct   0x0033   195   195   140    Pre-fail  Always       -       169
      7 Seek_Error_Rate         0x002e   200   200   000    Old_age   Always       -       0
      9 Power_On_Hours          0x0032   053   052   000    Old_age   Always       -       34637
     10 Spin_Retry_Count        0x0032   100   100   000    Old_age   Always       -       0
     11 Calibration_Retry_Count 0x0032   100   253   000    Old_age   Always       -       0
     12 Power_Cycle_Count       0x0032   100   100   000    Old_age   Always       -       41
    192 Power-Off_Retract_Count 0x0032   200   200   000    Old_age   Always       -       24
    193 Load_Cycle_Count        0x0032   175   175   000    Old_age   Always       -       76059
    194 Temperature_Celsius     0x0022   109   093   000    Old_age   Always       -       43
    196 Reallocated_Event_Count 0x0032   031   031   000    Old_age   Always       -       169
    197 Current_Pending_Sector  0x0032   200   200   000    Old_age   Always       -       1
    198 Offline_Uncorrectable   0x0030   100   253   000    Old_age   Offline      -       0
    199 UDMA_CRC_Error_Count    0x0032   200   200   000    Old_age   Always       -       0
    200 Multi_Zone_Error_Rate   0x0008   100   253   000    Old_age   Offline      -       0

    and after:

      1 Raw_Read_Error_Rate     0x002f   200   200   051    Pre-fail  Always       -       24
    197 Current_Pending_Sector  0x0032   200   200   000    Old_age   Always       -       3




  • deemon
    deemon Posts: 9  Freshman Member
    First Anniversary Friend Collector First Comment
    edited September 2022 Answer ✓
    Options
    Fixed!
    @Mijzelf Thank you for information

    So system relocate details and commands in order were:

    1. ssh into NAS :
    ssh admin@nas542.local

    2. go into superuser :
    su

    3. go into current sysvol/.system folder :
    cd /etc/zyxel/storage/sysvol/.system/
    /i-data/d2eb3296/.system #

    4. choose the "disk" (8 0-f symbols string) you want to use as new location :
    ls -lah /i-data/

    on my case as example:
    # ls -lah /i-data/
    drwxr-xr-x    5 root     root           0 Sep  8 23:21 .
    drwxr-xr-x   19 root     root           0 Sep  8 23:22 ..
    lrwxrwxrwx    1 root     root          23 Sep  8 23:21 .media -> /i-data/d2eb3296/.media
    lrwxrwxrwx    1 root     root          24 Sep  8 23:21 .system -> /i-data/d2eb3296/.system
    drwxrwxrwx    8 root     root        4.0K Sep  8 23:08 c65dd9d1     <= possible candidate #1
    drwxrwxrwx   12 root     root        4.0K Jun 22  2019 d2eb3296    <= current sysvol (as above links .media and .system point there)
    drwxrwxrwx    7 root     root        4.0K Jun 22  2019 f9b5c33b      <= possible candidate #2
    lrwxrwxrwx    1 root     root          25 Sep  8 23:21 sysvol -> /etc/zyxel/storage/sysvol

    5. copy everything (except name_label file) to the chosen disk .system folder (the folder should already exist). Also the files and folders listed here is what I had. Your system may have somewhat different files there. Anyway my example what I did:
    /i-data/d2eb3296/.system # cp -r zoneinfo /i-data/c65dd9d1/.system/
    /i-data/d2eb3296/.system # cp -r sysvol_5CF4AB67B6FC /i-data/c65dd9d1/.system/
    /i-data/d2eb3296/.system # cp -r songs3.db  /i-data/c65dd9d1/.system/
    /i-data/d2eb3296/.system # cp -r fileye-queue /i-data/c65dd9d1/.system/
    /i-data/d2eb3296/.system # cp -r appletQueue /i-data/c65dd9d1/.system/
    /i-data/d2eb3296/.system # cp -r BackupPlanner.log  /i-data/c65dd9d1/.system/
    /i-data/d2eb3296/.system # cp -r guicfg  /i-data/c65dd9d1/.system/
    /i-data/d2eb3296/.system # cp -r dservice.db   /i-data/c65dd9d1/.system/
    /i-data/d2eb3296/.system # cp -r sch_debug.log* /i-data/c65dd9d1/.system/
    /i-data/d2eb3296/.system # cp -r zy-pkgs /i-data/c65dd9d1/.system/
    /i-data/d2eb3296/.system # cp -r rsyncd.secrets  /i-data/c65dd9d1/.system/
    /i-data/d2eb3296/.system # cp -r zysyncd.log   /i-data/c65dd9d1/.system/
    /i-data/d2eb3296/.system # cp -r stunneld.log   /i-data/c65dd9d1/.system/
    /i-data/d2eb3296/.system # cp -r storage.txt   /i-data/c65dd9d1/.system/
    /i-data/d2eb3296/.system # cp -r zyfw /i-data/c65dd9d1/.system/

    6. change the link "sysvol" in /etc/zyxel/storage to your chosen new disk location (8 symbol hash you chose in step 4.):
    cd /etc/zyxel/storage/
    ln -s -n -f /i-data/<your_8_symbols> sysvol
    ( my example: ln -s -n -f /i-data/c65dd9d1 sysvol )

    7. reboot NAS:
    reboot now

    (
    8. possibly you should/could copy or even move also some other more special stuff from old disk to new (.media, photo, music, video, admin, .PKG folders in old disk root), but I don't know details, as I don't use any (because if I turn any of them on, the file transfer speed plummets to hell, so I chose to not use any plugins or packages or special folders).
    9. Also cleaning up old sysvol disk .system folder, by deleting everything in there except name_label file (but I chose not to as just in case backup).
    )





    ##################################################

    as for fixing the failed/hung/broken FW download action, you need to delete the .tmp file.

    # rm /etc/zyxel/storage/sysvol/.system/zyfw/tmp/*.tmp

    After that I was able to start the upgrade process again correctly.
  • Mijzelf
    Mijzelf Posts: 2,639  Guru Member
    First Anniversary 10 Comments Friend Collector First Answer
    Options
    What do you mean? Like if I remove the previous disk with sysvol entirely from NAS (and or it critically fails, thus becomes unreadable / disappears), it will be OK? How so? On the sysvol there is this actual firmware that is used on boot or not (ras.bin)? Or have I misunderstood this?

    The name sysvol is a bit misleading here. (And it was never meant to be read by customers, I think).

    The disks are partitioned in 3 partitions. The 3th is user data, the 1st and 2nd are two raid1 arrays spanning over all disks. The first one contains the firmware, the second swap (or maybe the other way around, can say without looking). So when one disk fails, nothing happens to the firmware/swap.

    If all disks fail, there is a compressed version of the firmware in flash, which is extracted to a ramdisk on boot. This way the box can run without disks.
    As said, sysvol only contains user stuff, which is handled by the system. That ras.bin file is a left-over of the last firmware upgrade. Don't know why it is not deleted after upgrading. Perhaps just laziness.

Consumer Product Help Center