Cannot update to 18.3. cannot unmount sda1

Re: Cannot update to 18.3. cannot unmount sda1

Postby Jocko » Wed Feb 28, 2024 1:20 pm

Thank
Can you post the file rcS.sda7 you have now in the share fvdw.

So the content of lacie-boot on sda7 is ok. And it seems the root boot script failed to bind it on the chrooted partition (sda1)

Other output
Code: Select all
ps auxf
To check if there is an orphan sh threat
Jocko
Site Admin - expert
 
Posts: 11367
Joined: Tue Apr 12, 2011 4:48 pm
Location: Orleans, France

Re: Cannot update to 18.3. cannot unmount sda1

Postby mdi » Thu Feb 29, 2024 8:19 am

Sure. ps auxf is as follows, while I uploaded rcS.sda7:

Code: Select all
root@NAS:/share/1000/fvdw # ps auxf
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root         2  0.0  0.0      0     0 ?        S    Feb28   0:00 [kthreadd]
root         4  0.0  0.0      0     0 ?        I<   Feb28   0:00  \_ [kworker/0:0H]
root         6  0.0  0.0      0     0 ?        I<   Feb28   0:00  \_ [mm_percpu_wq]
root         7  0.0  0.0      0     0 ?        S    Feb28   0:18  \_ [ksoftirqd/0]
root         8  0.0  0.0      0     0 ?        I    Feb28   0:19  \_ [rcu_preempt]
root         9  0.0  0.0      0     0 ?        I    Feb28   0:00  \_ [rcu_sched]
root        10  0.0  0.0      0     0 ?        I    Feb28   0:00  \_ [rcu_bh]
root        11  0.0  0.0      0     0 ?        I<   Feb28   0:00  \_ [netns]
root        12  0.0  0.0      0     0 ?        I    Feb28   0:30  \_ [kworker/u2:1]
root       279  0.0  0.0      0     0 ?        S    Feb28   0:00  \_ [oom_reaper]
root       280  0.0  0.0      0     0 ?        I<   Feb28   0:00  \_ [writeback]
root       282  0.0  0.0      0     0 ?        I<   Feb28   0:00  \_ [crypto]
root       283  0.0  0.0      0     0 ?        I<   Feb28   0:00  \_ [kintegrityd]
root       285  0.0  0.0      0     0 ?        I<   Feb28   0:00  \_ [kblockd]
root       291  0.0  0.0      0     0 ?        I<   Feb28   0:00  \_ [ata_sff]
root       309  0.0  0.0      0     0 ?        I<   Feb28   0:00  \_ [md]
root       401  0.0  0.0      0     0 ?        I<   Feb28   0:00  \_ [rpciod]
root       402  0.0  0.0      0     0 ?        I<   Feb28   0:00  \_ [xprtiod]
root       403  0.0  0.0      0     0 ?        S    Feb28   0:08  \_ [kswapd0]
root       415  0.0  0.0      0     0 ?        I<   Feb28   0:00  \_ [nfsiod]
root       416  0.0  0.0      0     0 ?        I<   Feb28   0:00  \_ [cifsiod]
root       417  0.0  0.0      0     0 ?        I<   Feb28   0:00  \_ [cifsoplockd]
root       418  0.0  0.0      0     0 ?        S    Feb28   0:00  \_ [jfsIO]
root       422  0.0  0.0      0     0 ?        S    Feb28   0:00  \_ [jfsCommit]
root       423  0.0  0.0      0     0 ?        S    Feb28   0:00  \_ [jfsSync]
root       424  0.0  0.0      0     0 ?        I<   Feb28   0:00  \_ [xfsalloc]
root       425  0.0  0.0      0     0 ?        I<   Feb28   0:00  \_ [xfs_mru_cache]
root       568  0.0  0.0      0     0 ?        S    Feb28   0:00  \_ [scsi_eh_0]
root       569  0.0  0.0      0     0 ?        I<   Feb28   0:00  \_ [scsi_tmf_0]
root       572  0.0  0.0      0     0 ?        S    Feb28   0:00  \_ [scsi_eh_1]
root       573  0.0  0.0      0     0 ?        I<   Feb28   0:00  \_ [scsi_tmf_1]
root       577  0.0  0.0      0     0 ?        I<   Feb28   0:00  \_ [smflush]
root       578  0.0  0.0      0     0 ?        S    Feb28   0:00  \_ [spi0]
root       579  0.0  0.0      0     0 ?        I    Feb28   0:00  \_ [kworker/u2:3]
root       670  0.0  0.0      0     0 ?        S<   Feb28   0:00  \_ [aoe_tx0]
root       671  0.0  0.0      0     0 ?        S<   Feb28   0:00  \_ [aoe_ktio0]
root       694  0.0  0.0      0     0 ?        I<   Feb28   0:00  \_ [raid5wq]
root       697  0.0  0.0      0     0 ?        I<   Feb28   0:00  \_ [dm_bufio_cache]
root       698  0.0  0.0      0     0 ?        I<   Feb28   0:00  \_ [kmpathd]
root       699  0.0  0.0      0     0 ?        I<   Feb28   0:00  \_ [kmpath_handlerd]
root       716  0.0  0.0      0     0 ?        I<   Feb28   0:00  \_ [ipv6_addrconf]
root       719  0.0  0.0      0     0 ?        I<   Feb28   0:00  \_ [dsa_ordered]
root       730  0.0  0.0      0     0 ?        I<   Feb28   0:01  \_ [kworker/0:1H]
root       731  0.0  0.0      0     0 ?        S    Feb28   0:00  \_ [jbd2/sda7-8]
root       732  0.0  0.0      0     0 ?        I<   Feb28   0:00  \_ [ext4-rsv-conver]
root       751  0.0  0.0      0     0 ?        S    Feb28   0:00  \_ [jbd2/sda1-8]
root       752  0.0  0.0      0     0 ?        I<   Feb28   0:00  \_ [ext4-rsv-conver]
root       785  0.0  0.0      0     0 ?        I<   Feb28   0:00  \_ [iscsi_eh]
root       808  0.0  0.0      0     0 ?        S    Feb28   0:00  \_ [scsi_eh_2]
root       809  0.0  0.0      0     0 ?        I<   Feb28   0:00  \_ [scsi_tmf_2]
root       810  0.0  0.0      0     0 ?        S    Feb28   0:01  \_ [usb-storage]
root       811  0.0  0.0      0     0 ?        S    Feb28   0:00  \_ [jbd2/sda5-8]
root       812  0.0  0.0      0     0 ?        I<   Feb28   0:00  \_ [ext4-rsv-conver]
root      1291  0.0  0.0      0     0 ?        S    Feb28   0:00  \_ [jbd2/sdb1-8]
root      1292  0.0  0.0      0     0 ?        I<   Feb28   0:00  \_ [ext4-rsv-conver]
root      1347  0.0  0.0      0     0 ?        S    Feb28   0:01  \_ [jbd2/sda8-8]
root      1348  0.0  0.0      0     0 ?        I<   Feb28   0:00  \_ [ext4-rsv-conver]
root      1553  0.0  0.0      0     0 ?        S    Feb28   0:04  \_ [cifsd]
root      5662  0.0  0.0      0     0 ?        I    09:06   0:00  \_ [kworker/0:1]
root      5673  0.0  0.0      0     0 ?        I    09:11   0:00  \_ [kworker/0:2]
root      5819  0.0  0.0      0     0 ?        I    09:16   0:00  \_ [kworker/0:0]
root         1  0.0  0.2   3652   652 ?        Ss   Feb28   0:03 init
root       733  0.0  0.0   3652     4 ?        Ss   Feb28   0:00 /bin/sh /etc/init.d/rcS
root       754  0.0  0.6   3652  1548 ?        S    Feb28   0:00  \_ /bin/sh /etc/init.d/rcS sda1
root      1737  0.0  0.6   3652  1540 ?        S    Feb28   0:00      \_ /bin/sh /rw_fs/etc/cronbootscript.sh
root      1744  0.0  0.6   2504  1532 ?        S    Feb28   0:02          \_ /bin/bash /direct-usb/fvdw/cron-boot/fand_ifttt.sh
root      5854  0.0  0.5   3520  1340 ?        S    09:17   0:00              \_ sleep 2m
root       794  0.0  0.1   1548   400 ?        Ss   Feb28   0:00 /usr/sbin/buttonsd
root       975  0.0  0.4   1856  1012 ?        S<s  Feb28   0:00 /sbin/udevd --daemon
root      1412  0.0  2.9  47728  7476 ?        Ss   Feb28   0:04 /usr/bin/httpd -f httpd.conf -d /etc
nobody    1417  0.0  5.2  48640 13224 ?        S    Feb28   0:08  \_ /usr/bin/httpd -f httpd.conf -d /etc
nobody    1426  0.0  5.6  48732 14244 ?        S    Feb28   0:05  \_ /usr/bin/httpd -f httpd.conf -d /etc
root      1420  0.0  0.5   1864  1340 ?        Ss   Feb28   0:08 /usr/sbin/noflushd -n 15 /dev/sda
root      1462  0.0  0.4   1688  1244 ?        Ss   Feb28   0:00 /usr/bin/discoverd
root      1468  0.0  0.5   2176  1484 ?        Ss   Feb28   0:00 /usr/bin/rpcbind
root      1488  0.0  0.5   2228  1432 ?        Ss   Feb28   0:00 dropbear -p 22 -r /rw_fs/etc/dropbear/dropbear_rsa_host_key
root      5795  0.1  0.6   2308  1628 ?        Ss   09:15   0:00  \_ dropbear -p 22 -r /rw_fs/etc/dropbear/dropbear_rsa_host_key
root      5796  0.0  0.8   3656  2004 pts/0    Ss   09:15   0:00      \_ -sh
root      5855  0.0  0.7   4452  1972 pts/0    R+   09:17   0:00          \_ ps auxf
root      1507  0.0  0.4   1680  1180 ?        Ss   Feb28   0:00 /usr/sbin/hostd 7200
root      1530  0.0  0.5   1808  1332 ?        Ss   Feb28   0:00 /usr/sbin/temp-guard 56
nobody    1612  0.0  1.0   8548  2644 ?        SLs  Feb28   0:05 proftpd: (accepting connections)
root      1633  0.0  0.6   3652  1616 ?        Ss   Feb28   0:00 /usr/sbin/crond -c /share/1000/cronjobs -L /share/1000/cronjobs/cron.log
rd        1658  0.4  2.7  44708  6996 ?        SNsl Feb28   5:15 /usr/local/bin/transmission-daemon -g /share/1000/tr-daemon -w /share/1000/public/Download
rd        1685  5.6  6.0  39952 15088 ?        Ssl  Feb28  66:16 /usr/local/sbin/mlnet -run_as_useruid 998
root      1719  0.0  1.6  26732  4056 ?        Ss   Feb28   0:06 /usr/sbin/nmbd -D -l /var/log/samba
root      1721  0.0  2.3  41076  5780 ?        Ss   Feb28   0:00 /usr/sbin/smbd -D -l /var/log/samba
root      1727  0.0  1.5  39636  3956 ?        S    Feb28   0:00  \_ /usr/sbin/smbd -D -l /var/log/samba
root      1728  0.0  1.4  39640  3660 ?        S    Feb28   0:00  \_ /usr/sbin/smbd -D -l /var/log/samba
nobody    1751  0.0  2.5  41880  6340 ?        S    Feb28   0:52  \_ /usr/sbin/smbd -D -l /var/log/samba
root      5564  0.0  5.4  41696 13564 ?        S    08:32   0:00  \_ /usr/sbin/smbd -D -l /var/log/samba
root      1755  0.0  0.5   3940  1392 ?        Ss   Feb28   0:00 /bin/ntpd -p 0.it.pool.ntp.org -p 1.it.pool.ntp.org
root@NAS:/share/1000/fvdw #
You do not have the required permissions to view the files attached to this post.
Last edited by mdi on Thu Feb 29, 2024 8:23 am, edited 1 time in total.
mdi
Donator VIP
Donator VIP
 
