May 28, 2012
First thoughts about VMware 5
I’m taking a course on VMware VCP 5.0. I followed just a couple of days and soon i will follow the last four days ( half June ). During the “pause” i have the access to the VMware labs!! I have to create a new virtual infrastructure from the beginning , i just have a first ESX already installed.
Anyway i want use this chance for learn much as possible about VMware and share my tasks/experiments on this blog !
Soon i will publish some basic task about VMware vSphere 5.0
I hope to get the certification after the course and work on it extending y know-how
The first two days we saw:
- virtualization concepts
- new features with VMware 5.0
- VMware components overview
- guest’s file configuration
- datastores
- virtual switches
- vCenter Server ( as virtual appliance and application hosted on a system )
- virtual machine creation
With the lab i have to create a new infrastructure with:
- Openfiler Linux as storage/NAS/NFS/Iscsi server
- vCenter Server
- 2x ESXi
- at least one guest
- network virtual switches
I’m so excited
May 17, 2012
Solaris performance(3): how to gather performance data from CPU , memory , disks and network in a row!
I’m writing a monster script useful for gather performance data. It’s based on multiple collectors i wrote for data collecting and plotting.
I actually wrote the main, main.sh . This is a screenshot.
I’m very funny to write this after months reading about Solaris internal , performance , dtrace !
My goal is to get data from every Solaris consumer and make graphic reports, as i did in the past, playing like that
May 16, 2012
Using EOF in a shell script
Today i was writing a shell script. During this task i encountered a problem with EOF ( End Of File ).
After i found the cause and i’m still thinking to this , i did not know this info !
Follow an example here:
./test.sh: line 11: syntax error: unexpected end of file
root@server1 #
!?!?
After i tried to don’t indent EOF… i did not know which was the cause of this problem.
So , the script changed in this:
root@server1 # ./test.sh
this is a test
root@server1 #
It worked !
May 9, 2012
Solaris: how to compare pkgs , version and releases
Yesterday a customer asked me to compare every package/version/revision between a test system and production system.
The goal was to achieve these informations on .csv file. For this purpose a wrote a script and i was funny to use perl ( after some month ). I based my script on pkginfo -l command output.
Here there is the link of the script!
April 24, 2012
Solaris: how to resolve logical controller to physical path
Yesterday i was envolved in troubleshooting a SAN problem on a Solaris 10 system. During that task i need to resolve physical path from logical controller.
Logical Controller:
c3 fc-fabric connected configured unknown
c3::5006048c49aeb359 disk connected configured unknown
c3::5006048c49d51707 disk connected configured unknownc6 fc-fabric connected configured unknown
c6::5006048449d51728 disk connected configured unknown
c6::5006048c49aeb356 disk connected configured unknown
Physical Paths:
luxadm -e port
/devices/pci@5c,600000/SUNW,qlc@1/fp@0,0:devctl CONNECTED
/devices/pci@5c,600000/SUNW,qlc@1,1/fp@0,0:devctl NOT CONNECTED
/devices/pci@7c,600000/SUNW,qlc@1/fp@0,0:devctl CONNECTED
/devices/pci@7c,600000/SUNW,qlc@1,1/fp@0,0:devctl NOT CONNECTED
My question was: “I have to verify c3 … which of physical path does correspond to it?”
I was funny to answer to my question
Starting from c3:
c3::5006048c49aeb359
c3::5006048c49d51707
Starting from the first physical path available:
/devices/pci@5c,600000/SUNW,qlc@1/fp@0,0:devctl
luxadm -e dump_map /devices/pci@5c,600000/SUNW,qlc@1/fp@0,0:devctl
Pos Port_ID Hard_Addr Port WWN Node WWN Type
0 15300 0 5006048c49d51707 5006048c49d51707 0×0 (Disk device)
1 17900 0 5006048c49aeb359 5006048c49aeb359 0×0 (Disk device)
2 12b00 0 210000e08b936d1f 200000e08b936d1f 0x1f (Unknown Type,Host Bus Adapter)
Wow found at first time! I was a little bit lucky
So , it’s possible to combine output from cfgadm/luxadm commands for retrieve physical path!
March 27, 2012
Solaris 10: zcons online message resolution
Today i worked about an alarm. I read this message:
genunix: [ID 408114 kern.info] /pseudo/zconsnex@1/zcons@6 (zcons6) online
So , it seems a zone had a offline/online. I did not have more info , so i was a little bit curious about to resolve zcons@6 to local zone name.
Accomplishing this , i found 2 methods:
1)
# pwd
/dev/zcons# ls -lR
(…)
./system95:
total 4
lrwxrwxrwx 1 root root 56 Mar 27 11:26 masterconsole -> ../../../devices/pseudo/zconsnex@1/zcons@6:masterconsole
lrwxrwxrwx 1 root root 54 Mar 27 11:26 zoneconsole -> ../../../devices/pseudo/zconsnex@1/zcons@6:zoneconsole
2)
# prtconf -v /devices/pseudo/zconsnex@1/zcons@6
(…)
value=’system95′
(…)
March 2, 2012
Solaris 10: modify multiple zfs datasets and add a filesystem to multiple zones in few line
Yesterday i was very funny doing a task. I had to upgrade /export/home dataset to “legacy” and add that filesystem within xml for 26 local zones.
For this purpose , i wrote first a script that checks every ‘/export/home dataset’ without legacy attribute.
the script is here
I tried it on a global zone:
root@system8 # ./check_legacy
rootdg_system241/export_home 24K 8.21G 24K /mnt_system241/root/export/home
rootdg_system242/export_home 2.55M 7.81G 2.55M /mnt_system242/root/export/home
rootdg_system243/export_home 285M 7.52G 285M /mnt_system243/root/export/home
rootdg_system244/export_home 459M 7.37G 459M /mnt_system244/root/export/home
rootdg_system245/export_home 347M 7.94G 347M /mnt_system245/root/export/home
rootdg_system246/export_home 17.4M 6.27G 17.4M /mnt_system246/root/export/home
rootdg_system247/export_home 12.0M 8.09G 12.0M /mnt_system247/root/export/home
rootdg_system261/export_home 285M 7.25G 285M /mnt_system261/root/export/home
After i did something similar to next command( zfs.log has previous output ):
root@system8 # for i in `cat /tmp/zfs.log | awk ‘{ print $1 }’`; do echo zfs set mountpoint=legacy $i; done
zfs set mountpoint=legacy rootdg_system241/export_home
zfs set mountpoint=legacy rootdg_system242/export_home
(…)
This task required an /export/home umount, so i mounted them manually after.
As last step i wrote a 1line command for configure /export/home within xml for every zone. The code is here
February 22, 2012
Solaris 10 and ufs filesystem greather than 1tb
Today i got a task about a resize. I have to grow a ufs filesystem more than 1 tb.
In my experience i learned that a ufs filesystem needs to be created with multi-terabyte support at beninning or this task will require a new filesystem creation !
I did not know how verify the multi-tera support , i looked on the web but i found an answer from colleague.
so let’s see ![]()
( ufs filesystem without support, i tried on my virtual machine )
vxlab:>fstyp -v /dev/rdsk/c2t0d0s2 | head -2
ufs
magic 11954 format dynamic time Wed Feb 22 15:41:04 2012
( ufs filesystem with support , i tried on my virtual machine )
vxlab:>fstyp -v /dev/rdsk/c2t0d0s2 | head -2
ufs
magic decade format dynamic time Wed Feb 22 17:05:38 2012
So , when decade exists we have a multi-tera support!
February 21, 2012
Veritas Volume Manager: how to add multiple disks to diskgroup in 1 line
Today i’m working with VxVM , doing basiscs activities. One of them is to add multiple disks to a diskgroup called system1-dg.
For this purpose i was funny making 1line command.
These are disks before initialization ( just visible due to vxdctl enable command ):
Disk_177 auto – – error
Disk_178 auto – – error
Disk_179 auto – – error
Disk_180 auto – – error
Disk_181 auto – – error
Disk_182 auto – – error
Disk_183 auto – – error
Disk_184 auto – – error
Disk_185 auto – – error
Disk_186 auto – – error
Disk_187 auto – – error
Disk_188 auto – – error
Disk_189 auto – – error
Disk_190 auto – – error
Disk_191 auto – – error
Disk_192 auto – – error
Disk_193 auto – – error
Disk_194 auto – – error
Disk_195 auto – – error
I ran this 1line and i obtained:
Disk_177 auto Disk_177 system-dg online
Disk_178 auto Disk_178 system-dg online
Disk_179 auto Disk_179 system-dg online
Disk_180 auto Disk_180 system-dg online
Disk_181 auto Disk_181 system-dg online
Disk_182 auto Disk_182 system-dg online
Disk_183 auto Disk_183 system-dg online
Disk_184 auto Disk_184 system-dg online
Disk_185 auto Disk_185 system-dg online
Disk_186 auto Disk_186 system-dg online
Disk_187 auto Disk_187 system-dg online
Disk_188 auto Disk_188 system-dg online
Disk_189 auto Disk_189 system-dg online
Disk_190 auto Disk_190 system-dg online
Disk_191 auto Disk_191 system-dg online
Disk_192 auto Disk_192 system-dg online
Disk_193 auto Disk_193 system-dg online
Disk_194 auto Disk_194 system-dg online
Disk_195 auto Disk_195 system-dg online
Cool and quick
Added 1line repository!!
Today i moved my source codes from the old website to google documents format.
This time i did a repository , called 1line !
i want to put there all the commands or utility written in 1 line
This repository is available here