I needed to replace a string in several thousand files scattered all over the filesystem on one of our servers. I used find to create a list of files that needed to be changed, along with their complete path and called it “list.txt”. It looked something like this:
/path/to/directory with spaces/filefour.txt
and so on...
I worked out the “sed” command to do the in place editing, and Zach helped me whip up a quick PHP script to read the contents of “list.txt” into an array and iterate through it. He was also nice enough to show me how to use “str_replace” to escape any annoying spaces that happened to find their way into the names of directories.
Sun Microsystems likes the QLA 2310 Fiber Channel HBA. It’s only a 2Gig card, but it works with the Sun native driver, which makes it wonderful for us Solaris Administrators. Unfortunately, it does not integrate perfectly with EMC CLARiiON SANs because it does not register properly with Navasphere. Even if you manually register the host, the LUNs will not be presented to the host because the agent can’t pass commands to the array.
To remedy this situation on my Solaris 8 host, I used the following procedure:
Edit the /etc/system file and add the following line:
Next, I rebooted my Solaris host with the “-r” flag:
reboot -- -r
Next I checked Navisphere to make sure my paths have logged in. They were, so I logged into the Solaris host and ran the following commands:
cfgadm devfsadm format
I then saw the storage that was presented to my host. Finally, I restarted the Navisphere agent and started using my new LUNs.