FreeBSD 7 NAS for Dummies

Pagina: 1
Acties:
  • 5.828 views sinds 30-01-2008
  • Reageer

Anoniem: 225708

Topicstarter
Beste allemaal,

Dankzij de hulp van een aantal gewaardeerde forum members heb ik mijn NAS kunnen installeren op basis van FreeBSD 7. Omdat her en der van alles staat geschreven en om de heren enigszins te ontlasten van allerlei newbie vragen (zoals mezelf }:O ) leek het me wel handig als ik ook voor de overige tweakers een guide maak.

Deze guide is in het engels opgesteld zodat eenieder hiervan kan profiteren. Ik zal de guide later aanvullen met de Netatalk installatie + Samba.

Ondanks het feit dat deze guide met veel zorg is opgesteld kan het zijn dat er fouten in staan. Gelieve even te posten en ik zal de aanpassing doorvoeren.

Heel veel credit gaat in ieder geval naar _/-\o_ Enlightenment _/-\o_ en Itsacon _/-\o_


DUMMIES GUIDE to installing FreeBSD 7 + NAS featuring AppleTalk and SAMBA

Many thanks go to Enlightenment & Itsacon for their support and most valuable input. It wouldn't have been possible without them!

====================
installation of FreeBSD 7
====================

# burn FreedBSD 7 to CDR from iso image available here: www.freebsd.org/where.html (Select the ISO link under FreeBSD which corresponds with your platform.)

# Startup from CD

# Select option 1: Boot FreeBSD [Default]

# To review the boot process press "scroll lock" on your keyboard and use Page Up / Page Down. Take note of the Hard Disk labels

# Select the region you're in

# Select keymap (for most people USA ISO will be ok)

# In the main Sysinstall menu select the "Standard" installation option

# Select OK when presented with the next message

# Select the disk where you want to install FreeBSD first (the Hard Disk labels correspond with what you saw during the boot process)

# Ignore the geometry warning and select OK

# If you have multiple disks and you want to create a partition on disk 1 for FreeBSD and the remainder for the Raid5 array, then please proceed.

# Select "C" [Create slice] to create a "slice" or partition for FreeBSD

# In the next dialogue enter the size you need. For example "4G" will create a 4 gigabyte slice which is pretty much sufficient for a nice install. Using the TAB key select "OK" and press ENTER

# In the following dialogue you need to enter the partition type. In this case we want to set up FreeBSD on this slice so select "OK" to accept the default [165] FreeBSD partition

# Using the arrow keys select the FreeBSD slice and select "S" [Set bootable] to enable FreeBSD to startup from this partition. Notice the "A" flag in the last column.

# Select the largest unused partition with the arrow keys and select "C" [create slice]

# In the next dialogue just press ENTER to accept. This will allocate all of the remaining space to the remaining partition on this disk.

# In the next dialogue enter the number for the partition type you need. This can be 6 for FAT, 131 for ext2fs or 4 if you want a unix partition for OSX. You can find a complete list of available partition types here:

# press "Q" to finish

# In the next dialogue select "Standard" if you are not running any other OS on the system and have a requirement to startup using another OS. Select "OK"

# You're now back to the screen where you can setup the rest of your disks. You can leave them for what they are but my experience is that it's best to create a partition and a filesystem so it's properly recognized later on.

# Select your 2nd disk using the arrow keys and press ENTER (repeat these steps for any remaining disks)

# Ignore the geometry warning and select OK

# Select "C" [Create slice] after having selected the unused partition with the arrow keys

# In the next dialogue select OK to assign all of the available space to this partition

# In the next dialogue enter the number for the partition type you need. This can be 6 for FAT, 131 for ext2fs or 4 if you want a unix partition for OSX.

# Select "Q" [Finish] to accept the changes

# In the next dialogue select "Standard" if you are not running any other OS on the system and have a requirement to startup using another OS. Select "OK"

# Repeat for the remaining disks

# When you have finished setting up your disks use the TAB key to select OK - next press ENTER to confirm. If all is well all of your disks will have an "X" in the box indicating that they have been configured

# Accept the message

# You're now presented with the DISK LABEL EDITOR. On the top of the screen it lists the first partition which we configured earlier for FreeBSD. In my case this is called ad4s1 since my first SATA disk is called ad4 - yours may be called differently.

# Select "A" [Auto Defaults] to create the various mount points.

# Select "Q" [Finish] to accept the changes.

# You're now presented with the Distribution Menu. Select the kind of distribution you want to install. In this particular case the "Developer" option will do since we're not going to play any games on our Nas device.

