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

Re: Deleting snapshots over SSH

RedFarmer
Aspirant

Deleting snapshots over SSH

I have a RN102 with 2x3TB WD Red drives in XRAID2. I have deleted all my snapshots but one (snapshotted share is 191GB). Still, snapshots take up lots of space:

 

space.PNG

 

It hasn't recovered "over time" so i thought about manually deleting them over SSH. Of my 5 shares 4 look like this where every folder contains lots of data (snapshotted copies of my shares):

 

ReadyNAS Snapshot location.PNG

 

Would i mess anything up by deleting them?

 

Also, is this a result of a bug? Why isn't space recovered when i delete snaps through the GUI?

 

Thanks!

Message 1 of 14

Accepted Solutions
mdgm-ntgr
NETGEAR Employee Retired

Re: Deleting snapshots over SSH

These are snapshots that weren't upgraded when you updated from pre-6.2.x firmware to 6.2.x (or later).

You could do

# touch /.force_snapshots_upgrade
# systemctl restart readynasd

These snapshots should then be upgraded and you can then delete them from the web admin UI.

 

Space is only recovered when you delete snapshots if the snapshots you delete contain the only copy of some data. If the current data or snapshots that you do not delete also contain the data then space will not be freed up. Also when you delete snapshots the system will need to recursively update the other snapshots. This can take a little time if you have a lot of snapshots.

Once you have deleted all the snapshots that you want to and have got volume usage back below 80% I would suggest that you then run a balance.

View solution in original post

Message 2 of 14

All Replies
mdgm-ntgr
NETGEAR Employee Retired

Re: Deleting snapshots over SSH

These are snapshots that weren't upgraded when you updated from pre-6.2.x firmware to 6.2.x (or later).

You could do

# touch /.force_snapshots_upgrade
# systemctl restart readynasd

These snapshots should then be upgraded and you can then delete them from the web admin UI.

 

Space is only recovered when you delete snapshots if the snapshots you delete contain the only copy of some data. If the current data or snapshots that you do not delete also contain the data then space will not be freed up. Also when you delete snapshots the system will need to recursively update the other snapshots. This can take a little time if you have a lot of snapshots.

Once you have deleted all the snapshots that you want to and have got volume usage back below 80% I would suggest that you then run a balance.

Message 2 of 14
RedFarmer
Aspirant

Re: Deleting snapshots over SSH

That did it! I wonder why the snapshots didn't update before?

 

Thanks a lot! All solved! 🙂

 

Message 3 of 14
mdgm-ntgr
NETGEAR Employee Retired

Re: Deleting snapshots over SSH

In some cases the one-off snapshot upgrade may fail.

Message 4 of 14
mgshn123
Aspirant

Re: Deleting snapshots over SSH

I am also having this problem.  How do I ssh to my ReadyNAS so I can run touch the file and restart the daemon?

 

(It keeps refusing my connection)

 

Message 5 of 14
mgshn123
Aspirant

Re: Deleting snapshots over SSH

OK, so I figured out that I need to enable ssh on the ReadyNas.

 

Now I can connect as a regular user but then can't create the /.force... file because I'm a regular user.  When I try to log in as admin I get booted out.

Message 6 of 14
mgshn123
Aspirant

Re: Deleting snapshots over SSH

My snapshots are now upgrading and this is time out of my dwindling life I'll never get back.  

 

It would have been nice if this was handled (instead of I would guess caused) by your recent firmware upgrade.

Message 7 of 14
mgshn123
Aspirant

Re: Deleting snapshots over SSH

So now, when I go to delete snapshots from 2 years ago the process fails:  "Failed to remove records for shapshot 2014-06-30... from share or LUN Videos.

 

Again, How do I recover this disk space?

Message 8 of 14
mgshn123
Aspirant

Re: Deleting snapshots over SSH

A final note for this evening... I was able to delete SOME snapshots and in the middle one of those deletions my ReadyNAS dropped off the network and I can't reconnect, either as a share or over http.  Any suggestions?

Message 9 of 14
StephenB
Guru

Re: Deleting snapshots over SSH


@mgshn123 wrote:

OK, so I figured out that I need to enable ssh on the ReadyNas.

 

Now I can connect as a regular user but then can't create the /.force... file because I'm a regular user.  When I try to log in as admin I get booted out.


I'm not sure what you did exactly, but the ssh logon is "root", not "admin".  You use the NAS admin password though.

Message 10 of 14
mgshn123
Aspirant

Re: Deleting snapshots over SSH

Stephen,

 

Thank you for your reply to an earlier post.

 

Where things stand not, I was able to ssh, create the needed file, and restart the daemon.

 

Following that the snapshots showed up on my timeline and I began to delete them.

 

After deleting about 20, the ReadyNAS dropped offline and I could not connect using ssh or the web interface.  I also couldn't connect to it as a share.

 

That was eight hours ago and nothing has changed.  Pressing or holding down the power button on front of the device has not effect.  A port scan shows a number of ports on the device are open.

 

How do I restore connection to the device?

Message 11 of 14
StephenB
Guru

Re: Deleting snapshots over SSH


@mgshn123 wrote:

 

 

That was eight hours ago and nothing has changed.  Pressing or holding down the power button on front of the device has not effect.  

 

How do I restore connection to the device?


If that continues, you will need to disconnect the power.  Not ideal, but there really is no choice.

Message 12 of 14
mgshn123
Aspirant

Re: Deleting snapshots over SSH

Stephen,

 

Thanks for your advice and that is exactly what I did.

 

I let it sit for so long thinking it might be doing some housekeeping, what with all the snapshots I deleted.  But I eventually pulled the plug (literally).

 

When I reconnected it still wasn't all good because some of the options that were needed to map shares had been reset.  After some careful consideration, loud profanity, and random options setting things seem to be working fine again.

 

Perhaps you could suggest to our Netgear Overlords that the next time they issue an upgrade they perhaps test it a bit more thoroughly?  From the chatter I've seen on the forum, something I never expected to visit, there are a number of people who have wasted a fair amount of time as a result of this oversight.

 

Thanks again,

 

Bob

Message 13 of 14
StephenB
Guru

Re: Deleting snapshots over SSH


@mgshn123 wrote:

 

Perhaps you could suggest to our Netgear Overlords that the next time they issue an upgrade they perhaps test it a bit more thoroughly? 

 


I'm not a Netgear insider, but I have to think that support has already made this point much more forcefully than I can.

 

One good outcome of the 6.4.0 challenges is that we are seeing more netgear developers directly engaged here - which I think also will help.

Message 14 of 14
Top Contributors
Discussion stats
  • 13 replies
  • 9436 views
  • 3 kudos
  • 4 in conversation
Announcements