Troubleshooting FreeNAS server

0
253
9 min read

Where to Look for Log Information

The first place to head whenever you have a configuration problem with FreeNAS is to the related configuration section and check that it is configured as expected. If, having double checked the settings, the problem persists, the next port of call is the log and information files in the Diagnostics: section of the web interface.

Keep Diagnostics Section Expanded
By default, the menu tree in the Diagnostics section of the web interface is collapsed, meaning the menu items aren’t visible. To see the menu items, you need to click the word Diagnostics and the tree will expand. During initial setup and if you are doing lots of troubleshooting, you can save yourself a click by having the Diagnostics section permanently expanded. To set this option, go to System: Advanced and click on the Navigation – Keep diagnostics in navigation expanded tick box.

The Diagnostics sections has five sections, the first two are logs and information pages about the status of the FreeNAS server. The other three are networking diagnostic tools and information.

Diagnostics: Logs

This section collates all the different log files that are generated by the FreeNAS server into one convenient place. There are several tabs, one for each different service to log file type. Some of the information can be very technical, especially in the System tab. However, with some key information they can become more readable. The tabs are as follows:

Tab

Meaning

System

When FreeBSD (the underlying OS of FreeNAS) boots, various log entries are recorded here about the hardware of the server and various messages about the boot process.

FTP

This shows the activity on the FTP server including successful logins and failed logins.

RSYNC

The log information for the RSYNC server is divided into three sections: Server, Client, and Local. Depending on which type of RSYNC operation you are interested, click the appropriate tab.

SSHD

Here you will find log entries from the SSH server including some limited startup information and records of logins and failed login attempts.

SMARTD

This tab logs the output of the S.M.A.R.T daemon.

Daemon

Any other minor system service like the built-in HTTP server, the Apple Filing Protocol server and Windows networking server (Samab) will log information to this page.

UPnP

The log information from the FreeNAS UPnP server called “MediaTomb” is displayed here. The logging can be quite verbose so careful attention is needed when reading it. Don’t be distracted by entires such as “INFO: Config: option not found:” as this is just the server logging that it will be using a default value for that particular attribute.

Settings

The settings tab allows you to change how the log information is displayed including the sort order and the number of entries shown.

What is a Daemon?
In UNIX speak, a Daemon is a system service. It is a program that runs in the background performing certain tasks. The Daemons in FreeNAS don’t work with the users in an interactive mode (via the monitor, mouse, and keyboard) and as such need a place to log the results (or problems)of their actives. The FreeNAS Daemons are launched automatically by FreeBSD when it boots and some are dependent on being enabled in the web interface.

Understanding Diagnostics Logs: System

The most complicated of all the log pages is the System log page. Here, FreeBSD logs information about the system, its hardware, and the startup process. At first, this page can seem intimidating but with a little help, this page can be very helpful particularly in tracking down hardware or driver related problems.

50 Log Entries Might Not be Enough
The default number of log entries shown on the Diagnostics: Logs page is 50. For most situations, this will be sufficient but there can be times when it is not enough. For example in the Diagnostics: Logs: System tab, the total number of log entries made during the boot up process is more than 50. If you want to see how much system memory has been recognized by FreeBSD, you won’t find it within the standard 50 entries. The solution is to increase the Number of log entries to show parameter on the Diagnostics: Logs: Setting tab.

The best way to learn to read the Diagnostics: Logs: System page is by example, below are several different log entry examples including logs about the CPU, memory, disks, and disk controllers:

kernel: FreeBSD 6.2-RELEASE-p11 #0: Wed Mar 12 18:17:49 CET 2008

This first entry shows the heritage of the FreeNAS server. It is based on FreeBSD and in this particular case, we see that this version of FreeNAS is using FreeBSD 6.2. There are plans (which may have already become reality) to use FreeBSD version 7.0 as the base for FreeNAS.

kernel: CPU: Intel(R) Xeon(TM) CPU 1.70GHz (1680.52-MHz 686-class CPU)

Here, the type of CPU that was detected by the FreeBSD is displayed. In this case, it is an Intel Xeon CPU running at 1.7GHz.

kernel: FreeBSD/SMP: Multiprocessor System Detected: 2 CPUs

If your system has more than one CPU or is a dual core machine then you will see an entry in the log file (like the one above) recognizing the second CPU. If your machine has Hyper-threading technology, then the second logical processor will be reported like this: Logical CPUs per core:2

Apr 1 11:06:00 kernel: real memory = 268435456 (256 MB)
Apr 1 11:06:00 kernel: avail memory = 252907520 (241 MB)

These log entries show how much memory the system has detected. The difference in size between real memory and available memory is the difference between the amount of RAM physically installed in the computer and the amount of memory left over after the FreeBSD kernel is loaded.

kernel: atapci0: <Intel PIIX4 UDMA33 controller> port 0x1f0-
0x1f7,0x3f6,0x170-0x177,0x376,0x1050-0x105f at
device 7.1 on pci0
kernel: ata0: <ATA channel 0> on atapci0
kernel: ata1: <ATA channel 1> on atapci0