# You're now presented with the message asking to install the FreeBSD ports collection. Most likely they're not included on your CD image so we're going to select "NO" for now and download them later.

# You are presented again with the Distribution Menu. Use the TAB key to select "OK" and press ENTER

# In the next dialogue select the installation media you want to use. Since we've booted from the CD this is the preferred (and quickest!) option, therefore select option 1 and press ENTER

# You're now presented with a last dialogue in which you need to accept the configuration options. This is your last chance to bail out and be a chicken. Otherwise select OK and install FreeBSD on your system.

# This will take a little while so now is the time to get yourself a cup of hard earned coffee!

# CONGRATULATIONS > you have now installed FreeBSD on your system. Select OK to move on and answer some configuration questions.

# Would you like to configure ethernet? > select yes

# Select your ethernet adapter. In my case this is nfe0. Press ENTER to confirm.

# Do you want to configure ipv6? > select no. Press ENTER to confirm.

# Do you want to configure DHCP? > select yes. We can change this to a fixed ip later if required.

# In the next screen use the arrow down key to arrive at the OK field. Press Enter.

# Do you want this machine to function as a network gateway? Select no.

# Do you want to configure inetd? Select no.

# Would you like to enable SSH login? Select yes - might come in handy.

# Do you want anonymous FTP access? Select no.

# Do you want to configure this machine as an NFS server? Select no.

# Do you want to configure this machine as an NFS client? Select no.

# Would you like to customize the console settings? Select no.

# Would you like to set the machine's time zone? Select yes.

# In the next dialogue select NO

# Select the region you're in and press ENTER

# Select your country and press ENTER

# In the next dialogue (in my case) Does CET look reasonable? Select OK

# Do you have a mouse..? Select no.

# Would you like to browse the FreeBSD package collection? Select no.

# Would you like to add any initial user accounts to the system? Select NO for now.

# Select OK in the next dialogue to set the ROOT password.

# Enter the ROOT password and select ENTER. Enter the ROOT password again to confirm and select ENTER

# Visit the general configuration menu for a chance to set any last options? Select NO.

# You're now presented again with the main Sysinstall installation menu. Since we have finished configuring the installation use the TAB key to select EXIT INSTALL and press ENTER.

# Are you sure you want to exit? Select YES and remove the CD from the CD-Rom drive. The system will reboot from the FreeBSD partition you have created.

## This completes the initial FreeBSD installation and configuration ##

======================
Installation of Geom_Raid5
======================

# Next up is the installation and configuration of the raid array. We'll be using geom_raid5-eff for this.

DO NOT ENTER ANY COMMENTS ENCLOSED BY [brackets]

# Your system has rebooted. Please enter "ROOT" as the user and enter the associated password you have setup during the installation.

# You are now presented with the FreeBSD prompt: "#"

# If there's a legacy geom_raid5 install present we're going to remove any traces of this first by issuing the following commands:

