× NETGEAR will be terminating ReadyCLOUD service by July 1st, 2023. For more details click here.
Orbi WiFi 7 RBE973
Reply

Re: Gracefully restart RN104?

mads0100
Guide

Gracefully restart RN104?

Hey guys,

Are we allowed to post instructions for gracefully shutting down your RN via SSH on here? From what I can tell my Frontview GUI has stopped responding (6.2.2) and I just want to gracefully shut down so it'll re-start. The buttons on the front and the LCD screen aren't working. I can see the NAS in RAIDar and I can SSH to it/use network shares without any issues.

As far as I can tell it is not related to uninstalling an application. Any advice would be helpful.
Message 1 of 16
StephenB
Guru

Re: Gracefully restart RN104?

Try "rnutil rn_shutdown"
Message 2 of 16
mads0100
Guide

Re: Gracefully restart RN104?

Hey StephenB,

Thanks for the answer. It totally solved the problem and after shutting down it gracefully came back up.

I have a question after talking to L2 support. I wasn't home and couldn't do what she asked. She said that the first step would be to unplug my RN104 from power and just do a hard reboot followed by an OS re-install if that didn't clear it up. Isn't doing a hard reboot a 'bad' thing for a RAID? She seemed to casually throw it out like it wasn't a big deal. Also, I mentioned that I had SSH access and she said that only L3 support could give me that command and that the first step would be the unplug process.

What do you guys think?


Chris
Message 3 of 16
mdgm-ntgr
NETGEAR Employee Retired

Re: Gracefully restart RN104?

Before you try rebooting or unplugging the power please let me know the output of these commands

# systemctl status apache2
# systemctl status readynasd
# journalctl -a | grep apache2 | tail -n 20
# journalctl -a | grep readynasd | tail -n 20
# btrfs fi show
# btrfs fi df /data
# df -h


Doing a hard reboot is a bad thing if you have an alternative.
Message 4 of 16
mads0100
Guide

Re: Gracefully restart RN104?

Argh, sorry Mdgm. I just did it before reading this message :/. Can I get you any data after the reboot?

Chris
Message 5 of 16
mdgm-ntgr
NETGEAR Employee Retired

Re: Gracefully restart RN104?

Sure. If you still have the problem that would work.

Or if you don't perhaps try sending your logs (see the link in my sig)
Message 6 of 16
mads0100
Guide

Re: Gracefully restart RN104?

Attached is the data you requested. It happened again a few days later... same issue as far as I can tell.

apache2.service - The Apache HTTP Server
Loaded: loaded (/lib/systemd/system/apache2.service; enabled)
Active: active (running) since Sun, 18 Jan 2015 19:59:30 -0700; 6 days ago
Process: 1695 ExecReload=/bin/kill -USR1 $MAINPID (code=exited, status=0/SUCCESS)
Process: 1689 ExecReload=/usr/sbin/apache2 $OPTIONS -t (code=exited, status=0/SUCCESS)
Main PID: 1485 (apache2)
CGroup: name=systemd:/system/apache2.service
├ 1485 /usr/sbin/apache2 -k start
├ 1758 apache_log
├ 1762 apache_log
├ 1902 /usr/sbin/apache2 -k start
├ 1903 /usr/sbin/apache2 -k start
├ 1904 /usr/sbin/apache2 -k start
├ 1905 /usr/sbin/apache2 -k start
├ 1906 /usr/sbin/apache2 -k start
├ 1928 /usr/sbin/apache2 -k start
├ 2201 /usr/sbin/apache2 -k start
├ 2249 /usr/sbin/apache2 -k start
├ 3002 /usr/sbin/apache2 -k start
├ 3124 /usr/sbin/apache2 -k start
└ 14246 /usr/sbin/apache2 -k start

Jan 24 21:06:27 READYNAS apache2[14246]: [error] [client 192.168.1.126] Prem.../
Jan 24 21:06:27 READYNAS apache2[1905]: [error] [client 192.168.1.126] Conne.../
Jan 24 21:06:27 READYNAS apache2[1905]: [error] [client 192.168.1.126] Prema.../
Jan 24 21:06:41 READYNAS apache_access[1762]: Suppressed 4 duplicate messages
Jan 24 21:06:41 READYNAS apache_access[1762]: 192.168.1.126 "POST /dbbroker ...1
Jan 24 21:06:41 READYNAS apache2[1903]: [error] [client 192.168.1.126] Conne.../
Jan 24 21:06:41 READYNAS apache2[1903]: [error] [client 192.168.1.126] Prema.../
Jan 24 21:06:41 READYNAS apache_access[1762]: 192.168.1.126 "POST /dbbroker ...0
Jan 24 21:06:46 READYNAS apache2[3124]: [error] [client 192.168.1.126] Conne.../
Jan 24 21:06:46 READYNAS apache2[3124]: [error] [client 192.168.1.126] Prema.../



