Our group inherited a bunch of SPARC workstations. It had been a while since I had tackled jumpstart, so with these extra machines, I decided to give it a go. First up was reloading one of the machines with Sol 10. Unfortunately we didn't have the passwords for any of these boxes, but I wanted to start fresh anyway. I took the defaults for the install, but selected ZFS for the export partition. I had a bit of a problem, since these machines will not be allowed on our network. The machine kept wanting to set up its interface. Finally I had to set it up as a standalone.
Over the weekend I picked up a wireless router to use it as a DHCP server. That did the trick, it allowed be to get the network access I would need to set up the jumpstart server and client enviroment.
I had previously downloaded the Solaris 10, update DVD. Many of the direction I found referred to the OS as being on cdroms, with the OS spread over a number of CDs. I took the DVD route. My jumpstart server has an ip address of 192.168.1.101, my client will be 192.168.1.102. 101 is called guajome-dome, while .102 will be called brownwrap.
1. I created a jumpstart directory: mkdir /export/jumpstart
2. Then went to the Tools directory of the install DVD:
cd /cdrom/cdrom0/Solaris_10/Tools
3. Ran the script to create the jumpstart server:
./setup_install_server /export/jumpstart
4. I then had to set up some services on the server, guajome-dome. I modiled /etc/inetd.conf and uncommented the tftp line to allow the client, brownwrap, to tftp to guajome-dome to grab the installation.
Then ran inetconv to add the service to the Service Management Facility (SFM).
Then enabled the service: svcadm enable tftpd
5. I then created a config directory: mkdir /export/jumpstart/config
and added two files to it sysidcfg and rules.
sysidcfg:
network_interface=primary {netmask=255.255.255.0}
security_policy=none
timezone=US/Mountain
system_locale=en_US
install_locale=en_US
name-service=none
rules:
hostname brownwrap - profile -
profile:
install_type initial_install
cluster SUNWCXall
partitionig explicit
filesystem
system_type standalone
Sunday, February 27, 2011
Sunday, January 9, 2011
Swatch and Logwatch
I had wanted to do some log monitoring without reinventing the world, so I looked around for some log monitoring tools. I found logwatch, which was easy enough to download and install. Had a little problem with configuration, but since I was only interested in watching ssh logins I impleted a command to do just that.
In my looking around, I also found Swatch. Swatch is actually a PERL script. We had a very old very of PERL, so I downloaded and installed the latest from CPAN. I did this because Swatch kept asking for PERL modules which weren't in our version. Once I installed the latest version of PERL, I only needed an additional four modules which I installed. After that I was able to get Swatch up and running and used this command to start it:
/export/home/ramosg/localperl/bin/swatch --tail-file=/var/adm/messages --tail-args -f
Swatch also looks for a config file which I set up in my home directory:
.swatchrc
watchfor /Failed none for/
mail addresses=gregory.c.ramos
In my looking around, I also found Swatch. Swatch is actually a PERL script. We had a very old very of PERL, so I downloaded and installed the latest from CPAN. I did this because Swatch kept asking for PERL modules which weren't in our version. Once I installed the latest version of PERL, I only needed an additional four modules which I installed. After that I was able to get Swatch up and running and used this command to start it:
/export/home/ramosg/localperl/bin/swatch --tail-file=/var/adm/messages --tail-args -f
Swatch also looks for a config file which I set up in my home directory:
.swatchrc
watchfor /Failed none for/
mail addresses=gregory.c.ramos
Tuesday, January 4, 2011
Security +
Well, I have taken a break from Linux for a while. New job, new state. One of my job requirements to meet DOD 8570 was to pass Security +. This was not a certification I would have gone after normally, but it was a job requirement, and it did get me back to studying again. So with that in mind, I have decided to pursue some Linux certs. The first up will be Linux+. I'll take that test and see how things go. If I pass it, it will get me not only Linux+, but LPI level 1, and Novell's Certified Linux Professional. So now, back to the books.
Thursday, August 5, 2010
Zpooling continued
Now that I have a working mirror again, I will 'repair' the failed disk:
# ls -l /media/Lexar/zfs-testbed/
total 3145729
-rwxrwxrwx 1 root root 512 2010-08-04 14:46 disk1
-rwxrwxrwx 1 root root 1073741824 2010-08-05 08:35 disk2
-rwxrwxrwx 1 root root 1073741824 2010-08-05 08:35 disk3
-rwxrwxrwx 1 root root 1073741824 2010-08-04 14:01 disk4
# rm /media/Lexar/zfs-testbed/disk1
# mkfile 1g /media/Lexar/zfs-testbed/disk1
# ls -l /media/Lexar/zfs-testbed/
total 4194304
-rwxrwxrwx 1 root root 1073741824 2010-08-05 08:48 disk1
-rwxrwxrwx 1 root root 1073741824 2010-08-05 08:45 disk2
-rwxrwxrwx 1 root root 1073741824 2010-08-05 08:45 disk3
-rwxrwxrwx 1 root root 1073741824 2010-08-04 14:01 disk4
#
Now time to add in the two 'spare disks' to the mirror:
# zpool add clifford mirror /media/Lexar/zfs-testbed/disk1 /media/Lexar/zfs-testbed/disk4
I'll use a different command to take a look at the mirror:
# zpool iostat -v clifford
capacity operations bandwidth
pool used avail read write read write
---------------------------------- ----- ----- ----- ----- ----- -----
clifford 150K 1.98G 0 0 1 826
mirror 120K 1016M 0 0 1 823
/media/Lexar/zfs-testbed/disk2 - - 0 0 62 878
/media/Lexar/zfs-testbed/disk3 - - 0 0 41 878
mirror 29.5K 1016M 0 0 0 565
/media/Lexar/zfs-testbed/disk1 - - 0 0 319 31.4K
/media/Lexar/zfs-testbed/disk4 - - 0 0 319 31.4K
---------------------------------- ----- ----- ----- ----- ----- -----
#
# ls -l /media/Lexar/zfs-testbed/
total 3145729
-rwxrwxrwx 1 root root 512 2010-08-04 14:46 disk1
-rwxrwxrwx 1 root root 1073741824 2010-08-05 08:35 disk2
-rwxrwxrwx 1 root root 1073741824 2010-08-05 08:35 disk3
-rwxrwxrwx 1 root root 1073741824 2010-08-04 14:01 disk4
# rm /media/Lexar/zfs-testbed/disk1
# mkfile 1g /media/Lexar/zfs-testbed/disk1
# ls -l /media/Lexar/zfs-testbed/
total 4194304
-rwxrwxrwx 1 root root 1073741824 2010-08-05 08:48 disk1
-rwxrwxrwx 1 root root 1073741824 2010-08-05 08:45 disk2
-rwxrwxrwx 1 root root 1073741824 2010-08-05 08:45 disk3
-rwxrwxrwx 1 root root 1073741824 2010-08-04 14:01 disk4
#
Now time to add in the two 'spare disks' to the mirror:
# zpool add clifford mirror /media/Lexar/zfs-testbed/disk1 /media/Lexar/zfs-testbed/disk4
I'll use a different command to take a look at the mirror:
# zpool iostat -v clifford
capacity operations bandwidth
pool used avail read write read write
---------------------------------- ----- ----- ----- ----- ----- -----
clifford 150K 1.98G 0 0 1 826
mirror 120K 1016M 0 0 1 823
/media/Lexar/zfs-testbed/disk2 - - 0 0 62 878
/media/Lexar/zfs-testbed/disk3 - - 0 0 41 878
mirror 29.5K 1016M 0 0 0 565
/media/Lexar/zfs-testbed/disk1 - - 0 0 319 31.4K
/media/Lexar/zfs-testbed/disk4 - - 0 0 319 31.4K
---------------------------------- ----- ----- ----- ----- ----- -----
#
Wednesday, August 4, 2010
Creation of zpool
A while back I created a zpool. since I didn't have unused disks lying around, I used a 32 GB usb drive. I created four files to be treated as separate disks so that I could create a zpool and mirror disks. Although this would not really offer the protection of mirroring, it did allow me to become familiar with zpools and zfs filesystems, though I had previously created a ZFS filesystem on a spare disk.
The first thing I did was create the four disk files. The USB drive was mounted as /media/Lexar. I then created a sub-directory called 'zfs-testbed'. I "cd'd" to it and created the files:
mkfile 1g /media/Lexar/zfs-testbed/disk1
mkfile 1g /media/Lexar/zfs-testbed/disk2
mkfile 1g /media/Lexar/zfs-testbed/disk3
mkfile 1g /media/Lexar/zfs-testbed/disk4
That created four 1 GB files.
Next I created a zpool consisting of the one 'dive' :
zpool create gregory /media/Lexar/zfs-testbed/disk1
zpool list
NAME SIZE USED AVAIL CAP HEALTH ALTROOT
gregory 1016M 73K 1016M 0% ONLINE -
rpool 148G 17.1G 131G 11% ONLINE -
zfs-ramos 148G 12.4G 136G 8% ONLINE -
Then I destroyed the pool, so I could create a mirror:
zpool destroy gregory
zpool create clifford mirror /media/Lexar/zfs-testbed/disk1 /media/Lexar/zfs-testbed/disk2
zpool list
NAME SIZE USED AVAIL CAP HEALTH ALTROOT
clifford 1016M 74.5K 1016M 0% ONLINE -
rpool 148G 17.1G 131G 11% ONLINE -
zfs-ramos 148G 12.4G 136G 8% ONLINE -
Now I intentionally destroy the label:
dd if=/dev/random of=/media/Lexar/zfs-testbed/disk1 bs=512 count=1
zpool status
pool: clifford
state: DEGRADED
status: One or more devices could not be used because the label is missing or
invalid. Sufficient replicas exist for the pool to continue
functioning in a degraded state.
action: Replace the device using 'zpool replace'.
see: http://www.sun.com/msg/ZFS-8000-4J
scrub: scrub completed after 0h0m with 0 errors on Wed Aug 4 14:47:35 2010
config:
NAME STATE READ WRITE CKSUM
clifford DEGRADED 0 0 0
mirror DEGRADED 0 0 0
/media/Lexar/zfs-testbed/disk1 UNAVAIL 0 0 0 corrupted data
/media/Lexar/zfs-testbed/disk2 ONLINE 0 0 0
Now detach the bad disk:
zpool detach clifford /media/Lexar/zfs-testbed/disk1
Attach a new 'disk':
zpool attach clifford /media/Lexar/zfs-testbed/disk2 /media/Lexar/zfs-testbed/disk3
# zpool status clifford
pool: clifford
state: ONLINE
scrub: resilver completed after 0h0m with 0 errors on Wed Aug 4 14:55:33 2010
config:
NAME STATE READ WRITE CKSUM
clifford ONLINE 0 0 0
mirror ONLINE 0 0 0
/media/Lexar/zfs-testbed/disk2 ONLINE 0 0 0
/media/Lexar/zfs-testbed/disk3 ONLINE 0 0 0 85K resilvered
errors: No known data errors
Here I rebooted to complete the process. After the reboot:
zpool status clifford
pool: clifford
state: ONLINE
scrub: none requested
config:
NAME STATE READ WRITE CKSUM
clifford ONLINE 0 0 0
mirror ONLINE 0 0 0
/media/Lexar/zfs-testbed/disk2 ONLINE 0 0 0
/media/Lexar/zfs-testbed/disk3 ONLINE 0 0 0
errors: No known data errors
The first thing I did was create the four disk files. The USB drive was mounted as /media/Lexar. I then created a sub-directory called 'zfs-testbed'. I "cd'd" to it and created the files:
mkfile 1g /media/Lexar/zfs-testbed/disk1
mkfile 1g /media/Lexar/zfs-testbed/disk2
mkfile 1g /media/Lexar/zfs-testbed/disk3
mkfile 1g /media/Lexar/zfs-testbed/disk4
That created four 1 GB files.
Next I created a zpool consisting of the one 'dive' :
zpool create gregory /media/Lexar/zfs-testbed/disk1
zpool list
NAME SIZE USED AVAIL CAP HEALTH ALTROOT
gregory 1016M 73K 1016M 0% ONLINE -
rpool 148G 17.1G 131G 11% ONLINE -
zfs-ramos 148G 12.4G 136G 8% ONLINE -
Then I destroyed the pool, so I could create a mirror:
zpool destroy gregory
zpool create clifford mirror /media/Lexar/zfs-testbed/disk1 /media/Lexar/zfs-testbed/disk2
zpool list
NAME SIZE USED AVAIL CAP HEALTH ALTROOT
clifford 1016M 74.5K 1016M 0% ONLINE -
rpool 148G 17.1G 131G 11% ONLINE -
zfs-ramos 148G 12.4G 136G 8% ONLINE -
Now I intentionally destroy the label:
dd if=/dev/random of=/media/Lexar/zfs-testbed/disk1 bs=512 count=1
zpool status
pool: clifford
state: DEGRADED
status: One or more devices could not be used because the label is missing or
invalid. Sufficient replicas exist for the pool to continue
functioning in a degraded state.
action: Replace the device using 'zpool replace'.
see: http://www.sun.com/msg/ZFS-8000-4J
scrub: scrub completed after 0h0m with 0 errors on Wed Aug 4 14:47:35 2010
config:
NAME STATE READ WRITE CKSUM
clifford DEGRADED 0 0 0
mirror DEGRADED 0 0 0
/media/Lexar/zfs-testbed/disk1 UNAVAIL 0 0 0 corrupted data
/media/Lexar/zfs-testbed/disk2 ONLINE 0 0 0
Now detach the bad disk:
zpool detach clifford /media/Lexar/zfs-testbed/disk1
Attach a new 'disk':
zpool attach clifford /media/Lexar/zfs-testbed/disk2 /media/Lexar/zfs-testbed/disk3
# zpool status clifford
pool: clifford
state: ONLINE
scrub: resilver completed after 0h0m with 0 errors on Wed Aug 4 14:55:33 2010
config:
NAME STATE READ WRITE CKSUM
clifford ONLINE 0 0 0
mirror ONLINE 0 0 0
/media/Lexar/zfs-testbed/disk2 ONLINE 0 0 0
/media/Lexar/zfs-testbed/disk3 ONLINE 0 0 0 85K resilvered
errors: No known data errors
Here I rebooted to complete the process. After the reboot:
zpool status clifford
pool: clifford
state: ONLINE
scrub: none requested
config:
NAME STATE READ WRITE CKSUM
clifford ONLINE 0 0 0
mirror ONLINE 0 0 0
/media/Lexar/zfs-testbed/disk2 ONLINE 0 0 0
/media/Lexar/zfs-testbed/disk3 ONLINE 0 0 0
errors: No known data errors
Monday, June 14, 2010
Created first zone of home Solaris box
I installed Solaris at home, actually Opensolaris, to try out a few things. I've already set up ZFS, so now onto Zones. I found a example to set up a zone a followed, to a 'T'. In using the IP address in the example, it caused the zone to be setup on another subnet, so that had to be rectified. I wanted to change the ip address in the zone to 10.1.1.220. These were the steps:
Prior to the creation of the Zone, I needed a place to put it. I needed a directory:
#Mkdir /coolpool/web-zone
Also unless the correct permissions are set on the directory, you will get a lot of error messages. The correct permissions are:
#chomd 700 /coolpool/web-zone
zonecfg -z web-zone
zonecfg:web-zone> add net
zonecfg:web-zone:net> set physical=afe0
zonecfg:web-zone:net> set address=10.1.1.220
zonecfg:web-zone:net> set defrouter=192.168.1.1
zonecfg:web-zone:net> end
zonecfg:web-zone> verify
zonecfg:web-zone> commit
zonecfg:web-zone > exit
Then booted zone from host:
zoneadm -z web-zone boot
Then zlogin and finish the install:
zoneadm -C console
Prior to the creation of the Zone, I needed a place to put it. I needed a directory:
#Mkdir /coolpool/web-zone
Also unless the correct permissions are set on the directory, you will get a lot of error messages. The correct permissions are:
#chomd 700 /coolpool/web-zone
zonecfg -z web-zone
zonecfg:web-zone> add net
zonecfg:web-zone:net> set physical=afe0
zonecfg:web-zone:net> set address=10.1.1.220
zonecfg:web-zone:net> set defrouter=192.168.1.1
zonecfg:web-zone:net> end
zonecfg:web-zone> verify
zonecfg:web-zone> commit
zonecfg:web-zone > exit
Then booted zone from host:
zoneadm -z web-zone boot
Then zlogin and finish the install:
zoneadm -C console
Wednesday, June 2, 2010
Opensolaris
I purchased a quad-core Acer M5641 to run Solaris, Rocks, and other OSes on. I could never bring up Solaris, I decided to try another machine. I had an old Dell and Solaris came up right away, but since it was old, everything was slow. So I looked around the Hardware Compatibility List (HCL) and couldn't afford any of them. I asked the compatibility question of one os the Solaris email list and people recommended an entry level Dell server. By the time I had decided to purchase the Dell I wanted, it had been discontinued, so I settled on a Dell Poweredge T105. I had been warned that the network interface might be a problem. After several unsuccessful attempts, I went into the BIOS and disabled the network interface. Once I had Solaris installed, I looked around for a NIC. I had an unused card, installed it, and the network came up.
The T105 came with two internal drives. I had initially thought about mirroring the root disk, probably using dd, since they were identical. Instead I set it up as a separate partition using a ZFS filesystem on it. With that I was able to setup a snapshots on the filesystem. I'd like to set up dedupe on it as well, just to get an idea of how well it works.
The T105 came with two internal drives. I had initially thought about mirroring the root disk, probably using dd, since they were identical. Instead I set it up as a separate partition using a ZFS filesystem on it. With that I was able to setup a snapshots on the filesystem. I'd like to set up dedupe on it as well, just to get an idea of how well it works.
Subscribe to:
Posts (Atom)