cd /usr/src [we're changing directory by using the cd command]
cp -p /boot/kernel/geom_raid5.ko /usr/src/ [we're backing up the current module to /usr/src/]

# Most likely we'll get a message: No such file or directory. This is fine and means that there's no old module present to backup.

# Next, we're going to download the raid module from the internet using the "fetch" command:

fetch http://wgboome.homepage.t-online.de/geom_raid5-eff.tbz

# If all is well, the system will download the file and you can monitor it's progress.

# Now we need to unpack it using the "tar" command:

tar xvfz geom_raid5-eff.tbz

# The system will show you the different locations where it has moved and created the associated files.

# Let's compile and install the kernel module:

cd /usr/src/sys/modules/geom/geom_raid5 && make clean depend all install

# The system now throws a whole lot of output on your screen. This is what we want!

# We're now going to compile and install the userland binary / manpage:

mkdir -p /usr/include/geom/raid5

cp -p /usr/src/sys/geom/raid5/g_raid5.h /usr/include/geom/raid5/g_raid5.h

cd /usr/src/sbin/geom/class/raid5 && make clean && make depend && make && make install

# This will generate a whole lot of output which is good. Before we move on we need exit in order to move on.

exit

# You now need to enter ROOT again as the user and the root PASSWORD

# We've now installed geom_raid5. Before we can use it we'll need to do some configuration and of course build the array. We're going to do that by entering the following command: graid5 label [options] <name of volume> <devices>. Take note that you have to enter the different disks/partitions that form the complete array. Since we are going to use the 2nd partition on the first disk as part of the raid array we need to be more specific. The first partition on the first disk is used by FreeBSD in our case. Note that my disks start at ad4 and not ad0 or ad1.

graid5 label -v -s 131072 YOURRAIDNAME /dev/ad4s2 /dev/ad5 /dev/ad6

# if all is well you'll see that the system has created the raid array with the name YOURRAIDNAME and that it has been activated.

# if you enter the command

gstat

# you will see the progress of the array being build. To exit and return to the prompt enter CONTROL+C

# Next up is mounting and tuning the array. Enter the following command:

newfs -U -b 32768 /dev/raid5/YOURRAIDNAME

tunefs -m 1 /dev/raid5/YOURRAIDNAME

mkdir /raid5

mount /dev/raid5/YOURRAIDNAME /raid5

# Next enter the following command to see whether the raid volume mounted correctly:

df -h

# If all is well you should see the line with the raid array. This will look like this: /dev/raid5/YOURRAIDNAME and is followed by the size, available size etc.

# In the meantime the system will keep you updated on the progress of the build. The ETA is the estimated time remaining. This will take a while as you can see so it's best to make yourself a sandwich to go with the coffee you made earlier and probably is cold by now.....

# Before we move on we need to ensure that the raid array is mounted during startup. In order to do this we're going to edit the fstab file which is found in the /etc/ directory.

edit /etc/fstab

#The fstab file determines which volumes are mounted at boot time. We're going to add the following line at the end of the file:

/dev/raid5/YOURRAIDNAME /raid5 ufs rw 0 0

# Press the escape key and save changes.

# Next up is installing the Portstree, Appletalk (netatalk) & Samba. In order no to disturb the build it's best to wait until it is finished.


===============================================
# Installation of portstree. Just enter the following commands:
===============================================

portsnap fetch

# This might take a while - approx. 49MB download

portsnap extract

# This wil also take quite a bit of time.

# OPTIONAL - if you want to have an easy way to update your ports in the future you can also install:

/usr/ports/ports-mgmt/portupgrade

# OPTIONAL - After you have installed portsnap you may issue the commands below to update the ports in the future (not required now):

portsnap fetch

portsnap update

=================
Installation of Netatalk
=================

cd /usr/ports/net/netatalk

make install clean

# When presented with a dialogue to install extra encodings select yes, TAB, ENTER...(it takes a while before this comes up)

# Sit back and enjoy...

# we're going to reboot so that all changes are reflected when configuring:

reboot

# login as root

==========================================================
Installation of Howl > This will ensure that the server is found automagically!
==========================================================

# Howl is the "equivalent" of Bonjour or Rendezvous. Easy to install - just enter the following:

cd /usr/ports/net/howl

make install clean

# And wait until it has finished it's thing.

========================
Configuring Netatalk and Howl
========================

# Since we now have installed Netatalk we need to change some files and do some configuring. First we are going to edit the /etc/rc.conf file:

edit /etc/rc.conf

#This ensures that Netatalk is started up at boot time.

# You'll see that the file already contains some settings which agree to the initial installation of FreeBSD. Next we're going to add a couple of lines to the end of the file:

netatalk_enable="YES"
afpd_enable="YES"
mdnsresponder_enable="YES"
mdnsresponder_flags="-f /usr/local/etc/mDNSResponder.conf

# Once you have done so, press the ESCAPE key and select a) leave editor. Select a) and save changes.

# Edit the mDNSResponder config file (might or might not exist - no sure but also not important since this command will also create it if it doesn't exist), do so by entering the following:

edit /usr/local/etc/mDNSResonder.conf

# In this file add two lines:

yourservername _afpovertcp._tcp local. 548
yourservername _ssh._tcp local. 22

# Press the escape key and save changes.

# Next up is the AppleVolumes file which needs some editing. Enter the following:

edit /usr/local/etc/AppleVolumes.default

# In the file, browse to the very last line with the "tilde" sign *if that's the correct name for it". Remove the "tilde" and add the following:

/raid5 "yourservername" options:usedots,noadouble,nohexedit allow:yourusername

# The allow stuff is optional. Press the escape key and accept changes.

# Next we're going to configure afpd.conf This file controls the services & authentication methods used (and a few other bits).

edit /usr/local/etc/afpd.conf

# At the very end of the file (remove the "default" line without the # and -transall )add the following:

"Yourservername" -noddp -nouservolfirst -uamlist uams_dhx.so

# This means that only TCP is used, not Appletalk, the AppleVolumes file on the user volume is not used but instead the AppleVolumes file @ /usr/local/etc is used. The uam bit means that we're using the DHCAST128 authentication method. No passwords in cleartext allowed.

# Press the escape key and save changes.

# This is pretty much all we need to do. In order to get started with the "Connect to server" command on OSX we need to start the services. To do so type:

/usr/local/etc/rc.d/netatalk start

/usr/local/etc/rc.d/mdnsresponder.sh start

# Fire up that "Connect to server command and enjoy". It might also already be visible under network shares without using the connect to server command.

==============================
Installation and configuration of Samba
==============================

# Install Samba3:

cd /usr/ports/net/samba3

make install clean

#wait until it's done. Next go to the smb.conf file to edit the configuration:

edit /usr/local/etc/smb.conf

...................more to come soon!

[ Voor 30% gewijzigd door Anoniem: 225708 op 27-11-2007 18:26 ]


Acties:
  • 0 Henk 'm!

Anoniem: 225708

Topicstarter
Netatalk wil toch nog niet helemaal lukken. Ik zal zsm de guide verder aanpassen.

Acties:
  • 0 Henk 'm!

Anoniem: 41852

Erg cool dat je de moeite hebt genomen om zo'n stap-voor-stap handleiding te schrijven! :)

Ik hoop dat anderen wat hebben aan jouw review (en mogelijk zelfs google-bezoekers). Wat lukte er precies niet met Netatalk?

Acties:
  • 0 Henk 'm!

Anoniem: 225708

Topicstarter
Ik kom zover dat ik in OSX met een username + password ingelogd kom maar de share zie ik niet. Daarnaast heb ik even gesukkeld om de raid set automatisch te loaden dmv /boat/loader.conf en fstab. Nu heb ik in fstab geen entry want hij struikeld over ext2fs (maar ook xx) en ik heb 2 + 2 geprobeerd maar ook twee nullen in de laatste twee kolommen helpt niet.

EDIT: Ik heb in fstab het volume de designatie ufs gegeven en twee keer n 0 in de laatste twee kolommen. Na de boot df -h gedaan en voila: /dev/raid5/NASBOX staat er netjes bij :P

Tijdens de boot doet 'ie wel de disken attachen en zo maar het volume moet ik manueel mounten met mount /dev/raid5/NASBOX /raid5 - opgelost

Netatalk geeft wel verschillende errors tijdens de boot zoals bijv:

afpd[527]: could not set servername, using fallback
afpd[527]: main: atp_open: protocol not supported

Voorwat betreft overige errors komt in de boot steeds terug fstab: /etc/fstab:1: Inappropriate file type or format . Volgens mij is mijn fstab wel goed.

Daarnaast - toch wel ernstig - heb ik regelmatig (1 op2) dat mijn systeem niet wil opstarten, in die zin dat ie net niet aan "timecounter huppeldepup" komt. Uitzetten en weer aanzetten zorgt er dan wel weer voor dat 'ie er wel voorbij komt. Enig idee wat dat zou kunnen zijn?

Als alles naar behoren werkt zal ik de guide tot op de letter volledig uitbreiden zodat je met een printout en nul kennis toch een systeem kan opzetten. Ook eigenbelang natuurlijk, over twee jaar wil ik het ook nog weten.

Er moeten ook nog hier en daar wat aanpassingen gebeuren maar die voor ik pas door als ik alles compleet heb. Wat wel fijn zou zijn is als ik het raid volume NASBOX ook automatisch zou kunnen mounten voordat Netatalk zijn ding doet. -EDIT- Is reeds gelukt zie boven.

Oh ja, wat ik ook niet heb kunnen vinden is hoe stop ik netatalk en start ik het weer op = (/usr/local/sbin/afpd) toch?

Is er ook een mogelijkheid om net zoals dat je via de ports Netatalk installeerd om Netatalk te de-installeren?
Gr,

Ries

[ Voor 22% gewijzigd door Anoniem: 225708 op 23-11-2007 22:23 ]


Acties:
  • 0 Henk 'm!

Anoniem: 225708

Topicstarter
Ben nu zover dat ik mbv van een guest account in kan loggen en dat ik onder volumes zelfs "NASBOX" kan kiezen maar dan geeft OSX de error -50 en wordt het proces verbroken.

In de AppleVolumes.default file staat nu:

/raid5 options:usedots,noadouble,nohex "Nasbox Server"
~

Wat ik graag wil is dat ik alleen met user "piet" kan inloggen en dan toegang heb tot /raid5

Gr,

Ries

[ Voor 38% gewijzigd door Anoniem: 225708 op 23-11-2007 17:14 ]


Acties:
  • 0 Henk 'm!

Anoniem: 225708

Topicstarter
Ik heb verder onderzoek gedaan op mijn OSX systeem waarom ik geen connectie kan maken. Ik zie de server naam, de volumes maar op het moment dat ik connectie maak krijg ik in OSX een error -50. In de logs van OSX staat het volgende:

Nov 24 17:59:58 jan-klaasen-computer kernel[0]: AFP_VFS afpfs_mount: Failed to get Client ID 22

Ik baal er behoorlijk van dat ik nog niet in staat ben geweest om een volume werkelijk te mounten. Wellicht kan iemand mij verder helpen met het zoeken naar een oplossing.

Gr,
Ries

Acties:
  • 0 Henk 'm!

  • eghie
  • Registratie: Februari 2002
  • Niet online

eghie

Spoken words!

Misschien is het ook leuk voor mensen die met de ZFS ondersteuning in FBSD 7, om daar wat over te schrijven. ZFS is, als het stabiel en goed werkt, natuurlijk het ultieme bestandssysteem voor een NAS. Ik weet niet hoe ver FBSD 7 daarmee is atm.

Voor Samba installatie zie:
http://www.us-webmasters.com/FreeBSD/Install/Samba/

Package manager van FreeBSD uitgelegd:
http://www.freebsd.org/do...books/handbook/ports.html

Voor een goede backup op je NAS, raad ik rdiff-backup aan. De installatie methode staat hier beschreven:
http://wiki.rdiff-backup.org/wiki/index.php/Installations

NFS op FreeBSD is ook niet moeilijk:
http://www.onlamp.com/pub...Scary_Daemons.html?page=1

Wat is een NAS zonder FTP interface?
http://machiel.generaal.net/index.php?subject=ftpd

Daarnaast is Quota ondersteuning ook erg handig:
http://www.bsdfreaks.nl/index.php/front_howto/53/570

[ Voor 62% gewijzigd door eghie op 24-11-2007 20:17 ]


Acties:
  • 0 Henk 'm!

Anoniem: 225708

Topicstarter
Netatalk werkt inmiddels, ik heb de guide verder ge-update. Samba configuratie volgt binnenkort.

Gr,

Ries

Acties:
  • 0 Henk 'm!

Anoniem: 41852

Anoniem: 225708 schreef op vrijdag 23 november 2007 @ 15:12:
Daarnaast heb ik even gesukkeld om de raid set automatisch te loaden dmv /boat/loader.conf en fstab. Nu heb ik in fstab geen entry want hij struikeld over ext2fs (maar ook xx) en ik heb 2 + 2 geprobeerd maar ook twee nullen in de laatste twee kolommen helpt niet.
Je hebt een regel als deze nodig:

/dev/raid5/array /mountpoint ufs rw,noauto 0 0

Ik weet niet hoe jij bij ext2fs komt, dat is een filesystem voor Linux. Indien je "newfs" hebt gebruikt heb je een UFS filesystem, niet ext2. De "noauto" kun je weglaten, deze zorgt ervoor dat hij niet automatisch gemount wordt maar je eerst het commando "mount /mountpoint" (mountpoint vervangen zoals in je fstab) moet uitvoeren.

Edit: ah had beter eerst verder kunnen lezen, je hebt het al opgelost. :p
afpd[527]: could not set servername, using fallback
Type eens "hostname" in, en als je een lege regel krijgt of gelijk weer de shell dan vul je in "hostname nas" ofzoiets en voeg hostname="nas" toe aan je /etc/rc.conf. Probeer het dan eens opnieuw met netatalk (eerst netatalk opnieuw opstarten met /usr/local/etc/rc.d/netatalk restart oid).

Wat je ook eens kunt proberen is "chmod 777 /raid5" (vervang /raid5 waar je je RAID5 array mount). Misschien dat het om een permissie probleem gaat?
Daarnaast - toch wel ernstig - heb ik regelmatig (1 op2) dat mijn systeem niet wil opstarten, in die zin dat ie net niet aan "timecounter huppeldepup" komt. Uitzetten en weer aanzetten zorgt er dan wel weer voor dat 'ie er wel voorbij komt. Enig idee wat dat zou kunnen zijn?
Je zou ACPI eens kunnen uitzetten, ik zou het niet weten. Maak eens een leesbare foto van je monitor?
Oh ja, wat ik ook niet heb kunnen vinden is hoe stop ik netatalk en start ik het weer op = (/usr/local/sbin/afpd) toch?
Zie boven, in de /usr/local/etc/rc.d/ directory staan scripts waarmee je alle daemon software (serversoftware) kunt opstarten, herstarten of kunt stoppen.
Is er ook een mogelijkheid om net zoals dat je via de ports Netatalk installeerd om Netatalk te de-installeren?
pkg_version -v geeft je alle geinstalleerde packages
pkg_delete -f <packagenaam> zal een package de-installeren
je kunt ook naar de juist /usr/ports/.../.../ directory gaan en "make deinstall clean" typen

[ Voor 3% gewijzigd door Anoniem: 41852 op 27-11-2007 21:38 ]


Acties:
  • 0 Henk 'm!

Anoniem: 225708

Topicstarter
Beste Enlightenment,

Voor de meeste vragen heb ik ondertussen al een antwoord gevonden, en heb deze ook reeds in de guide verwerkt.

Hostname had ik inderdaad ook al ontdekt en veranderd met het commando:

hostname nasbox

Dan doet 'ie dat ook.


Via een prive bericht had ik al de tip gekregen om de /dev/raid5 directory eens te "overlopen" met een chmod 777 /dev/raid5 Dat heeft gelukkig gewerkt.

Het timecounter fenomeen schijnt veel voor te komen. Via google komen hier dezelfde tips aan bod. Ik zal deze eens doorvoeren en kijken of het werkt.

Het stoppen van Netatalk heb ik opgelost door het te restarten - is nog handiger:

/usr/local/etc/rc.d netatalk restart
/usr/local/etc/rc.d mdnsresponder.sh restart

Netatalk (of andere ports) heb ik op de volgende manier gedeinstaleerd:

cd /usr/ports/net/netatalk
make deinstall

De clean heb ik er niet achter gebruikt maar ik heb de overgebleven bestanden manueel verwijderd.

Gelukkig werkt het nu als een zonnetje. Ik ga samba binnenkort configureren en wederom de guide aanpassen c.q updaten. Als ik helemaal klaar ben zal ik er een lijst met commando's aan toevoegen zoals bijv. het deinstalleren of hostname die handig kunnen zijn.

Zeer bedankt voor jouw hulp tot dusver. Mochten er nog fouten staan in de guide dan hoor ik het graag.

Gr,
Ries

Anoniem: 41852

Nog even een tipje voor je guide: tijdens de setup bij "Distributions" moet je naar Custom gaan en daar de Src aanvinken, je krijgt dan een nieuw menu. In dat menu selecteer je All en ga je terug naar het Custom menu. Selecteer Man met de spatiebalk en druk op escape, dan zit je weer in het "Distributions" menu, druk op Escape om door te gaan.

Anders heb je geen kernel sources en geen manual pages, twee dingen die toch wel handig zijn. De sources nemen ongeveer 230MB in beslag. Als je weinig ruimte hebt, kies dan alleen voor "base" en "sys" in plaats van All.

Acties:
  • 0 Henk 'm!

  • Q
  • Registratie: November 1999
  • Laatst online: 22:08

Q

Au Contraire Mon Capitan!

Erg tof dat je dit ook met de mede-tweakers deelt. _/-\o_

Acties:
  • 0 Henk 'm!

  • InterRubke
  • Registratie: September 2000
  • Laatst online: 25-05 20:34
bedankt voor de goede tutorial.

Na een eerste poging met 6 hd's met die surface errors hadden (transport schade) is nu alles soepeltjes gegaan en de array is vannacht gebouwd. totdat ik een reboot deed en toen was de /dev/raid5 weer pleite.. heb ik nog iets belangrijks vergeten ? vorige keer zei enlightement check kldstat. deze geeft alleen :
nas# kldstat
Id Refs Address            Size     Name
 1    1 0xffffffff80100000 a7f7a0   kernel

dus ik mis de geom_raid5 kernel module als ik het goed begrijp. hoe krijg ik deze standaard geladen ?
(als ik kldload geom_raid5.ko doe en dan mount dan zie ik netjes m'n array)

ik las nog iets engs over expansion, kan ik tzt nog een hd erbij pluggen of is dat met deze geom_raid5 nog niet mogelijk ?

[ Voor 69% gewijzigd door InterRubke op 13-01-2008 17:36 ]

on the 8th day god started debugging


Acties:
  • 0 Henk 'm!

  • Sfynx
  • Registratie: Augustus 2001
  • Niet online
InterRubke schreef op zondag 13 januari 2008 @ 13:12:

dus ik mis de geom_raid5 kernel module als ik het goed begrijp. hoe krijg ik deze standaard geladen ?
(als ik kldload geom_raid5.ko doe en dan mount dan zie ik netjes m'n array)
De volgende regel:

code:
1
geom_raid5_load="YES"


in /boot/loader.conf erbij zetten en de module wordt samen met de kernel direct door de bootloader geladen. Zo start ik hier direct mijn RAID-1 (die heet dan geom_mirror).

[ Voor 4% gewijzigd door Sfynx op 16-01-2008 00:14 ]


Acties:
  • 0 Henk 'm!

Anoniem: 41852

InterRubke schreef op zondag 13 januari 2008 @ 13:12:
ik las nog iets engs over expansion, kan ik tzt nog een hd erbij pluggen of is dat met deze geom_raid5 nog niet mogelijk ?
Dat is mogelijk, ik heb capacity expansion geschreven voor geom_raid5. Maar het heeft wel een nadeel: het werkt alleen onder FreeBSD 6.2 AMD64 en het is nog niet voldoende getest.

Ik ben een beetje teleurgesteld over één verandering in FreeBSD7 die het onmogelijk maakt om expansion uit te voeren in userland. Ik heb nog wel een idee over: een raw image maken van een complete voorgeconfigureerde freebsd installatie met de juiste parameters en die downloadbaar maken.

Na de download schrijf je de file dan direct naar een losse schijf (bijv. /dev/ad2) die je tijdelijk vrij hebt gemaakt (300MB is voldoende). Rebooten en van de doelschijf booten en je kunt beginnen met expansion. Nadeel is dat FreeBSD 6.2 diverse hardware niet (juist) ondersteunt. FreeBSD7 ondersteunt meer hardware. Maar FreeBSD 6.3 komt er ook aan, die wel veel MFC's heeft. Merge From Current (MFC) houdt in: nieuwe dingen in de ontwikkelcode "CURRENT" genaamd in bijvoorbeeld de 6.3 branch brengen.

Acties:
  • 0 Henk 'm!

  • Stacheldraht
  • Registratie: Januari 2008
  • Laatst online: 14-04-2020

Stacheldraht

Frankfurt am Main

Leuke guide maar persoonlijk kies ik liever Debian stable of Red Hat Enterprise Linux voor een NAS. Overigens heb ik niets tegen FreeBSD. Waarom mijn keuze voor GNU/Linux:

- Keuze uit veel soorten filesystems: xfs, jfs, reiserfs, ext2, ext3 enzovoort
- GNU/Linux software raid + Lvm2 is zeer stabiel en eenvoudig te managen
- Tegenwoordig heeft GNU/Linux een zeer goede hardware ondersteuning
- Zowel met Red Hat alsmede met Debian is je systeem heel eenvoudig en betrouwbaar up to date te houden met yum en apt.

Ik heb een tweetal NASjes met Debian en CentOS (RHEL clone) draaien en echt ik heb er totaal geen omkijken naar. Eigenlijk gewoon saai.

Alles hat ein Ende nur die Wurst hat zwei


Acties:
  • 0 Henk 'm!

Anoniem: 41852

FreeBSD of Linux is een kwestie van voorkeur, reeds opgedane ervaring en persoonspecifieke technische verschillen. Op elk van de punten die je noemt, valt wel een nuance te plaatsen:

- FreeBSD heeft UFS, geom_journal en ZFS in kernel-space, niet veel keuze qua file systems maar daar moet je het toch mee kunnen redden lijkt me.
- FreeBSD heeft geom, een modulair storage-framework met beschikbare RAID0,1,3,5,JBOD modules, encryptie en virtualisatie. Zie hier: http://en.wikipedia.org/wiki/GEOM
- FreeBSD7 heeft al veel betere hardware support dan FreeBSD6, maar met linux zit je mogelijk nog beter. Uiteraard afhankelijk van je hardware.
- FreeBSD heeft net als Debian's apt-get zijn eigen portstree systeem met een zeer grote collectie aan installeerbare en update-bare software, vers gecompileerd met de opties die jij wilt.

FreeBSD heeft qua software RAID NAS denk ik meer te bieden qua linux, zeker als een exotische RAID5-setup wilt met goede performance. Ben je al bekend met Linux, dan is Linux natuurlijk een logische keus. Zelf vind ik het heerlijk om met geom te werken, alles is stapelbaar en modulair en met de juiste setup razendsnel. :)

Acties:
  • 0 Henk 'm!

  • Stacheldraht
  • Registratie: Januari 2008
  • Laatst online: 14-04-2020

Stacheldraht

Frankfurt am Main

Het is dan ook puur mijn persoonlijke keuze dat ik voor GNU/Linux kies (ben GNU/Linux sysadmin in het dagelijks leven). Voor beide operating systems valt wat te zeggen en beide hebben voor en nadelen. Overigens vind ik het erg leuk om eens wat meer mensen FreeBSD te zien gebruiken in een wereld waar Microsoft zo dominant aanwezig is.

Alles hat ein Ende nur die Wurst hat zwei


Acties:
  • 0 Henk 'm!

  • InterRubke
  • Registratie: September 2000
  • Laatst online: 25-05 20:34
ik ben terug gegaan van FreeBSD 7.0 naar 6.3 zodat ik wel expansion mogelijkheid krijg.
ik dacht dat ik compile slag van geom_raid5 wel kon overslaan en die van de kernel module van 7.0 kon gebruiken.. niet dus
toen maar opnieuw bouwen volgens de handleiding hierboven, nu krijg ik de melding.. "/usr/share/mk/bsd.kmod.mk", line 12: "can't find kernel source tree"
komt zeker doordat ik de kernel sources niet geinstalleerd heb

[ Voor 11% gewijzigd door InterRubke op 26-01-2008 20:06 ]

on the 8th day god started debugging


Acties:
  • 0 Henk 'm!

  • _eXistenZ_
  • Registratie: Februari 2004
  • Laatst online: 23-05 20:48
Idd :) (Captain Obvious ;))

There is no replacement for displacement!


Acties:
  • 0 Henk 'm!

  • Tomba
  • Registratie: Mei 2000
  • Laatst online: 22:22

Tomba

Quis custodiet ipsos custodes?

* Tomba is aan de hand van deze handleiding ook aan het knutselen.
Heb helaas mijn schijven nog niet binnen, maar ben alvast de basisinstallatie aan het doen.

Moet zeggen dat ik nog meer moeite met FreeBSD heb dan met Linux. (zal ook kwestie van ervaring zijn ;)) Krijg nl SSH nog niet eens aan de gang. Ik kan met PuTTY connecten maar mijn root password wordt niet geaccepteerd.
[code]
login as: root
Using keyboard-interactive authentication.
Password:
Access denied
Using keyboard-interactive authentication.
[/code]
Op mijn console verschijnt de melding:
[code]
sshd[954]: error: PAM: authentication error for root from x.x.x.x
[/code]

