Wednesday, March 24, 2010

Sun Fire V120 as NAS part 1: Installing Solaris 10 and drivers

One of my friends started to test FreeNAS in an old PC with bad results in performance over gigabit network and Samba. Seeking in the FreeNAS forums there is a lot of work to get a system working well in gigaethernet, with a lot of parameters to tweak. His test remembered me an old project: Creating my own NAS with an Sparc server.


I have a SunFire V120 and a Storedge S1 from a long time with no use and I decided to get a try with this system. Unfortunately it has 100 Mbit Ethernet and only one PCI slot, so: I can put a Sun Gigaswift or Quad Gigaswift network card or an SATA card but not both cards at the same time. Anyway if the systems probes its reliability with my configuration, I will buy a new server with more CPU power like the SunFire V210 who has gigaethernet and one PCI slot to atach a SATA RAID card.

In the other hand, if the project goes well I can use a X64 server with Solaris 10 or OpenSolaris and get a lot of power with low cost. Now in the after market there are a lot of Sun V20z for a low price and these systems have dual AMD Opteron (and dual core) possibility with two PCI slots.

For this test I choosed 5 hard disk: on 36GB 10K for the Solaris installation and four 18GB 10K as array in RAID 5 configuration, three of them in external SCSI array StorEdge S1. Not sure if I can mix internal HD's with the StorEdge ones but. If the mix is not possible maybe a new Storedge S1 must come here (now are very very cheap, more cheap without disk!). I pretend to use ZFS in all disks.
Ok. First of all I have to install the OS. I downloaded the latest Solaris 10. To connect to the server console we need a RJ45 RS232 cable (Cisco serial system) connected to the LOM port (blue cable in the picture). Once the terminal software is running (9600 baud, no par, 8 bit, 1 stop) the server must boot from the cdrom. Not easy to figure how to boot the DVD from the console: the V120 User guide says a few steps but this instructions doesn't work in my case. Finally, after a lot of websearch and found the solution:

1. Boot the machine to the console system. From the lom prompt type:
lom> bootmode forth
lom> poweron
2. The boot command usually has the cdrom argument, but in this case I have to add - install:
ok boot cdrom - install
    At this stage, if the server renponds with Fast Data Access MMU Miss you must reset the server. This is because a forced power off:
ok setenv auto-boot? false # Yes, with the '?'
ok reset
Now the V120 will reboot and the installation can start (well, start the wizard takes a lot of time with this DVD device).
 
3. Now only is follow the screen installer is needed. Installed the Final User Software Group, configured the network and a lot of time before, the server will reboot. In Spanish in the picture:

4. After the first reboot the server showed a warning about the label of the second hard disk: Corrupt label; wrong magic number. This hd was on my SGI Octane and has SGI label. Logged in the system as root I labeled disk 1:
# format
Searching for disks...Mar 24 21:52:20 v120 scsi: WARNING: /pci@1f,0/pci@1/scsi@8,1/sd@3,0 (sd18):
Mar 24 21:52:20 v120    Corrupt label; wrong magic number
Mar 24 21:52:20 v120 scsi: WARNING: /pci@1f,0/pci@1/scsi@8,1/sd@3,0 (sd18):
Mar 24 21:52:20 v120    Corrupt label; wrong magic number
Mar 24 21:52:20 v120 scsi: WARNING: /pci@1f,0/pci@1/scsi@8,1/sd@5,0 (sd20):
Mar 24 21:52:20 v120    Corrupt label; wrong magic number
Mar 24 21:52:20 v120 scsi: WARNING: /pci@1f,0/pci@1/scsi@8,1/sd@5,0 (sd20):
Mar 24 21:52:20 v120    Corrupt label; wrong magic number
done

c2t3d0: configured with capacity of 16.86GB
c2t5d0: configured with capacity of 16.86GB


AVAILABLE DISK SELECTIONS:
       0. c1t0d0           /pci@1f,0/pci@1/scsi@8/sd@0,0
       1. c2t3d0           /pci@1f,0/pci@1/scsi@8,1/sd@3,0
       2. c2t4d0           /pci@1f,0/pci@1/scsi@8,1/sd@4,0
       3. c2t5d0           /pci@1f,0/pci@1/scsi@8,1/sd@5,0
Specify disk (enter its number):  1
selecting c2t3d0
[disk formatted]
Mar 24 21:54:38 v120 scsi: WARNING: /pci@1f,0/pci@1/scsi@8,1/sd@3,0 (sd18):
Mar 24 21:54:38 v120    Corrupt label; wrong magic number
Disk not labeled.  Label it now? y
Mar 24 21:54:41 v120 scsi: WARNING: /pci@1f,0/pci@1/scsi@8,1/sd@3,0 (sd18):
Mar 24 21:54:41 v120    Corrupt label; wrong magic number
Mar 24 21:54:41 v120 scsi: WARNING: /pci@1f,0/pci@1/scsi@8,1/sd@3,0 (sd18):
Mar 24 21:54:41 v120    Corrupt label; wrong magic number
Mar 24 21:54:41 v120 scsi: WARNING: /pci@1f,0/pci@1/scsi@8,1/sd@3,0 (sd18):
Mar 24 21:54:41 v120    Corrupt label; wrong magic number


