網頁

顯示具有 Solaris 標籤的文章。 顯示所有文章
顯示具有 Solaris 標籤的文章。 顯示所有文章

2011年8月9日 星期二

筆記:取代^M

取代unix文件中的^M (http://zylix666.blogspot.com/2006/02/unixm.html)
^C的ascii碼\003
^M的ascii碼\015
cat file | tr -d "\015" > newfile
在vi中取代 (http://www.tech-recipes.com/unix_tips150.html)
Remove ^M characters at end of lines in vi
To remove the ^M characters at the end of all lines in vi, use:
:%s/^V^M//g
The ^v is a CONTROL-V character and ^m is a CONTROL-M. When you type this, it will look like this:
:%s/^M//g
In UNIX, you can escape a control character by preceeding it with a CONTROL-V. The :%s is a basic search and replace command in vi. It tells vi to replace the regular expression between the first and second slashes (^M) with the text between the second and third slashes (nothing in this case). The g at the end directs vi to search and replace globally (all occurrences).

2011年7月11日 星期一

su: No directory!

check /etc/passwd /etc/shadow /etc/nsswitch.conf
User home directory permission
If settings is correct.

check / mount point permission.

root@M4000 # ls -ald /
drwxr-x--- 51 root root 77 Jul 11 11:33 /
root@M4000 # chmod 755 /
root@M4000 #
root@M4000 # su - mds
Oracle Corporation SunOS 5.10 Generic Patch January 2005
$HOSTNAME:`pwd`>
$HOSTNAME:`pwd`> exit
root@M4000 # su - crp2db
Oracle Corporation SunOS 5.10 Generic Patch January 2005
crp2db> exit

2011年7月4日 星期一

Error in unconfig_files: Cannot delete NIS client information from /var/yp/binding.

Error in unconfig_files: Cannot delete NIS client information from /var/yp/binding. Check the ypservers and cache_binding files within each binding directory.

ERROR: Unable to unconfigure the extracted system

Unable to unconfigure the extracted system

Fatal Error

Solaris installation program exited.



You need to exclude NIS from the flarcreate:

flarcreate -S -c -n -I “servername-5.10-sun4v-date” -x /var/yp/binding/yourdomainname /var/tmp/servername-5.10-sun4v-date.flar

Or

flarcreate -S -c -n -I \
“`uname -n`-`uname -r`-`uname -m`-`date +%m%d%Y`” \
-x “/var/yp/binding/`domainname`” \
/var/tmp/”`uname -n`-`uname -r`-`uname -m`-`date +%m%d%Y`.flar”

Refrense: Error when trying to load a flar.

2011年6月22日 星期三

VxVM vxio V-5-3-0 vol_disk_change_iopolicy: Public region policy specific open failed for xxx (0xc900023) ret = 0x0

Environment:
Sun Fire 6800 + IBM DS8000 Storage
Solaris 10 + VxVM 4.1

Description:
IBM DS8000 add 12 Luns & assign to F6800,
after run devfsadm -Cv, OS get the 12 disks,
but after run vxdctl enable, vxvm get duplicate ID and report below messages.

VxVM vxio V-5-3-0 vol_disk_change_iopolicy: Public region policy specific open failed for xxx (0xc900023) ret = 0x0

Solution: (Manually fix)
Edit /etc/vx/disk.info , and fix the wrong assigned id.
Reboot to take effect.

Another Solution: (Rebuild disk.info, I never try.)
Drop /etc/vx/disk.info,
/sbin/vxconfigd -k