Inmiddels gelukt :D
Verder is Samba configuratie wat mij betreft toch wel erg ingewikkeld, het kan zijn dat ik 'verwend' ben geraakt door het gebruik van Windows maar rechten verlenen kom ik echt nog niet uit. Oveirgens heb ik vooralsnog niet eens een browsebare machine ! Als ik de IPC$ probeer te openen krijg ik 'networkpath not found'....
Of je start Samba eerst... ;)

[ Voor 3% gewijzigd door Tomba op 09-02-2008 01:57 ]

tomba.tweakblogs.net || Mijn V&A


Acties:
  • 0 Henk 'm!

  • vso
  • Registratie: Augustus 2001
  • Niet online

vso

tja...

Zowel de samba link en quota's zijn dood ..

heb inmiddels raid 5 setje met 3 disks gebouwd, volgens deze handleiding .. alleen apple meuk weggelaten ..
mis nog ISCSI en iets meer samba meuk (windows AD intergratie)

wil nu een disk toevoegen .. maar dat gaat niet zo makkelijk ?
ik dacht
code:
1
# graid5 insert test /dev/ad22

test = raid5 label (duh test)

Overgens in de Freebsd handboek lees ik dat vinum geom en zfs met elkaar samenwerken ?

de FreeBSD versie die ik nu gebruik is 7.1 echter wellicht dat ik terug ga naar 6.3 ? als adding a disk niet blijkt te werken

Tja vanalles


Acties:
  • 0 Henk 'm!

  • DarkReuvers
  • Registratie: April 2002
  • Laatst online: 26-02 12:21
Hoi,

Ik heb zojuist ook een freebsd nasbox ingericht. Ziet er allemaal goed uit en draait lekker. Dank voor deze tutorial. Op de nasbox draait nu een raid 5 set van 4 disken.

Waar ik weinig over kan vinden is, als je het OS om wat voor rede dan ook opnieuw moet installeren. Met welk commando assemble je dan de bestaande raid5 set weer zonder dat de data die erop staat verloren is?

Heb ik nou ergens compleet overheen gelezen?

Alvast erg bedankt.

Raymond

Acties:
  • 0 Henk 'm!

  • P5ycho
  • Registratie: Januari 2000
  • Laatst online: 22:33
ai, jammer dat je nog graid5 gebruikt hebt. freebsd 8.0 met native ZFS support komt deze week nog uit, en dat was een beter ondersteunde keus geweest imho...

12x 280Wp ZW, 12x 280Wp ZO, Zubadan SHW80YAA 8kW, Zehnder Q450 ERV

Pagina: 1