NAS-Portal Anzeige
Zurück   NAS-Portal > Hardware > NAS Geräte (nach Hersteller) > Raidsonic > English Board > Packages, Tools and Addons

Antwort
 
Themen-Optionen Ansicht
Alt 12.01.2008, 23:00   #1
skara
Vice Admiral
 
Registriert seit: 08.12.2007
Beiträge: 527
Abgegebene Danke: 4
Erhielt 17 Danke für 3 Beiträge
skara wird schon bald berühmt werden
Standard userscript 0.21 08/01/25 - permanently include your mods

Version 0.21 is just down below.
Hello,

this is a little package giving you the possibility to insert in an easy way own modifications at the NAS. As long as there's no alternative firmware or the promised development tools from Raidsonic i suppose it's quite useful.
The script will run different scripts at every NAS-boottime, so all your modifications will last even after poweroff.
It's modular and indented to be community supported. I won't give you the scripts (oh, maybe i will) but am willing to correct errors on "userscript". So please report any failures here and i'll try to fix it.

Installation:
Place package into public/applications/new_software/ and reboot. This will create a new folder public/applications/userscript/

Content:
init - is started at NAS-Boot and does ...
init.us - ... enable starting this. It runs after all other bootstuff is done, so your mods will be the last who come and not overriden by the flashcontent
example/* - some examples (see below), more to come from community
scripts/ - here your scripts have to be placed. pure textfiles are enough (they will get execute-bit automaticaly). Two conditions: it must be bash-scripts (including "#!/bin/sh") and the name must end with ".sh" eg "proftpd.sh"
config/ - it's indented to contain your config-files, which will be writen to the NAS (look at included proftp-script)

Examples included:
linkhddapp.sh / linkroot.sh - makes symlinks of /usr/hddapp/ and / under userscript/hddapp/ and userscript/root/ - useful at development. The config-files for the NAS-services are located under hddapp/etc/, so it's good for building your own configs.

unlinkhddapp.sh / unlinkroot.sh - what to you thing? it removes the links

proftpd.sh - exchanges ftpserver-settings with userscript/config/proftpd.conf and restarts the ftpserver. Obviously needs a conf located there. Use one of these at userscript/examples/config/. CAUTION: Get the right one depending on your system - eg. if your system is located at /mnt/md1 (raid-systems), get proftpd.conf.md1.
copy your needed conf to userscript/config/ and rename it to proftpd.conf!

Download at RapidShare (deleted - please use Version 0.2)

greetz
skara

PS: Some short "thanks" shows me, there's an interessed on it at our nongerman visitors. So if you want us to write more english give any feedback (even about our lack of english knowledge )

Geändert von skara (05.05.2008 um 11:17 Uhr) Grund: fixed link to latest version
skara ist offline   Mit Zitat antworten
Folgende 6 Benutzer sagen Danke zu skara für den nützlichen Beitrag:
daniel.pool (12.06.2009), harvie (06.03.2008), muttley (14.07.2009), Richard (13.03.2009), Zivier (11.04.2008), zobojoe (05.07.2008)
Alt 15.01.2008, 00:08   #2
skara
Vice Admiral
 
Registriert seit: 08.12.2007
Beiträge: 527
Abgegebene Danke: 4
Erhielt 17 Danke für 3 Beiträge
skara wird schon bald berühmt werden
Standard

New Version 0.21
/edit: v0.21 is a minor fix to v0.2. Error in examples/conf/proftp.conf.md1 is fixed. No need to get the new version, if you don't have RAID or don't use my exampleconfig!

Changes:
init.us is called without backup_button-stuff (but at the end though).

New Example:
example/path - changes $PATH-variable to fit your own bin-directories. move this script to userscript/scripts/
example/config/path - the needed ressourcefile. insert your wished path. multiple pathes are possible. simply separat by : - eg "/bin:/sbin". This file has to be moved to userscript/config

greetz
skara
skara ist offline   Mit Zitat antworten
Alt 16.01.2008, 20:43   #3
Zuah
Cadet
 
Registriert seit: 08.12.2007
Beiträge: 11
Abgegebene Danke: 0
Erhielt 0 Danke für 0 Beiträge
Zuah
Standard

Nice work Skara. It's good to see that the community is improving the SW on NAS4220. Raidsonic support is next to nothing.

Could some one who speaks German translate the spindown fix (with USB flash drive) and other useful scripts to English. I have used Babel Fish but the translation isn't so good
Zuah ist offline   Mit Zitat antworten
Alt 16.01.2008, 23:19   #4
gmeyer
Experte
 
Registriert seit: 26.12.2007
Ort: Mutterstadt
Beiträge: 1.139
Abgegebene Danke: 6
Erhielt 14 Danke für 3 Beiträge
gmeyer wird schon bald berühmt werden
Standard

Hi

1.) install the actual firmware (2.6.0.IB.1.RS.1)

2.) telnet to box, login as root
(if telnet-server not enabled, enable it with http://ip-of-the-box/cgi/telnet/telnet.cgi )

3.) prepare USB-Stick
insert USB-Stick, should be automatically detected as /dev/sda1 and mounted under /mnt/usb1 (check with "mount").
format it with ext2:
Code:
umount /dev/sda1 
mke2fs /dev/sda1 
mount /dev/sda1 /mnt/usb1
4.) create script:
"cd /mnt/md1/public"
"vi SpindownFix.sh"
switch to insert-mode ("i"), copy&paste the following code:
Code:
Code:
#!/bin/sh 
# IB-NAS4220: move /system to USB-Stick to allow HD spindown 
# 
# History: 
# 04.12.2007 - V1.0 
# 06.01.2008 - V1.1 
#            - ensure propper mounts at start 

#prepare to umount /system 
echo "stopping tasks ..." 
killall lpd 
killall crond 
/system/hddapp/etc/rc.d/S80samba.sh stop 
/system/hddapp/etc/rc.d/S85nfs.sh stop 
/system/hddapp/etc/rc.d/S91proftpd.sh stop 
killall slotDiskButton 
killall mdadm 

# ensure proper mounts at start 
echo "ensure proper mounts at start ..." 
sync 
umount /dev/md0 
umount /dev/sda1 
mount /dev/md0 /system 
mount /dev/sda1 /mnt/usb1 
#mount 

#delete USB-Stick and copy /system to USB-Stick 
echo "copying /system to USB-Stick ..." 
rm -rf /mnt/usb1/* 
(cd /system; tar cf - .) | (cd /mnt/usb1; tar xf -) 
sync 

#umount /system and mount USB-Stick 
cd / 
echo "remount /system ..." 
umount /mnt/usb1 
umount /system 
mount /dev/sda1 /system 
#mount 

#restart tasks 
echo "restarting tasks ..." 
/system/hddapp/bin/lpd 
/usr/sbin/crond 
/system/hddapp/etc/rc.d/S80samba.sh start 
/system/hddapp/etc/rc.d/S85nfs.sh start 
/system/hddapp/etc/rc.d/S91proftpd.sh start 
/usr/sausalito/handlers/base/raid/slotDiskButton 
mdadm --monitor --program=/usr/sausalito/handlers/base/raid/monitor --delay=5 /dev/md0 /dev/md1 & 

#disable bt_scheduling_start in crontab 
crontab -l | sed 's/\*\/5/#\*\/5/' > /var/tmp/cronjobs 
crontab /var/tmp/cronjobs 

# set HD spindown to 5 minutes 
hdparm -S60 /dev/hda 
hdparm -S60 /dev/hdb
press <ESC>, ":wq" to save

5.) "chmod 755 SpindownFix.sh" to make script exceutable

6.) execute "/mnt/md1/public/SpindownFix.sh", check output.

I hope, it's better than "Babel Fish" ;-)

Regards,
Gerhard
__________________
NAS1: IB-NAS2000, Rev. B (verkauft)
HDD: 1x500GB Seagate ST3500630A
NAS2: IB-NAS4220-B, Board Rev. V1.2

HDD: 2x500GB Seagate ST3500630AS, Raid1, ext3
FW: 2.6.3.2
Dauerläufer, Spindown ohne USB-Stick ok
NAS3: IB-NAS4220-B, Board Rev. V1.2
HDD: 2x160GB Seagate ST3160815AS, Raid1, ext3
FW: 2.6.3.2
Testgerät, Spindown ohne USB-Stick ok
NAS4: Synology DS209+, Board Rev. ?
HDD: 2x1TB Seagate ST31000340AS, HDD-FW: SD1A, Raid1, ext3
FW: DSM 2.2-959
LAN:
2 x D-Link 8Port Gigabitswitch DGS-1008D
gmeyer ist offline   Mit Zitat antworten
Alt 20.01.2008, 22:47   #5
skara
Vice Admiral
 
Registriert seit: 08.12.2007
Beiträge: 527
Abgegebene Danke: 4
Erhielt 17 Danke für 3 Beiträge
skara wird schon bald berühmt werden
Standard

Zitat:
Zitat von Zuah
Nice work Skara. It's good to see that the community is improving the SW on NAS4220. Raidsonic support is next to nothing.
Could some one who speaks German translate the spindown fix (with USB flash drive) and other useful scripts to English.
There are no other scripts at the moment. Noone else is willing to create one or to share it's knowledge - i don't know.
My sample should be enough for your own investigations. If you do any others, feel free to share it here.

greetz
skara
skara ist offline   Mit Zitat antworten
Alt 08.03.2008, 18:01   #6
xdegenev
Cadet
 
Registriert seit: 27.01.2008
Beiträge: 6
Abgegebene Danke: 0
Erhielt 0 Danke für 0 Beiträge
xdegenev
Standard

Thanks to blkhawk from #nas4220 on freenode which provide it its script ot me. I update it a bit as I found it sexy.

This remove the bit_torrent client to access HDD every 5 min. And allow to spindown the HDD if needed.

Add using the userscript package the following script:

#!/bin/sh
crontab -l | grep -v bt_scheduling | crontab -

Warning: No more bittorrent after it !
xdegenev ist offline   Mit Zitat antworten
Alt 12.03.2008, 13:15   #7
frankmcg
Cadet
 
Registriert seit: 21.02.2008
Beiträge: 39
Abgegebene Danke: 0
Erhielt 0 Danke für 0 Beiträge
frankmcg befindet sich auf einem aufstrebenden Ast
Standard

Skara,
Are you able to explain how I can combine using your userscript with the spindown fix? It seems that with the system mounted on USB I cannot make any changes to the system, including the web interface (things won’t save).

Is it the case that with system mounted on USB, I need to unplug USB, boot as normal, make the changes, save and reboot. Then reformat/copy system back onto USB as set out above? Is there a quicker way to do this eg what steps can I skip if I already have the USB system working?
frankmcg ist offline   Mit Zitat antworten
Alt 12.03.2008, 21:59   #8
skara
Vice Admiral
 
Registriert seit: 08.12.2007
Beiträge: 527
Abgegebene Danke: 4
Erhielt 17 Danke für 3 Beiträge
skara wird schon bald berühmt werden
Standard

gmeyer - he who worked out this solution - actually translated it's knowledge into the wiki
It includes the necessary steps for including it with userscript.

greetz
skara
__________________
Ob jemand das Wiki oder die Suche benutzt hat, merkt man an den Fragen.
Ob die Lösung dort drin steht, merkt man an den Antworten (3501051808)


Fragen nach sinnvollen Begriffen zum Suchen werden immer beantwortet. Um alles vorgekaut zu bekommen teile ich aber auf Anfrage gerne meinen Stundensatz mit!
skara ist offline   Mit Zitat antworten
Alt 13.03.2008, 15:35   #9
frankmcg
Cadet
 
Registriert seit: 21.02.2008
Beiträge: 39
Abgegebene Danke: 0
Erhielt 0 Danke für 0 Beiträge
frankmcg befindet sich auf einem aufstrebenden Ast
Standard

Thanks, although if I'm reading that correctly it just says that with the system mounted on USB you need to do everything twice, once with the stick and once without.

My problem seems to be that it doesn't save when mounted from the stick at all, so each time I make a change I have to remove the stick, reboot, make the change, reboot, insert stick, reformat then recopy the file system across!

Is there an easier way is what I'm asking! If this is what everyone else is doing then I will just up with it!
frankmcg ist offline   Mit Zitat antworten
Alt 13.03.2008, 21:19   #10
skara
Vice Admiral
 
Registriert seit: 08.12.2007
Beiträge: 527
Abgegebene Danke: 4
Erhielt 17 Danke für 3 Beiträge
skara wird schon bald berühmt werden
Standard

Now i understand.
As far as i know all the changes should be done on the stick, if you use this script. (But i'm not sure)

But this problem seems to be offtopic in here. Please open a new thread if the problem resists.

greetz
skara
__________________
Ob jemand das Wiki oder die Suche benutzt hat, merkt man an den Fragen.
Ob die Lösung dort drin steht, merkt man an den Antworten (3501051808)


Fragen nach sinnvollen Begriffen zum Suchen werden immer beantwortet. Um alles vorgekaut zu bekommen teile ich aber auf Anfrage gerne meinen Stundensatz mit!
skara ist offline   Mit Zitat antworten
Antwort

Lesezeichen

Stichworte
config, configuration, modification, package, settings, userscript

Themen-Optionen
Ansicht

Forumregeln
Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.

Gehe zu

Ähnliche Themen
Thema Autor Forum Antworten Letzter Beitrag
IB-NAS4220-B userscript 0.21 - 25.01.- Übernahme von Nutzereinstellungen skara Packages, Tools und Erweiterungen 42 28.02.2009 17:13
IB-NAS4220-B Formatierung von Platte bleibt bei 0% saschapi Komplexe Lösungen und Erfahrungsberichte 23 21.02.2008 18:46
IB-NAS4220-B Interview mit Raidsonic am 17.01.08 daddel80 Infos 17 14.02.2008 11:35
IB-NAS4220-B UserScript l Hilfe Skopecek Packages, Tools und Erweiterungen 11 11.02.2008 14:19



Alle Zeitangaben in WEZ +2. Es ist jetzt 02:30 Uhr.


Powered by vBulletin® Version 3.8.4 (Deutsch)
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Powered by vBCMS® 1.3.0 ©2002 - 2010 vbdesigns.de