readynasd.service - ReadyNAS System Daemon
Loaded: loaded (/lib/systemd/system/readynasd.service; enabled)
Active: inactive (dead) since Wed, 21 Jan 2015 12:11:39 -0700; 3 days ago
Main PID: 1489 (code=exited, status=0/SUCCESS)
Status: "Start Main process"
CGroup: name=systemd:/system/readynasd.service

Warning: Journal has been rotated since unit was started. Log output is incomplete or unavailable.


readynasd.service - ReadyNAS System Daemon
Loaded: loaded (/lib/systemd/system/readynasd.service; enabled)
Active: inactive (dead) since Wed, 21 Jan 2015 12:11:39 -0700; 3 days ago
Main PID: 1489 (code=exited, status=0/SUCCESS)
Status: "Start Main process"
CGroup: name=systemd:/system/readynasd.service

Warning: Journal has been rotated since unit was started. Log output is incomplete or unavailable.
root@READYNAS:~# journalctl -a | grep apache2 | tail -n 20
Jan 24 21:06:00 READYNAS apache2[1903]: [error] [client 192.168.1.126] Connect rddclient failed, referer: http://192.168.1.133/admin/
Jan 24 21:06:00 READYNAS apache2[1903]: [error] [client 192.168.1.126] Premature end of script headers: dbbroker.cgi, referer: http://192.168.1.133/admin/
Jan 24 21:06:00 READYNAS apache2[3124]: [error] [client 192.168.1.126] Connect rddclient failed, referer: http://192.168.1.133/admin/
Jan 24 21:06:00 READYNAS apache2[3124]: [error] [client 192.168.1.126] Premature end of script headers: dbbroker.cgi, referer: http://192.168.1.133/admin/
Jan 24 21:06:05 READYNAS apache2[3002]: [error] [client 192.168.1.126] Connect rddclient failed, referer: http://192.168.1.133/admin/
Jan 24 21:06:05 READYNAS apache2[3002]: [error] [client 192.168.1.126] Premature end of script headers: dbbroker.cgi, referer: http://192.168.1.133/admin/
Jan 24 21:06:09 READYNAS apache2[2201]: [error] [client 192.168.1.126] Connect rddclient failed, referer: http://192.168.1.133/admin/
Jan 24 21:06:09 READYNAS apache2[2201]: [error] [client 192.168.1.126] Premature end of script headers: dbbroker.cgi, referer: http://192.168.1.133/admin/
Jan 24 21:06:10 READYNAS apache2[1904]: [error] [client 192.168.1.126] Connect rddclient failed, referer: http://192.168.1.133/admin/
Jan 24 21:06:10 READYNAS apache2[1904]: [error] [client 192.168.1.126] Premature end of script headers: dbbroker.cgi, referer: http://192.168.1.133/admin/
Jan 24 21:06:15 READYNAS apache2[1928]: [error] [client 192.168.1.126] Connect rddclient failed, referer: http://192.168.1.133/admin/
Jan 24 21:06:15 READYNAS apache2[1928]: [error] [client 192.168.1.126] Premature end of script headers: dbbroker.cgi, referer: http://192.168.1.133/admin/
Jan 24 21:06:27 READYNAS apache2[14246]: [error] [client 192.168.1.126] Connect rddclient failed, referer: http://192.168.1.133/admin/
Jan 24 21:06:27 READYNAS apache2[14246]: [error] [client 192.168.1.126] Premature end of script headers: dbbroker.cgi, referer: http://192.168.1.133/admin/
Jan 24 21:06:27 READYNAS apache2[1905]: [error] [client 192.168.1.126] Connect rddclient failed, referer: http://192.168.1.133/admin/
Jan 24 21:06:27 READYNAS apache2[1905]: [error] [client 192.168.1.126] Premature end of script headers: dbbroker.cgi, referer: http://192.168.1.133/admin/
Jan 24 21:06:41 READYNAS apache2[1903]: [error] [client 192.168.1.126] Connect rddclient failed, referer: http://192.168.1.133/admin/
Jan 24 21:06:41 READYNAS apache2[1903]: [error] [client 192.168.1.126] Premature end of script headers: dbbroker.cgi, referer: http://192.168.1.133/admin/
Jan 24 21:06:46 READYNAS apache2[3124]: [error] [client 192.168.1.126] Connect rddclient failed, referer: http://192.168.1.133/admin/
Jan 24 21:06:46 READYNAS apache2[3124]: [error] [client 192.168.1.126] Premature end of script headers: dbbroker.cgi, referer: http://192.168.1.133/admin/


Nothing for the 4th command


root@READYNAS:~# journalctl -a | grep readynasd | tail -n 20
root@READYNAS:~# btrfs fi show
Label: '0e370a82:data' uuid: a638e4b0-2edb-4b09-9097-c65871d5651a
Total devices 1 FS bytes used 3.02TiB
devid 1 size 8.17TiB used 3.03TiB path /dev/md127

Btrfs v3.17.3