Posts: 188
Joined: Tue Oct 11, 2011 1:20 pm

Re: Cannot update to 18.3. cannot unmount sda1

Postby Jocko » Thu Feb 29, 2024 8:40 am

Hi

Ok. I understand your Issue and it is here
Code: Select all
root       733  0.0  0.0   3652     4 ?        Ss   Feb28   0:00 /bin/sh /etc/init.d/rcS
root       754  0.0  0.6   3652  1548 ?        S    Feb28   0:00  \_ /bin/sh /etc/init.d/rcS sda1
root      1737  0.0  0.6   3652  1540 ?        S    Feb28   0:00      \_ /bin/sh /rw_fs/etc/cronbootscript.sh
root      1744  0.0  0.6   2504  1532 ?        S    Feb28   0:02          \_ /bin/bash /direct-usb/fvdw/cron-boot/fand_ifttt.sh
root      5854  0.0  0.5   3520  1340 ?        S    09:17   0:00              \_ sleep 2m
No issue on sda7 but it is your custom cron boot script.
I think your script contains a while loop with an always true test for performing some actions every 2 minutes. So that means the chrooted boot script (sda1) is never completed and then the last commands of the root script which binds lacie-boot on sda1 are not performed...

When you use such a bash script you have to daemonize it. Can you post fand_ifttt.sh so that I make this change.