FORMAT MENU:
        disk       - select a disk
        type       - select (define) a disk type
        partition  - select (define) a partition table
        current    - describe the current disk
        format     - format and analyze the disk
        repair     - repair a defective sector
        label      - write label to the disk
        analyze    - surface analysis
        defect     - defect list management
        backup     - search for backup labels
        verify     - read and display labels
        save       - save new disk/partition definitions
        inquiry    - show vendor, product and revision
        volname    - set 8-character volume name
        !     - execute , then return
        quit
format> quit
Repeated with all the bad labeled disks. The format is showing only 4 disk now... I can't see the second hd of the server... I will look later.

5. Turn on autoboot from the ok prompt.
# setenv auto-boot? true
6. Install LOMLite 2.0. With only the OS installed the server cant speak to the LOM device and we can't control it or shutdown the machine properly. Also the power button doesn't work well without this patch. I have this patch stored in my main server and I can access via FTP:
# cd /var/spool/pkg
# ftp 192.168.2.105
Connected to 192.168.2.105.
220 ProFTPD 1.3.2 Server (ProFTPD) [192.168.2.105]
Name (192.168.2.105:root): admin
331 Password required for admin
Password:
230 User admin logged in
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> get lom20.zip
200 PORT command successful
150 Opening BINARY mode data connection for lom20.zip (546804 bytes)
226 Transfer complete
local: lom20.zip remote: lom20.zip
546804 bytes received in 1 seconds (526,38 Kbytes/s)
ftp> quit
221 Goodbye.

# unzip lom20.zip
# rm lom20.zip
# pkgadd
Now only follow the wizard to install the patch.

7. Shutdown the server. Here we have a problem with the shutdown command. The server doesn't have the NFS server configured and the shutdown command needs this service to send messages to all the client. Because I don't want to configure the NFS server now, I have to use the old shutdown command:
# /usr/ucb/shutdown now
this take the system to the ok promp, to power of the server then:
ok power-off

8. OPTIONAL and not needed: Update the PROM with a patch. This is done by the 111991-07 Sun patch. Like before I have it stored in my main server:
# ftp 192.168.2.100
Connected to 192.168.2.100
220 ProFTPD 1.3.2 Server (ProFTPD) [192.168.2.100]
Name (192.168.2.100:root): admin
331 Password required for admin
Password:
230 User admin logged in
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> cd /files
ftp> ls
200 PORT command successful
150 Opening ASCII mode data connection for file list
111991-07-PROM_ upgrade_patch.htm
110208-22_LightsOutManagement2_0_archivos
111991-07-PROM_ upgrade_patch_archivos
110208-22_LightsOutManagement2_0.htm
110208-22.zip
111991-07.zip
110208-22_LOM_2.0.txt
111991-07_PROM_UPGRADE.txt
226 Transfer complete
237 bytes received in 0,06 seconds (3,85 Kbytes/s)
ftp> bin
200 Type set to I
ftp> get 111991-07.zip
200 PORT command successful
150 Opening BINARY mode data connection for 111991-07.zip (694197 bytes)
226 Transfer complete
local: 111991-07.zip remote: 111991-07.zip
694197 bytes received in 1,1 seconds (637,70 Kbytes/s)
ftp> quit
221 Goodbye.
# reboot

9. When the machine is rebooting, type the scape carachters '#.' (without the ') and get the lom prompt:
 lom> break
Type  'go' to resume
ok boot -s
10. Now you have to type the root password to login the system, follow:
# chmod +x Update.to.flapjack2.4.0.17@OS
# ./Update.to.flapjack2.4.0.17@OS
After a new reboot, the ROM is updated.

Yes!!! Finish!!! I have the SunFire V120 running:
Now I need some time to start the next step: Configure the disks array.

8 comments:

Anonymous said...

It is rather valuable answer

Titox said...

Sorry, Some arrangements done today... Exchange? No problem!

Anonymous said...

Hi Titox, great job!
I really appreciated the way you wanted to breathe new life into these historical pizza-box systems!

I also recently acquired a netra T1 AC200 and would like to do similar stuff... unfortunately the lom software is kinda messed up and, in order to update it, I'd need the file lom20.zip which seems disappered from the internet after oracle takeover.... could you please point me where to find it?

Thanks!
paolo74_at_gmail_dot_com

Anonymous said...

What kind of SATA cards fit into these machines?!?

Titox said...

No SATA using Solaris. Maybe with a linux distribution you can use some VIA or Intel PCI cards but there is no 5 volts PCI cards supported on Solaris 10.
In other servers/workstations you can use LSI cards but that are keyed for use in 3.3volts slots.

MAK said...

Hi

Titox

is their any way that we can install e-smith on sunfire v120, because i want to utilized

Pepe said...

Great!
It helps me a lot!!!

Pepe said...

Great!
It helps me a lot!!!