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

Expanding - reinstalling a RN Pro 6

tony359
Apprentice

Expanding - reinstalling a RN Pro 6

Hi all,

Can I please have a sanity check on what I am about to perform on my RN Pro 6.

It is currently running 2 x 4TB HDDs in X-RAID2. I would like to add a third 4TB HDD. Also, as I believe someone may have hacked into my RN some time ago (I have some funny files which cannot be deleted) 

I have performed a backup of all my data.

This is what I would like to do:

 

1. Upgrade the FW to the latest version (always upgraded the various Linux components manually to avoid the 'risk' of a full upgrade)

2. Reinstall the new FW to wipe the system partition

3. Expand the volume offline using the following instructions I found here on the forum

 

 ==================

1. First log into the ReadyNAS. For this the ssh addon has to be installed. Use a Linux machine with standard SSH or Putty or similar from a windows machine on the same LAN.

2. Optional: 

a. As the filesystem expansion and check commands can be lengthy make sure that your terminal remains connected during the operations. If you want to play it safe use the Linux "screen" command which still may have to be installed:

apt-get install screen


b. Run screen so your session will remain to run even after the ssh session is disconnected:

screen


c. You can detach the session by pressing "CTRL-A" and then "D" and reconnect by typing:

screen -R


2. In order to do an offline expansion no services should be using the volume /c. As I only used SMB and NFS the following commands were sufficient:

/etc/init.d/nfs-kernel-server stop
/etc/init.d/samba stop


3. After this I could unmount volume /dev/c/c/ with the following command. If the command fails something is still using the /c volume. You could check what that is with the lsof command. You may have to disable addons or other services such as AFP, FTP, etc.

umount /c


4. The e2fsck and resize2fs commands use a lot of memory and fail if memory runs out. I increased available memory (my ReadyNAS has only 1GB ram) by making a temporary 1GB swap file. With the "df" command you can check if there is enough room in /root. This was the case for me. If you don't have enough room look for an alternative location. Even an external USB HDD can be used for the swap file.

dd if=/dev/zero of=swap bs=1M count=1000
mkswap swap
swapon swap


5. First check filesystem consistency, I had errors after adding the 5th and 6th drive.

e2fsck -f /dev/c/c


6. Now expand the volume with the following command:

resize2fs -pf /dev/c/c


7. And run another file system check:

e2fsck -f /dev/c/c


8. Mount the volume again:

mount /c


Now I had the full volume size as could be expected. I hope this information is useful.

9. Before I forget it, the swap file should be deleted again Smiley Very Happy:

swappoff swap
rm swap

===============

Could someone please confirm this is the correct procedure?

Thanks for your help!

Tony

Model: ReadyNAS RNDP6610|ReadyNAS Pro 6
Message 1 of 9

Accepted Solutions
StephenB
Guru

Re: Expanding - reinstalling a RN Pro 6

You don't need to overcome the 8 TB growth limit now, so I do recommend using the normal xraid expansion.

 

You could try deleting the weird filenames by inode ( https://www.linux.com/blog/linux-shell-tip-remove-files-names-contains-spaces-and-special-characters... )

View solution in original post

Message 4 of 9

All Replies
StephenB
Guru

Re: Expanding - reinstalling a RN Pro 6

There's no need for off-line expansion, you should be able to simply hot-insert a third disk.  Why are you thinking off-line expansion would be better?

 

On the hacking - the best solution for this is to do a factory reset, rebuild the NAS from scratch, and then restore the data from backup.  An OS reinstall doesn't completely rebuild the OS partition, so it won't necessarily remove any bad stuff that was installed on your NAS.

 


@tony359 wrote:

(I have some funny files which cannot be deleted) 

 


Can you provide some more details on the filenames?

Message 2 of 9
tony359
Apprentice

Re: Expanding - reinstalling a RN Pro 6

Hi Stephen,

 

Thank you for your usual support.

I thought that offline expansion was a better choice - but maybe I was getting confused and it's only needed to overcome the 8TB expanding limit, which I am not hitting on this occasion.

The funny file names were discussed here before. Please see an attachment. I did try deleting them via terminal but no luck. I feel they're harmless but I am not prepared to do a full reinstall as half of my backup is on CrashPlan and it would take forever to restore it!! So if the 'reinstall' does not fix that, I can live with that. Unless you have a better idea of course?

 

Thanks

Tonyrnfiles.PNG

Message 3 of 9
StephenB
Guru

Re: Expanding - reinstalling a RN Pro 6

You don't need to overcome the 8 TB growth limit now, so I do recommend using the normal xraid expansion.

 

You could try deleting the weird filenames by inode ( https://www.linux.com/blog/linux-shell-tip-remove-files-names-contains-spaces-and-special-characters... )

Message 4 of 9
tony359
Apprentice

Re: Expanding - reinstalling a RN Pro 6

Thanks! That worked! Interesting that those files were inode 21,22,23,24,25,26... But they're gone now.

I'll follow your advice and do a normal expansion then. Thanks again!

Message 5 of 9
tony359
Apprentice

Re: Expanding - reinstalling a RN Pro 6

Forgot to ask: I have about 10GB free on my RN. Is it recommended to have more free space available on the volume or it does not matter?

Message 6 of 9
StephenB
Guru

Re: Expanding - reinstalling a RN Pro 6

Normally I like to see at least 10% free space on an OS 4.2.x NAS.

 

I think you will be ok, but if it's easy to offload some data temporarily you might want to do that.

Message 7 of 9
tony359
Apprentice

Re: Expanding - reinstalling a RN Pro 6

I moved some data off the drive. It's completed the expansion and all went well! Thank you for your help as usual!

Message 8 of 9
StephenB
Guru

Re: Expanding - reinstalling a RN Pro 6

Great to hear, and I'm glad i could help.

Message 9 of 9
Top Contributors
Discussion stats
  • 8 replies
  • 2490 views
  • 1 kudo
  • 2 in conversation
Announcements