NETGEAR is aware of a growing number of phone and online scams. To learn how to stay safe click here.
Forum Discussion
Piglet
Dec 17, 2014Luminary
Cancel a defrag
I started a defrag on my RN104 about 60h ago and it still hasn't finished. It has so far eaten up about 70GB and I'm getting low on free space, so I want to move files off the NAS to make more room for defrag to do its thing.
The defrag is taking up almost 100% of the cpu so the system is very sluggish and the web interface is not loading fully. I can execute commands via ssh though.
My question is if it's safe to restart the NAS and cancel the defrag? If so, what is the recommended way to do a reboot via ssh; the "reboot" command or "rn_shutdown"?
The defrag is taking up almost 100% of the cpu so the system is very sluggish and the web interface is not loading fully. I can execute commands via ssh though.
My question is if it's safe to restart the NAS and cancel the defrag? If so, what is the recommended way to do a reboot via ssh; the "reboot" command or "rn_shutdown"?
28 Replies
Replies have been turned off for this discussion
- PigletLuminaryAfter freeing up about 250GB I started the defrag again and it completed in 6h this time.
It did however consume 200GB of space. :shock: Is this because COW:ed data is duplicated during defrag? If so, what is the best way to reclaim it? Would running something like bedup be a good idea? - My free space also went down after a recent defrag, knowing why and how to get it back would definitely be of use.
- vandermerweMasterYes I'd be interested to know about the space consumption during defrag. I had initially thought the space was temporarily used while moving stuff around, but from what you describe it's a permanent increase.
I suspect it has something to do with COW. - PigletLuminaryI did a scrub after the defrag completed for good measure and that took 28h.
I'm still missing about 300GB free space after the defrag so I'm very interested in ways to reclaim that. - mdgm-ntgrNETGEAR Employee RetiredYou could try deleting some old snapshots (if you have some) and maybe running a balance.
- PigletLuminaryI don't have any snapshots, plus the space disappeared when doing the defrag. Is this a known side-effect of defragging?
I tried scheduling a balance (is there a way to run one immediately?) but it seems to have failed. readynasd was restarted seconds after starting the balance task and no disk activity occurring after that.
From status.log:[14/12/19 19:29:54 CET] notice:volume:LOGMSG_SCRUBSTARTED_VOLUME Scrub started for Volume 'data'.
[14/12/20 23:24:37 CET] notice:volume:LOGMSG_SCRUBCOMPLETE_VOLUME Scrub completed for Volume 'data'.
[14/12/20 23:40:01 CET] notice:volume:LOGMSG_BALANCE_STARTED_VOLUME Balance started for Volume 'data'.
[14/12/20 23:40:44 CET] info:system:LOGMSG_READYNASD_ABORTED ReadyNASOS service or process (readynasd) was restarted.
[14/12/20 23:40:45 CET] warning:volume:LOGMSG_VOLUME_USAGE_WARN Volume 'data' usage exceeds 95 % of size (5.4 TB).
[14/12/20 23:40:46 CET] info:system:LOGMSG_START_READYNASD ReadyNASOS background service started. - mdgm-ntgrNETGEAR Employee RetiredAre you on 6.2.1? If not, update to that then run the balance again.
- PigletLuminaryYes, I was on 6.2.1 when trying to do the balance.
I tried scheduling it again, and this time it seems to have started normally. There's disk activity and "Balance" is showing on the display. - PigletLuminaryThe balance completed successfully in just under 9h. There's no big change in available space. I'm still missing about 300GB that disappeared after the defrag.
Googling about this problem led me to this page, saying:Defragmenting a file or a subvolume that has a copy-on-write copy results breaks the link between the file and its copy. For example, if you defragment a subvolume that has a snapshot, the disk usage by the subvolume and its snapshot will increase because the snapshot is no longer a copy-on-write image of the sub volume.
… not sure if this is accurate for the btrfs version ReadyNAS is using, but it's my understanding that files created with CoW will remain so even if you turn off that feature. So could this explain why the data went missing even though I had disabled CoW before doing the defrag? If so, the missing data would be the files created since OS 6.2 turned on CoW.
Is there a command to list CoW files? All I could find was lsattr which only shows files flagged NOT to use CoW. - mdgm-ntgrNETGEAR Employee Retired6.2 didn't enable CoW. It added the option to disable CoW. But as you already understand disabling CoW does not affect existing files.
One option would be to create new shares, copy your data into those shares and then delete the original shares.
When you run lsattr on a file you will see if CoW is enabled or not.
Related Content
NETGEAR Academy
Boost your skills with the Netgear Academy - Get trained, certified and stay ahead with the latest Netgear technology!
Join Us!