Currently you can update fw if you create manually the file sda1boot in /lacie-boot
Code: Select all
touch /lacie-boot/sda1boot
disable your cron boot script and try to upgrade the fw.

After rebooting the nas (step3), check if you have now sda2boot in /lacie-boot

Note: In a next patch I go to update the boot script so that the custom scripts are running in its own environment to avoid this issue.
Jocko
Site Admin - expert
 
Posts: 11367
Joined: Tue Apr 12, 2011 4:48 pm
Location: Orleans, France

Re: Cannot update to 18.3. cannot unmount sda1

Postby mdi » Mon Mar 04, 2024 11:46 am

Hi Jocko,
thank you. Yes, that script is used to run a ventilator fan to refresh the NAS when the temperature goes over a certain threshold.

I attach it here (next post)

It was using IFTTT, but since now this service is non-free anymore, I slightly updated it to use my own installation of Home-Assistant, which makes the same thing easy (by defining automations in Home-Assistant itself). I know it's not generic anymore, but if a user can just use 2 different URLs to activate and deactivate a fan, could use it.

Thanks.
You do not have the required permissions to view the files attached to this post.
mdi
Donator VIP
Donator VIP
 
Posts: 188
Joined: Tue Oct 11, 2011 1:20 pm

Re: Cannot update to 18.3. cannot unmount sda1