For disks to work on your FreeNAS server, a disk controller is needed and it will be either a standard ATA/IDE controller, a SATA controller or a SCSI controller. Above are the log entries for a standard ATA controller built into the motherboard. You can see that it is an Intel controller and that two channels have been seen (the primary and the secondary).

kernel: atapci1: <SiS 181 SATA150 controller> irq 17 at device 5.0 on pci0
kernel: ata2: <ATA channel 0> on atapci1

kernel: ata3: <ATA channel 1> on atapci1

Like the ATA controller listed a moment ago, SATA controllers are all recognized at boot up. Here is a SiS 181 SATA 150 controller with two channels. They are listed as devices ata2 and ata3 as ata0 and ata1 are used by the standard ATA/IDE controller.

kernel: mpt0: <LSILogic 1030 Ultra4 Adapter> irq 17 at device 16.0 on pci0

Like IDE and SATA controllers, all recognized SCSI drivers are listed in the boot up system log. Here, the controller is an LSILogic 1030 Ultra4.

kernel: ad0: 476940MB <WDC WD5000AAJB-00YRA0 12.01C02> at ata0-master UDMA100

kernel: ad4: 476940MB <Seagate ST3500320AS SD04> at ata2-master SATA150

Once the disk controllers are recognized by the system, FreeBSD can search to see which disks are attached. Above is an example of a Western Digital 500GB hard drive using the standard ATA100 interface at 100MB/s. There is also a 500GB Seagate drive connected using the SATA interface.

acd0: CDROM <TOSHIBA CD-ROM XM-7002B/1005> at ata1 as master UDMA33

When the CDROM (which is normally attached to an ATA/IDE controller) is recognized, it will look like the above.

kernel: da0 at ahd0 bus 0 target 0 lun 0
kernel: da0: <MAXTOR ATLAS10K4_73WLS DFL0> Fixed Direct Access SCSI-3 device
kernel: da0: 320.000MB/s transfers (160.000MHz, offset 127, 16bit),
 Tagged Queueing Enabled

kernel: da0: 70149MB (143666192 512 byte sectors: 255H 63S/T 8942C)

SCSI addressing is a little more complicated than that of ATA/IDE. In SCSI land, you have a controller, a channel (bus), a disk (target), and the Logical Unit Number (LUN). The example above shows that a disk (which has been assigned the device name da0) is found on the controller ahd0 on bus 0, as target 0 with the LUN 0. SCSI controllers can have multiple buses and multiple targets. Further down, you can see that the disk is a MAXTOR 73GB SCSI-3 disk.

kernel: da0 at umass-sim0 bus 0 target 0 lun 0
kernel: da0: <Verbatim Store 'n' Go 1.30> Removable Direct Access SCSI-2 device
kernel: da0: 40.000MB/s transfers

kernel: da0: 963MB (1974271 512 byte sectors: 64H 32S/T 963C)

If you are using a USB flash disk for storing the configuration information, it will most likely appear in the log file as a type of SCSI disk. The above example shows a 1GB Verbatim Store ‘n’ Go disk.

kernel: lnc0: <PCNet/PCI Ethernet adapter> irq 18 at device 17.0 on pci0

kernel: lnc0: Ethernet address: 00:0c:29:a5:9a:28

Another important device that needs to work correctly on your system is the network interface card. Like disk controllers and disks, it will be logged in the log file when FreeBSD recognizes it. Above is an example of an AMD Lance/PCNet-based Ethernet adapter. Each Ethernet card has a unique address know as the Ethernet address or the MAC address. It is made up of 6 numbers specified using a colon notation. Once found, FreeBSD queries the card to find its MAC address and logs the result. In the above example, it is “00:0c:29:a5:9a:28”.

Converting between Device Names and the Real World

In the SCSI example above, the SCSI controller listed is ahd0. The trick to understanding these log entries better is to know how to interpret the device name ahd0. First of all ahd0 means it is a device using the ahd driver and it is the first one in the system (with numbering starting from 0).

So what is a ahd? The first place to look is further up in the log file. There should be an entry like:

kernel: ahd0: <Adaptec 39320 Ultra320 SCSI adapter> irq 11 at device 1.0 on pci2

This shows that the particular device is an Adaptec 39320 SCSI 3 controller. You can also find out more about the the ahd driver (and all FreeBSD drivers) at: http://www.freebsd.org/releases/6.2R/hardware-i386.html Search for ahd and you will find which controllers this driver supports (in this case, they are all controllers from Adaptec. If you click on the link provided, you will be taken to a specific help page about this driver. When FreeNAS moves to FreeBSD 7, then the relevant web page will be: http://www.freebsd.org/releases/7.0R/hardware.html.

LEAVE A REPLY

Please enter your comment!
Please enter your name here