NETGEAR is aware of a growing number of phone and online scams. To learn how to stay safe click here.
Tips from other users
875 TopicsSSH shell: He says "Let there be colors" Shell Beginner Guid
Modified : 2010-12-31 Hi everyone. Not quite sure it has already been posted, so I thought I just share some tips. It's just "basic" Linux knowledge, so it won't be of great interest for those who are already familiar with this, but others may find this useful. I won't just throw what to modify, but I'm going to explain some of the very basic Linux commands too. As you may already know, you NAS is accessible via SSH, but the basic shell access is rather "austere" & first time users might be unwilling to use shell access due to that fact. So this "howto" is just about putting some life in it. Pre-requisites : SSH addon APT addon (may be already installed on your NAS) A SSH access software. For Win users, use the great PuTTY basic linux knowledge will help :idea: Tip for the first time users. To copy/paste text in the linux terminal/shell : Just select the text you want to copy, as in windows, and THAT'S ALL (selected text is automatically copied into memory). To paste, just right-click, and the text will be pasted at the cursor position (not the mouse cursor position, the terminal cursor position, so be careful). To cancel an operation, input CTRL+C To logout of a terminal, input CTRL+D (when you're at shell prompt, ie not editing a file or running an operation) With Linux, directory structures are written with forward slashes "/" as opposed to windows where it is backslashes "\". So directories are accessed with cd /directory1/directory2 ... Let's start with the beginning. When you access you readynas via SSH, after login in successfully, you end up to the linux shell. It's called "BASH" (acronym for "Bourne-Again Shell") (For those interested in reading, here is the Wikipedia link). I'll assume you'll use PuTTY from now on. (Sorry Mac users, should be pretty the same for your ssh soft too) Once logged in, you get something like this : login as: root Authenticating with public key "root@Hydra" Passphrase for key "root@Hydra": Last login: Fri Sep 3 09:45:07 2010 from 172.21.0.12 Last login: Fri Sep 3 10:12:10 2010 from 172.21.0.12 on pts/1 Linux Hydra 2.6.33.6.RNx86_64.2.1 #1 SMP Tue Jul 27 13:21:19 PDT 2010 x86_64 GNU/Linux Hydra:~# Here "Hydra" is the name of my ReadyNas Pro, so you should see a YouNASName:~# That's the prompt. the "~" mean you're in your "home directory", so if you've logged in as "root" you should be in the "/root" folder. You can check in what folder you're in by issuing the "pwd" command :!: "/root" is the home folder for the user "root", not to be confused with "the root folder" which is the base directory ("/") Ok, now go to the root folder "/", and input a "ls" ("list") command to see what's in it. Hydra:~# cd / Hydra:/# ls addons-config dev home lost+found opt sbin usr backup Documents initrd media proc sys var bin etc lib mnt ramfs tmp webroot c frontview lib64 Mx500 root USB Hydra:/# :?: Yeah, whatever, just plain grey text over a black background... Not really appealling :roll: Don't worry, as we're gonna remedy to this ! Part 1 : Improve the shell First of all, we need to edit "bash" profile file, so we can pass options to it. The file's located under the /root folder (if you're logged in as "root") and it's called ".bashrc" Hydra:/# cd /root/ Hydra:~# ls Hydra:~# :?: WTF ?? It's all empty ?? Ok so you won't find it if you input just a "ls" command, as files beginning with a dot "." are considered hidden by the system. You have to input a "ls -a" ("a" as in "all") to see everything Hydra:~# ls -a . .bash_history .ncftp .ssh .viminfo .VirtualBox .. .bashrc .profile .vim .vimrc Hydra:~# Let's edit the file, and put some lines in it. We'll use the "vi" text editor, a basic editor available in almost (if not all) linux distro. For the moment, "vi" we'll be basic too, but we'll enhance it in the next part of this howto Hydra:~# vi .bashrc The file will be pretty empty when you open it first time So lets fill the following lines in, so you final file is as mine : To input lines in "vi" you have to tap the "insert" key on your keyboard. It'll then read as "I" in the bottom-left corner of the screen. If you tap "insert" a 2nd time, it'll read "R" instead which mean "Replace" so be careful. For numbers input DO NOT USE THE NUMPAD as the result may be unexpected. Use the keys above the keyboard instead To exit "edit" mode, just press the "Esc" key on your keyboard. Here is the file as it should look when you're done editing # ~/.bashrc: executed by bash(1) for non-login shells. # You may uncomment the following lines if you want `ls' to be colorized: export LS_OPTIONS='--color=auto' eval "`dircolors`" alias ls='ls $LS_OPTIONS' alias ll='ls $LS_OPTIONS -l' alias l='ls $LS_OPTIONS -lA' # # Some more alias to avoid making mistakes: alias rm='rm -i' alias cp='cp -i' alias mv='mv -i' :!: Be careful with the line "eval "`dircolors`"" because "dircolors" is enclosed in single backquote "`" (= Grave accent) and not single quote " ' ". If you're unsure how to type it, just copy/paste the text above in you file To do operations in "vi", you have to escape input mode (by tapping the "Esc" key on you keyboard) and then tap ":" You'll see that ":" will appear on the bottom-left corner of the screen. Then input "wq" (without the quotation mark) for "write & quit" "Vi" will save the file and return you to the shell. :!: If you've made a mistake and don't know how to go back, input ":q!" (without the quotation mark) to "force exit" without saving, and just try again Some explanations. In the above file, we've passed options to bash, to tell it to render a color coded display. Moreover, we have created "Alias". Alias are useful to shorten commands for example, as it's the case here. For example, we have aliased the "ls -l" command (ls = show dir content, -l in ordered vertical list with file/directory details) to "ll" So if you type "ll" at the shell prompt, it'll be as if you've typed "ls -l". You might not see the point in doing this right now, but when you'll be a little more used to the Linux environment, you'll see that's it's very useful to have full detailed view of a file/directory. :?: When I type "ll", it says "command not found" Yes, the modifications are not applied immediately, you'll see them when you'll logout/login to PuTTY. But for now, stay logged in, as we have more to do. You can try the "ls -l" command to see how the result looks like. Part 2 : Improve "Vi" This part is the simpler one now that you've learned a little bit more. We're going to replace our basic "Vi" with it's enhanced version called "Vim" With APT ready to use, it's very simple to install new "packages" (equivalent of Win/Mac executables) We're going to install the enhanced version of the "Vi" editor. To do this, just type the following command at the prompt Hydra:~# apt-get install vim vim-doc vim-scripts This will install all the necessary packages plus some others (the doc, which can be very useful) Once everything is installed, we have to do one more small modification. Go to you home folder by issuing a "cd" without any char after type a "ls -la" and see if you have a file called ".vimrc" If it's not the case, simply make one, by issuing "touch .vimrc" :!: At the left of each line what you see are permissions of each file/folder. Folders are indicated with a "d" as the first letter Hydra:/# cd Hydra:~# ls -la total 52 drwxr-xr-x 6 root root 4096 2010-09-06 10:54 . drwxr-xr-x 23 root root 4096 2010-09-02 12:27 .. -rw------- 1 root root 10290 2010-09-03 16:05 .bash_history -rw-r--r-- 1 root root 396 2010-09-02 17:26 .bashrc drwxr-xr-x 2 root root 4096 2010-08-18 21:53 .ncftp -rw-r--r-- 1 root root 110 2004-11-10 17:10 .profile drwx------ 2 root root 4096 2010-08-18 21:48 .ssh -rw------- 1 root root 3885 2010-09-06 10:54 .viminfo -rw-r--r-- 1 root root 10 2010-09-02 17:29 .vimrc drwxr-xr-x 2 root root 4096 2010-09-02 20:46 .VirtualBox Hydra:~# touch .vimrc This file will contain only one parameter for the moment, so it is necessary to open it and edit it, we can fill it with the following command: Hydra:~# echo "syntax on" >> .vimrc The "echo" command is used to sort of "write" the text inside the quotes somewhere. By default, it write it to the display. By using the ">>" we're telling echo to write the text at a precise location. This location is in fact the ".vimrc" file. So our command write the text in quotes into the file. This command will tell "Vim" to use syntax highlighting which is very useful when reading trough a file. One more thing and we're done. We have to tell the system to now use the "vim" executable instead of the "vi" one. Go to the "/bin" folder which contains some of the executable files of the system. Type a "ls -l vi" Hydra:~# cd /bin Hydra:/bin# ls -l vi lrwxrwxrwx 1 root root 12 2010-09-02 17:51 vi -> /bin/busybox Hydra:/bin# What you see here is called "Symbolic Link" (designated by the -> and the "l" at the beginning of the line ) It means that when you type "vi" at the command prompt, in fact the system execute a program called "busybox" We have to modify this to call "vim" instead. First we have to delete the existing link. :!: Be VERY CAREFUL when deleting system files when you're logged in as root, as you might end up killing your system and restoring your NAS Type "rm -i vi" and answer with a "y" to the question if you are sure what you're about to delete. Hydra:/bin# rm -i vi rm: remove symbolic link `vi'? y Hydra:/bin# Now we'll tell the system that "vi" should call "vim". For this we're using the "ln -s" command. The "ln" command is to create links and the "-s" parameter is for "symbolic" (as opposed to "hard links"). A symbolic link (also known as a soft link or symlink) consists of a special type of file that serves as a reference to another file or directory. Hydra:/bin# ln -s /usr/bin/vim vi Hydra:/bin# ls -l vi lrwxrwxrwx 1 root root 12 2010-09-06 11:18 vi -> /usr/bin/vim Hydra:/bin# With this, you can continue to type simply "vi" to edit a file, and the system will automatically called "Vim" "Et voila!" you're done! Now you have to logout and back in to SSH for all the modifications we have done to be applied to our profile. Alternatively, you can also source (aka, re-read the file and apply modification) the .bashrc file by typing the following code into your terminal : cd ~ ; . .bashrc The "~" means you home-dir. So basically you just cd to your homedir, and source (reload) the .bashrc file. Be carefull, there is a space between the dots. The first is equivalent to the command "source", the second one is part of the filename you want to source. To see how things change, you can for example go to the "/bin" folder and issue a "ll" command. You can also try to edit your .bashrc file and see how it looks like now. Hope you guys will find this little contribution helpful. Don't hesitate to ask questions & make criticism.Installing and running OpenVPN @ boot - PrivateInternetAcces
Hi All, I have been trying to install OpenVPN and use PrivateInternetAccess (PIA) as my VPN Server on my ReadyNAS for a while now - my prime usecase was that I wanted all the connection to be encrypted while exposing it to external world (like sharing files right out of my NAS or torrent). The following are the steps which worked for me and my NAS is always on VPN now. 1. Enable SSH by going into System -> Settings in your WebView PS: This may cause problem with Netgear support - so do @ your own risk. However, I am not modifying anything with system and it looks safe to me. 2. Download Putty from link below http://the.earth.li/~sgtatham/putty/0.63/x86/putty.exe 3. Go to command prompt, navigate to the directory where you placed putty. Once in the directory, execute the following command putty <NAS Address> 4. You will see a terminal window open up asking for your login. enter your login info that you use to access your NAS from webbrowser 5. Now enter the following command on the terminal prompt apt-get install openvpn 6. This will install OpenVPN. Now, you need to get the VPN config files from PIA. Use the following commands below to navigate the OpenVPN directory and get the files cd /etc/openvpn wget https://www.privateinternetaccess.com/openvpn/openvpn.zip 7. Extract the files using unzip command. If you dont have the program, use apt-get command as above (replace openvpn with unzip) unzip openvpn.zip 8. Now, create a file - say userpass.file and type username on first line and password on the second line and save it. To save a file, press Esc and type :wq (including the colon) and press enter vi userpass.file 9. Chose one of the .ovpn file - for this eg, I chose France.ovpn and edit it. When you open it using the vi command, there will be a line auth-user-pass. Change it to auth-user-pass userpass.file and save the file as mentioned above. vi France.ovpn 10. at this time, you are all set to create a VPN connection. However, the issue is that now you need to always activate it manually. So, now we will create a startup file which runs automatically everytime you boot your NAS. Use the following commands to create a new file called startvpn.sh - you can name whatever you want cd /etc/init.d vi startvpn.sh 11. Now type the following lines and save the file #!/bin/bash cd /etc/openvpn openvpn France.ovpn 12. Once saved, you need to make the script executable. Use the command below for the same chmod +x startvpn.sh 13. Now, you need to add this script to run at everyboot. To do so, you need to add the following command in crontab file. Open the crontab file using command crontab -e and then add the following line anywhere in the file @reboot ./etc/init.d/startvpn.sh & . Save it using the Esc -> :wq! 13a. You can also use the following command to add this command to startup update-rc.d startvpn.sh defaults 14. Now you need to see if the VPN has started. To do so, type ifconfig on the command line and you will see a new connection starting with a config similar to below tun0-00 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 This means your vpn is running perfectly and you added another layer of security. Please let me know if this worked for you - i am not a Linux expert but will try to answer any questions you may have Linux experts - comment/add anything to make it better. Thanks, ArpanSolvedReadyNAS Data Recovery - VMware recovery tool
Description This topic contains links to linux VMware images (Debian / Ubuntu) that have been modified to enable you to access your ReadyNAS duo HDDs from any machine with a USB plug and a SATA to USB cable. Advantages: * VMware player be downloaded freely * Can run in both existing linux / MS Windows (XP,Vista etc) operating system without any further modification Disadvantages: * Requires a SATA to USB cable * Mac users will need to find another program to run the VMware files Background At some point your ReadyNAS Duo unit is going to stop working (which hopefully will be long and far into in the future) and there may be a point where you'll need to rely on your external backups. While it's a good strategy to ensure you (and your family / clients) have a good disaster recovery process (having external off-site backups, checking the backups, knowing how to restore from backups etc), in some cases the backups might not work or the backups aren't available to you. Due to the architecture of the ReadyNAS Duo (more specifically the 16KB blocksize of the partitions), you cannot simply pull out the hard disks, place them into a standard windows / linux pc, then copy all your files across to another computer or storage device. Unfortunately there are no windows drivers that can properly access the drives and the process to configure a linux pc is complex (see viewtopic.php?f=25&t=24861&hilit=16+blocksize for further background on this) The following VMware images contain all required patches to read your HDDs in linux just by entering a few terminal commands. VMplayer Link To get started, you will need to download a version of VMplayer for your operating system Win/Linux (Mac not directly supported yet), this can be found http://www.vmware.com/products/player/ VMware Linux Image with Ext2Fuse acmtn Debian release - tested ok, reports are that it works fine except for files greater than 4GB) http://www.readynas.com/contributed/dek ... ebian5.zip acmtn VM login info (username/password): root/rootadmin, vmuser/vmuser1 (please read the forums for more details on how to use this vmware ) _vito Ubuntu release - currently being tested, enables you to use the HDDs directly plugged into your pc without the need for a SATA to usb cable. http://www.readynas.com/contributed/dek ... buntu9.rar Details on this alternative vmware can be found on this post (you'll need to review the instructions carefully): viewtopic.php?p=203653#p203653 dekkit Debian release - tested, a number of issues. my initial attempt that helped start this thread has been found to have quite a few issues and may not work for you, but can be found here if you would like to try: http://www.readynas.com/contributed/dekkit/VMwareDebian5.0%20-%20ext2Fuse.rar dekkit VM login info: User: vmplanet pass: vmplanet.net the acmtn version at this stage appears to be getting more reliable results for users. Unfortunately, I have not had time improve on my original dekkit release due to time constraints but if you would like to try please post your results. Dekkit release Notes: * You will need 8GB of free disk space once you have uncompressed the image * You will still need to execute some of the terminal commands to mount the drive (take precaution so you don't accidently blow away your data) * This VMware can access other windows file shares and can also be configured to host windows shares (see the docs for debian for more info on this) * To uncompress the file use WinRar: http://download.cnet.com/WinRAR-32-bit/ ... 07677.html or for non-windows platforms try: http://www.rarlab.com/download.htm * This image is a work in progress (WIP) so please post all errrors !!!!!. Dekkit release Usage- this may apply to the other versions (eg acmtn Login to the OS Access the terminal and enter the following once the HDD has been attached (take note that your /dev/c may differ): modprobe fuse vgscan vgchange -ay c mkdir /mnt/lvm ext2fuse /dev/c/c /mnt/lvm there is a delay in output but then .. "/dev/c/c is to be mounted at /mnt/lvm fuse-ext2 initialized for device: /dev/c/c block size is 16384" Dekkit Release Acknowledgements The original VMware image was found http://www.vmplanet.net/node/85 (before the various patches were applied - so feel free to drop them a donation), if you can improve this image by way of a script to make it even easier to use for us 'non-linux users' then please do so and share it back with the rest of usNUT on OSX 10.6 [Sharing a UPS with ReadyNAS and Computers]
First off: I can not take much credit for this post, the majority of this write up was done by Egg in this post "NUT on OS X (10.5.7)" which was priceless in my effort to get this matter solved. It looks Egg was pulling a lot of data from other members. I have made some edits to hopefully simplify the setup for you and have updated some information for 10.6. I also wanted to clarify what NUT is and why you might want it some day. Background NUT, is the Network UPS Tool: http://www.networkupstools.org/. When you plug a compatible UPS into ReadyNAS it's NUT that collects the data about the UPS status. Native OSX Support OSX 10.5 or later has some UPS feature built in when connecting a UPS to your Mac, but it doesn't have any built in support for shared UPS. You are up a creek if you have 2 Macs on a single UPS. APC UPS Software and 3rd Party Mac Software In addition, if you have an APC UPS you will notice that there is no software support post 10.4.x. APC is just letting OSX handled the effort. 3rd party tools like "APC Tracker" is rather expensive, does NOT seem to work on OSX 10.6, and might not be compatible with the ReadyNAS... I don't know. And as Egg pointed out in his post the Legacy APC solution (ACPUSPd) isn't compatible with the ReadyNAS. Other network cards for your APC UPS will cost you over $250 and from what I have read they aren't supported by the ReadyNAS either. Solution For the best Mac and ReadyNAS support you will want to setup NUT on your Macs. From my own research it's also seem like the only solution at present, but it's also the cheapest solution (free). The Goal Sharing a UPS with multiple Computer and ReadyNAS devices In this setup we are letting a ReadyNAS be the NUT server and the rest of the ReadyNAS's and Mac will be client of that ReadyNAS. The UPS will have a USB connection with the Server. All of the devices will get their power from the UPS. Lets start. Setup: 2x ReadyNAS NV+ 4.1.6, ReadyNAS Duo 4.1.6, MacMini (Core2 Duo) OSX Server (10.6.2), MacMini (Core Duo) OSX Server (10.5.8) all on a one UPS (APC Smart-UPS 1500 SUA1500RM2U ) ReadyNAS Duo acts as the NUT server, the 2 NV+ and 2 MacMini's are NUT client. Installing NUT In order to get NUT on the MacMini installed you will need to follow the following Steps: Download Fink (http://www.finkproject.org) At present ( Nov 14, 2009 there is no Fink binary for OSX. So you will need to download the source and build and install it. It's very easy and it's clearly defined on the site. Go to this URL for the directions to install Fink. http://www.finkproject.org/download/srcdist.php You can use all the default values, the only value that wasn't the default for me was I decided to build everything as 64bit. If you have a 32bit cpu you won't get the prompt. One of my MacMini's is a Core Duo cpu's is 32bit install while the other MacMini is Core2 Duo and is using the 64bit version, both are working just fine. The only thing that I should point out is after you run the shell installer ( /sw/bin/pathsetup.sh ) you need to quit Terminal and the reopen it for the changes to take. Download and Install "Fink Commander" ( http://finkcommander.sourceforge.net/ ) At present 0.5.5 is the most recent version and I would recommend just using the Universal Binary which is Snow Leopard friendly. Download and install Nut via "Fink Commander" At present there does not seem to be binary's for Nut for 10.6. I decided to let Fink compile the source for both Machines just because Fink Commander does all the work for your. Compiling the source just take a little more time. Setting up the upsmon.config by Egg [Updated by Infinite] In order to run only the NUT client (which is what I wanted) one needs to create the upsmon.config file in the /sw/etc/nut directory. Open Terminal: Note: if you prefer vi or mate (TextMate) as your text editor then feel free to use them instead nano cd /sw/etc/nut sudo cp upsmon.conf.sample upsom.conf sudo nano upsmon.conf Change the values according to dbott67s advice for WinNut and quit vi by writing first the changed content to the new file 'upsmon.conf'. Using the ReadyNAS to create a Network UPS for PCs In order to test that the NUT client actually works, use Terminal again and start upsmon manually: sudo upsmon The following is slightly altered advise based on http://boxster.ghz.cc/projects/nut/wiki/NutOnMacOSX. Now you should be able to see two upsmon processes in the Activity Monitor or use the following line in Terminal. Remember to ignore the 3rd reference to "grep". ps aux | grep upsmon In Terminal enter the following to test the connection from your Mac via your ReadyNAS to the UPS: sudo upsc UPS@[Your_ReadyNAS_IP] In the Terminal window you should get a response back based on the type of your UPS device. Automatic Startup [Updated for OSX 10.6 and general cleaner scripts - Infinite] For OS X it is necessary to navigate to /System/Library/StartupItems. I started by copying another directory tree (I used 'IPFailover') as a template for 'UPS' directory. To comply with the Apple standards all user Startup items should be located in /Library/StartupItems, we'll copy the item from the System folder to there user location. Then I changed to the 'UPS' directory and renamed the 'IPFailover' file to 'UPS' using the mv command. And last I edited the files in the 'UPS' directory. These are the terminal commands: cd /System/Library/StartupItems sudo cp -R IPFailover /Library/StartupItems/UPS cd /Library/StartupItems/UPS sudo mv IPFailover UPS sudo nano UPS Hint: If you don't have IPFailover then use one of the other folders from StartupItems Edit /Library/StartupItems/UPS with a text editor: cd /Library/StartupItems/UPS sudo nano UPS Now replace the the contents of /Library/StartupItems/UPS with the code: #!/bin/sh ## # UPS Monitor script # Using Network UPS Tools executables ## . /etc/rc.common FINK_BIN="/sw/sbin" StartService () { ConsoleMessage "Starting NUT (UPS Service)" if [ -n "`ps acxw | grep -i "upsmon" | awk {'print $1'}`" ]; then ConsoleMessage -f "NUT (UPS Service)" echo "Failed to start NUT (UPS Service): It is already running." exit 0 fi ${FINK_BIN}/upsmon & if [ -n "`ps acxw | grep -i "upsmon" | awk {'print $1'}`" ]; then ConsoleMessage -s "NUT (UPS Service)" echo "NUT (UPS Service) successfully started." exit 0 else ConsoleMessage -f "NUT (UPS Service)" echo "Failed to start NUT (UPS Service): Either the application has been deleted or it has no execution right." exit 0 fi } StopService () { ConsoleMessage "Stopping NUT (UPS Service)" if [ -z "`ps acxw | grep -i "upsmon" | awk {'print $1'}`" ]; then ConsoleMessage -s "NUT (UPS Service)" echo "Failed to stop NUT (UPS Service): It is not running." exit 0 fi ${FINK_BIN}/upsmon -c stop if [ -n "`ps acxw | grep -i "upsmon" | awk {'print $1'}`" ]; then ConsoleMessage -s "NUT (UPS Service)" echo "Failed to stop NUT (UPS Service) out of unknown reason." exit 0 else ConsoleMessage -s "NUT (UPS Service)" echo "NUT (UPS Service) successfully stopped." exit 0 fi } StopServiceForcefully() { ConsoleMessage "Stopping NUT (UPS Service)" if [ -z "`ps acx | grep -i "upsmon" | awk {'print $1'}`" ]; then echo "Failed to stop NUT (UPS Service): It is not running." else kill -kill `ps acxw | grep -i "upsmon" | awk {'print $1'}` if [ -n "`ps acxw | grep -i "upsmon" | awk {'print $1'}`" ]; then echo "Failed to stop NUT (UPS Service) out of unknown reason." else echo "NUT (UPS Service) successfully stopped." fi fi } RestartService() { ConsoleMessage "Trying to restart NUT (UPS Service)." StopService StartService exit 0 } RunService "$1" Now edit the StartupParamerters.plist via: cd /Library/StartupItems/StartupParamerters.plist sudo nano UPS Replace it's contents with the following code. <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>Description</key> <string>UPS Monitor client (NUT)</string> <key>Messages</key> <dict> <key>start</key> <string>Starting UPS Monitor client (NUT)</string> <key>stop</key> <string>Stopping UPS Monitor client (NUT)</string> </dict> <key>OrderPreference</key> <string>None</string> <key>Provides</key> <array> <string>UPS</string> </array> <key>Requires</key> <array> <string>Resolver</string> </array> </dict> </plist> That's it! Now the automatic start-up should work. Conclusion At this point I have the two ReadyNAS NV+ and the two MacMini's communicating via NUT to the ReadyNAS Duo which is connected to the UPS via USB. I have restarted my MacMini's verified that the startup scripts are running. All is left is to simulate a power failure. Here is the output I get from one of my MacMini's that's pulling this data from the ReadyNAS Duo: bash$ sudo uspc UPS@192.168.1.108 sudo: uspc: command not found miniserver:UPS admin$ sudo upsc UPS@192.168.1.108 battery.charge: 100 battery.chemistry: PbAc battery.runtime: 20340 battery.voltage: 27.7 driver.name: hidups driver.parameter.lowbatt_pct: 10 driver.version: 2.0.5 ups.mfr: APC ups.model: Smart-UPS 1500 RM ups.serial: [The Device S/N] ups.status: OL Enjoy! Resources NUT on OS X (10.5.7) Using the ReadyNAS to create a Network UPS for PCs Smart-UPS 1500 XLM, PowerChute UDP/3052 Client Network UPS Tools (NUT) on Mac OS X (10.4.10) Mac Dev Center: Creating a Startup ItemFrom the Netgear Blog - Data Explosion
When it comes to choosing a networking and storage setup, small and medium businesses set their priorities in a very straightforward way: It needs to simply work It should be affordable It needs to be easy to install and use In our latest blog Netgear's Vice President of SMB Product Line Managment - Richard Jonker lays out clear arguments for controlling for these priorities with a local ReadyNAS appliance vs. storing all your files in the cloud or local storage. Check out the blog post here: Did you solve or are planning to solve your data issue with a ReadyNAS? Let us know in the comments below.My ReadyNAS does not show up as a Network Computer
Can someone tell me if the ReadyNAS is supposed to show up as a Network Computer? I can mount it as a Network Drive but no matter what setting I have tried it will not show up as a Network attached computer. Any help would be greatly appreciated!SolvedSpec Sheets and Replacement Parts
I figured that it might be a good idea to create a thread where people might be able to obtain information about Infrant-branded ReadyNAS products that may no longer be produced or for products that are out of warranty. Owners of Netgear-branded products should contact Netgear support. Anyhow, here are a few links to existing threads that offer solutions, spec sheets, part numbers or third-party replacement items for the older Infrant-branded line-up. Feel free to add your own findings to the list. -Dave Spec Sheets: ReadyNAS 600: http://www.infrant.com/download/ReadyNAS600 ReadyNAS X6: http://www.infrant.com/download/ReadyNAS_X6 ReadyNAS NV: http://www.infrant.com/download/ReadyNAS_NV ReadyNAS NV+: http://www.infrant.com/download/ReadyNAS_NV+ ReadyNAS 1100: http://www.infrant.com/download/ReadyNAS1100 Cross-reference Table of Duo, NV+, 1100 and Pro: From this thread: viewtopic.php?f=24&t=18617#p100422 http://www.bott.ca/files/ReadyNAS_comparison.xls Determining Revision Number for ReadyNAS 600: faq.php#What_ReadyNAS_600_revision_do_I_have%3F Replacing PSU with 3rd Party Power Supply: If you are having difficulty locating a replacement PSU from Netgear, you can elect to purchase a PSU from a third party, such as Enhance. The NV/NV+ PSU require modification from the standard ATX wiring. A number of users have posted there instructions in thread #1 (below). TrophyGeek & kspades have also posted photos. 1. viewtopic.php?f=11&t=13492&st=0&sk=t&sd=a 2. viewtopic.php?f=7&t=18618 As for the 600 & X6 ReadyNAS, the device uses a standard connector ATX PSU (although the form-factor is different). The only difference between the A & B models is that the 600 Rev. A requires a 20-pin ATX with 4 SATA connections, similar to something like this: viewtopic.php?f=7&t=18618&p=100893#p100893 The original PSU for the X6/600a/600b was made by Enhance Power (http://www.enhanceusa.com) and was model # ENP-2222F. The A revision of the 600 had 4 SATA connectors, but it carried the same model # as the X6/600b (see pics below by chirpa). ReadyNAS PSU Pin-out Information: http://www.infrant.com/download/ReadyNAS_PSU_pinout.pdf Official NV/NV+ Power Replacement Instructions: faq.php#How_do_I_replace_the_stock_power_supply_on_the_ReadyNas_NV%2FNV%2B%3F http://www.readynas.com/download/docume ... %20PSU.pdf Parts List: Here are some other part numbers listed from http://www.archive.org's cache of shop-infrant.com: MAJOR DISCLAIMER: This is cached version of the site as it existed in August of 2007. Parts, prices, availabilty may have changed. This is for entertainment purposes only. :) Parts and accessories Lockable disk tray for Infrant ReadyNAS NV+ Part# RNV2-DTR1 RNV2-DTR1 Price:$25.00 Chassis fan for Infrant ReadyNAS NV+, 12VDC, 92mm Part# RNV2-FAN1 RNV2-FAN1 Price:$20.00 AC power supply for Infrant ReadyNAS NV+, 100-240 VAC, 50/60 Hz Part# RNV2-PSU2 RNV2-PSU2 Price:$120.00 AC Power Supply Unit for ReadyNAS 1100, 100-240VAC, 50/60 Hz Part# RN1100-PSU1 RN1100-PSU1 Price:$140.00 Hotswapple Disk Tray for ReadyNAS 1100, Single Part# RN1100-TRAY1 RN1100-TRAY1 Price:$25.00 Chassis Cooling Fan for ReadyNAS 1100 Part# RN1100-FAN1 RN1100-FAN1 Price:$15.00 Optional 26" Rack Mount Sliding Rail for ReadyNAS 1100. Part# RN1100-SR26 RN1100-SR26 Price:$60.00 1GB SODIMM for NV and NV+ Part# 1GBSODIMM 1GB SODIMM for NV and NV+ Price:$140.00 Cross flow fan for Version A ReadyNAS 600/X6 Part# RN06-FAN1 Cross flow fan for Version A ReadyNAS 600/X6 Price:$20.00 120mm Fan Retrofit Kit for ReadyNAS 600/X6 Version B. Part# RN06-B120KIT ReadyNAS 600/X6 Version B 120mm Fan Retrofit Kit Price:$40.00 Infrant ReadyNAS 600/X6 (Version A) Power Supply Unit Part# RN06-PSU1 ReadyNAS 600/X6 (Version A) Power Supply Unit Price:$60.00 Infrant ReadyNAS 600/X6 (Version B) Power Supply Unit Part# RN06-PSU2 ReadyNAS 600/X6 (Version B) Power Supply Unit Price:$60.00 Pre-configured 750GB HDD with Disk Tray for NV/NV+ Part# B750640NS 750GB Pre-configured Seagate ES HDD for ReadyNAS NV/NV+ Price:$470.00 Pre-configured 500GB HDD with Disk Tray for NV/NV+ Part# B500630NS 500GB Pre-configured Seagate ES HDD for ReadyNAS NV/NV+ Price:$240.00 Pre-configured 250GB HDD with Disk Tray for NV/NV+ Part# B250620NS 250GB Pre-configured Seagate ES HDD for ReadyNAS NV/NV+ Price:$130.00 Pre-configured 400GB HDD with Disk Tray for NV/NV+ Part# B400620NS 400GB Pre-configured Seagate ES HDD for ReadyNAS NV/NV+ Price:$195.00 Chassis Cooling Fan for ReadyNAS 1000S (single) Part# RN1000S-FAN1 RN1000S-FAN1 Price:$10.00 Chassis Cooling Fan for ReadyNAS 1000S (dual fan w/single connector) Part# RN1000S-FAN2 RN1000S-FAN2 Price:$10.00 ReadyNAS NV/NV+ Disk Installation Screws. Part# RNV-SCREW ReadyNAS NV/NV+ Disk Installation Screws. Price:$5.00 -DaveMemory upgrade of a ReadyNAS NV+
Biker wants to share some of his own experience from a memory upgrade of his ReadyNAS NV+. He could'nt find this documented anywhere. First some tips: There is only one slot for the memory stick. The original memory stick, as delivered from Infrant, will become redundant. And most likely take up place in one of your drawers for ever. Don't buy a 512MB stick, thinking that you'll add another 512MB later. Won't work. If you aim for 1GB of memory, get it right away. Almost anyone that can handle a Phillips screwdriver will be able to do the upgrade. A simple HowTo: Shutdown the NV+ and power it off. Disconnect all cables. Remove the four phillips screws on the back side. They will release the two side panels. Pull the side panels to rear of the unit, about 1/4" or some 6-7 millimeters. Carefully remove the side panels. Remove the four phillips screws holding the top panel and remove the panel. You will find the existing memory stick under the top panel. Carefully bend the two plastic arms on the short sides of the memory stick to the sides. Don't brake them! Help the existing stick to pop up. Don't try to pull the stick backwards. It will pop up to almost 45 degrees. Once in the 45 degrees position, you can pull the stick out. It requires a very small amount of force to convince the stick to come out. Be careful. Store away the old stick in your drawer for ever. Push the new stick in the slot, respecting the angle. Make sure it seats correctly. There is a tab betwen the contacts making it impossible to install it upside-down. Once correctly seated, carefully push it down until the two plastic arms grab the stick. You may need to help the plastic arms to fully get in place. Remount the top panel and the two side panels. Reconnect your cables and power on. Verify the new memory amount in FrontView. As Biker already told you, be careful! Biker won't accept any responsibility of you foul up.Using the ReadyNAS to create a Network UPS for PCs
The ReadyNAS can issue "UPS commands" to other devices, effectively allowing your UPS to be networked and shutdown client PCs. I've got my UPS connected to the NAS and setup using the procedure below. Basically, you need to install WinNUT on your PC. You also need to configure your ReadyNAS to communicate with the PC: 1. Connect the UPS to the NAS via USB. 2. Login to the web interface of your NAS. 3. Click SYSTEM --> POWER. 4. Scroll down to the UPS section. 5. Check the box that says "Enable network sharing of attached UPS" 6. Enter the IP address of the PC or the subnet (i.e. 192.168.1.0/24). 7. Edit the WinNUT configuration file (typically C:\Program Files\WinNUT\upsmon.conf). In my case, my ReadyNAS uses a static IP (192.168.1.2) and my computers use DHCP on the 192.168.1.0/24 subnet). I've edited out most author comments, just leaving the values I used: # -------------------------------------------------------------------------- # MONITOR <system> <powervalue> <username> <password> ("master"|"slave") MONITOR UPS@192.168.1.2 1 monuser pass slave # -------------------------------------------------------------------------- # MINSUPPLIES <num> MINSUPPLIES 1 # -------------------------------------------------------------------------- # NOTIFYCMD <command> NOTIFYCMD "c:\\Program Files\\WinNUT\\alertPopup.exe" # -------------------------------------------------------------------------- # POLLFREQ <n> POLLFREQ 5 # -------------------------------------------------------------------------- # POLLFREQALERT <n> POLLFREQALERT 5 # -------------------------------------------------------------------------- # HOSTSYNC - How long upsmon will wait before giving up on another upsmon HOSTSYNC 15 # -------------------------------------------------------------------------- # DEADTIME - Interval to wait before declaring a stale ups "dead" DEADTIME 15 # -------------------------------------------------------------------------- # NOTIFYMSG - change messages sent by upsmon when certain events occur NOTIFYMSG ONLINE "UPS %s is getting line power" NOTIFYMSG ONBATT "Someone pulled the plug on %s" NOTIFYMSG LOWBATT "UPS has a low battery" NOTIFYMSG SHUTDOWN "The system is being shutdown" # -------------------------------------------------------------------------- # NOTIFYFLAG - change behavior of upsmon when NOTIFY events occur NOTIFYFLAG ONLINE EXEC NOTIFYFLAG ONBATT EXEC NOTIFYFLAG LOWBATT EXEC NOTIFYFLAG SHUTDOWN EXEC # -------------------------------------------------------------------------- # RBWARNTIME - replace battery warning time in seconds RBWARNTIME 43200 # -------------------------------------------------------------------------- # NOCOMMWARNTIME - no communications warning time in seconds NOCOMMWARNTIME 300 # -------------------------------------------------------------------------- # FINALDELAY - last sleep interval before shutting down the system FINALDELAY 5 Here's a couple of screenshots from my PC when the UPS gets disconnected: Read this thread for more information/background on networking a UPS device: viewtopic.php?t=16348 -DaveHow to control fanspeed on a RN104
On special request, here is a workaround for controling the fanspeed of the RN104 ( most likely the same on a 102). For this you will have to SSH in to the NAS. Thanks to Moseleypj for doing the work. First you create a file in /root with the name fanoveride. Put the following lines in to the file. #!/bin/bash ## Variables ## FANPWMPATH=/sys/devices/platform/mv64xxx_i2c.0/i2c-0/0-003e/pwm1 FANSPEEDPATH=/sys/devices/platform/mv64xxx_i2c.0/i2c-0/0-003e/fan1_input CORETEMPPATH=/sys/devices/platform/axp-temp.0/temp1_input MAXFAN=100 # Maximum operable speed MINFAN=0 # Minimum operable speed MINPWM=75 # PWM Limit MAXPWM=255 # PWM Limit MINTEMP=35 # Min temp -> Fan slowest MAXTEMP=75 # Max temp -> Fan fastest NEWSPEED=50 # Initial fan speed (%) ## Functions ## function getReadings { FANPWM=$(cat $FANPWMPATH) FANSPEED=$(cat $FANSPEEDPATH) CORETEMP=$(cat $CORETEMPPATH) } function setFanSpeed { if [ $NEWSPEED -lt $MINFAN ]; then NEWSPEED=$MINFAN fi if [ $NEWSPEED -gt $MAXFAN ]; then NEWSPEED=$MAXFAN fi NEWPWM=$(expr $MAXPWM - $MINPWM) NEWPWM=$(expr $NEWPWM \* $NEWSPEED) NEWPWM=$(expr $NEWPWM / 100) NEWPWM=$(expr $NEWPWM + $MINPWM) echo $NEWPWM > /sys/devices/platform/mv64xxx_i2c.0/i2c-0/0-003e/pwm1 } function calcFanPercent { TEMPRAN=$(expr $MAXTEMP - $MINTEMP) TEMPREL=$(expr $CORETEMP - $MINTEMP) TEMPREL=$(expr $TEMPREL \* 100) TEMPPER=$(expr $TEMPREL / $TEMPRAN) NEWSPEED=$TEMPPER } ################################################################### echo "Automatically controlling fan speed..." while true do getReadings echo "Temp: $CORETEMP C FAN: $NEWSPEED% [$FANSPEED RPM] [$FANPWM]" calcFanPercent setFanSpeed sleep 10 done ################################################################### Now chmod 755 /root/fanoveride =================== Now create a file in /etc/init.d with the name fanoveride. Put the following lines in to this script #!/bin/sh ### BEGIN INIT INFO # Provides: FanOveride # Required-Start: $local_fs $network $named $time $syslog # Required-Stop: $local_fs $network $named $time $syslog # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Description: FanOveride overides the default ReadyNAS fan control ### END INIT INFO SCRIPT=~/fanoveride RUNAS=root PIDFILE=/var/run/fanoveride.pid LOGFILE=/var/log/fanoveride.log start() { if [ -f /var/run/$PIDNAME ] && kill -0 $(cat /var/run/$PIDNAME); then echo 'Service already running' >&2 return 1 fi echo 'Starting service.' >&2 local CMD="$SCRIPT &> \"$LOGFILE\" & echo \$!" su -c "$CMD" $RUNAS > "$PIDFILE" echo 'Service started' >&2 } stop() { if [ ! -f "$PIDFILE" ] || ! kill -0 $(cat "$PIDFILE"); then echo 'Service not running' >&2 return 1 fi echo 'Stopping service.' >&2 kill -15 $(cat "$PIDFILE") && rm -f "$PIDFILE" echo 'Service stopped' >&2 } uninstall() { echo -n "Are you really sure you want to uninstall this service? That cannot be undone. [yes|No] " local SURE read SURE if [ "$SURE" = "yes" ]; then stop rm -f "$PIDFILE" echo "Notice: log file is not be removed: '$LOGFILE'" >&2 update-rc.d -f <NAME> remove rm -fv "$0" fi } case "$1" in start) start ;; stop) stop ;; uninstall) uninstall ;; retart) stop start ;; *) echo "Usage: $0 {start|stop|restart|uninstall}" esac Now make sure it is executable and starts on boot: chmod +755 /etc/init.d/fanoveride update-rc.d fanoveride defaults To control it manually: service fanoveride start service fanoveride stop In my case i have the min and max temp in the script set to 35 and 75 degrees to create a nice fan response wich is not to nervous. If you set it between 40 and 65 the regulating becomes more agressive. Just play with the values for your needs.