root@READYNAS:~# btrfs fi df /data
Data, single: total=3.02TiB, used=3.01TiB
System, DUP: total=8.00MiB, used=352.00KiB
System, single: total=4.00MiB, used=0.00B
Metadata, DUP: total=6.00GiB, used=4.33GiB
Metadata, single: total=8.00MiB, used=0.00B

Filesystem Size Used Avail Use% Mounted on
rootfs 3.8G 387M 3.2G 11% /
tmpfs 10M 4.0K 10M 1% /dev
/dev/md0 3.8G 387M 3.2G 11% /
tmpfs 248M 0 248M 0% /dev/shm
tmpfs 248M 2.7M 245M 2% /run
tmpfs 248M 0 248M 0% /sys/fs/cgroup
tmpfs 248M 0 248M 0% /media
/dev/md127 8.2T 3.1T 5.2T 38% /data
/dev/md127 8.2T 3.1T 5.2T 38% /apps
/dev/md127 8.2T 3.1T 5.2T 38% /home
/dev/md127 8.2T 3.1T 5.2T 38% /run/nfs4/home
tmpfs 4.0K 0 4.0K 0% /data/Music/snapshot
/dev/md127 8.2T 3.1T 5.2T 38% /data/Music/snapshot/c_2015_01_10__00_00_33
root@READYNAS:~#
Message 7 of 16
mdgm-ntgr
NETGEAR Employee Retired

Re: Gracefully restart RN104?

Looks like you do have a lot of fragmentation.

What happens when you try to start readynasd?

# systemctl start readynasd


Do any of the fixes mentioned in 6.2.3 beta http://www.readynas.com/forum/viewtopic.php?f=154&t=78866 look relevant?
Message 8 of 16
mads0100
Guide

Re: Gracefully restart RN104?

I missed this message before rebooting it. The Daemon is running. After your comment, I went through and turned on some of the maintenance functions such as defragmentation. It took 2.5 hours last night. How can I tell how much fragmentation it has to make sure it's working?
Message 9 of 16
mdgm-ntgr
NETGEAR Employee Retired

Re: Gracefully restart RN104?


# btrfs fi df /data


You should see for Metadata, DUP that less is used than before.
Message 10 of 16
mads0100
Guide

Re: Gracefully restart RN104?

Thanks Mdgm! So, the value is actually higher... any ideas?

Data, single: total=3.05TiB, used=3.04TiB
System, DUP: total=8.00MiB, used=384.00KiB
System, single: total=4.00MiB, used=0.00B
Metadata, DUP: total=6.00GiB, used=5.01GiB
Metadata, single: total=8.00MiB, used=0.00B
Message 11 of 16
mdgm-ntgr
NETGEAR Employee Retired

Re: Gracefully restart RN104?

Ah, you use snapshots. This is why the value is higher as when files are defragmented the CoW link between the original and snapshot of the file is broken.

So it looks like the defragmentation did work.
Message 12 of 16
mads0100
Guide

Re: Gracefully restart RN104?

You say that like I probably shouldn't use snapshots. Are they worth the effort or should I turn them off?
Message 13 of 16
mdgm-ntgr
NETGEAR Employee Retired

Re: Gracefully restart RN104?

Depends on what you are using the NAS for. They can be useful but on the 100 series I would be selective as to which shares to use them with.

What kind of data do you store on the NAS?
Message 14 of 16
mads0100
Guide

Re: Gracefully restart RN104?

Documents, movies, MP3s, and my astrophotography data/family photos. I suppose if I was going to selectively use it, the astronomy data and family photos is the most important to me. I'll turn it off for the rest of the shares.

Thank you!
Chris
Message 15 of 16
StephenB
Guru

Re: Gracefully restart RN104?

mdgm and I don't quite agree on the "limit snapshots on the RN100" concept. It seems to me that the impact of snapshots on file system fragmentation is the same for all NAS models. I think mdgm's view is that performance impact of the fragmentation (and the defrag) is worse on the lower performing NAS, He could well be right - I'm just not seeing it quite the same way.

Where we agree is

-The value of snapshots is that you can restore older versions or accidentally deleted files.
-The challenges arise on files that are modified frequently - if you are adding/deleting/moving entire files, CoW doesn't create more fragmentation.
-That you do need to be thoughtful about snapshot settings (and take them into account as you organize your data).

Its not so much about which files are most important, its more about what you do with them. For shares where you add files, but don't usually edit them or delete them, snapshots do no harm, and could help if you accidentally delete things - so (in my opinion) you might as well enable them.

For shares where the files are heavily modified (torrent downloads, SQL databases, documents that are continually revised), you should keep snapshots off, and find some other way to archive old versions. Daily frontview backup to a second share is one way.

For shares where a lot of files are regularly deleted, snapshots quickly take a lot of disk space. One example is a folder of not-yet-watched videos, where you delete then as you watch them, For those shares you should probably keep them off, since if the volume becomes very full then performance certainly suffers a lot, and the NAS will begin automatically deleting snapshots anyway.
Message 16 of 16
Top Contributors
Discussion stats
  • 15 replies
  • 3085 views
  • 0 kudos
  • 3 in conversation
Announcements