Postby mdi » Mon Mar 04, 2024 12:03 pm

About the script, I disable it from running with the cron scheduler, then I rebooted.
I checked that the file /lacie-boot/sda1boot was there, and in facts it existed, so I didn't have to create it manually.
I was then able to successfully apply the updated firmware through the web-interface, no errors. The NAS is now rebooting.
I will re-enable my script later on. Thanks for spotting that out!
mdi
Donator VIP
Donator VIP
 
Posts: 188
Joined: Tue Oct 11, 2011 1:20 pm

Re: Cannot update to 18.3. cannot unmount sda1

Postby Jocko » Mon Mar 04, 2024 3:09 pm

mdi wrote:I was then able to successfully apply the updated firmware through the web-interface, no errors. The NAS is now rebooting.
:thumbup

Attached a version where the script runs now as a daemon. Need to add some redirections on echo commands as the script runs in the background.
You do not have the required permissions to view the files attached to this post.
Jocko
Site Admin - expert
 
Posts: 11367
Joined: Tue Apr 12, 2011 4:48 pm
Location: Orleans, France

Re: Cannot update to 18.3. cannot unmount sda1

Postby mdi » Wed Mar 13, 2024 9:29 am

Thanks a lot! I installed the updated script and it works well, printing status on the NAS log.
mdi
Donator VIP
Donator VIP
 
Posts: 188
Joined: Tue Oct 11, 2011 1:20 pm

Previous

Return to Lacie Network Space vs2 and max version

Who is online

Users browsing this forum: No registered users and 4 guests