- 論壇徽章:
- 0
|
Solaris FAQ v1.0
081Q: 在sun的機器上能否不接鍵盤和鼠標
但當我把鼠標和鍵盤拿下來的時候,系統(tǒng)會死掉,然后重新啟動還是不行,只有在有鍵盤鼠標的情況下才能正常啟動,這里有什么竅門嗎?
A:
Change "/etc/default/kbd"
# abort sequences:
KEYBOARD_ABORT=disable
這個好像是禁止STOP+A的
SUN的機器有/etc/default/kdmconfig嗎
估計得修改OK變量,忘了哪個了,把本地輸出禁止掉。
082Q: 在/home 下mkdir不能用
cd /home
mkdir abd
提示信息為:
mkdir: Failed to make directory "ccx"; Operation not applicable
大家看看是怎么會事?用戶為root,在其它目示里面沒有問題,只是在/home里面不行
A:
/home 已被automount用了,所以不能在這里建目錄,如果非要使用/home,把/etc/auto_master文件的
/home auto_home 這一行注釋掉。
083Q: 安裝ORACLE環(huán)境是否設置正確
A:
這兩個我都設了
/etc/system下
set shmsys:shminfo_shmmax=268435456
set shmsys:shminfo_shmmin=1
set shmsys:shminfo_shmmni=100
set shmsys:shminfo_shmseg=10
set semsys:seminfo_semmns=200
set semsys:seminfo_semmni=70
oracle下的.profile
ORACLE_HOME=/usr/local/u01/oracle/app
ORACLE_BASE=/usr/local/u01/oracle
ORACLE_SID=ora1
LD_LIBRARY_PATH=/usr/local/u01/oarcle/app/lib:/usr/lib
DISPLAY=192.168.1.156:0.0
PATH=/usr/local/u01/oracle/app/bin:/usr/bin
umask 022
然后把以上東東都export
084Q: 如何修改syslog.conf文件,使每天產生一個新的messages?
我想修改syslog.conf文件,使系統(tǒng)產生的消息寫到不同文件名的messages中,我按下列修改,但不成功:
*.err;kern.debug;daemon.notice /var/adm/messages.`date +"%y%m%d"`
請教錯在哪里? 有其他什么辦法?
A:
跑一個CRON JOB, 每天定時
# mv /var/adm/messages /var/adm/messages.`date +"%y%m%d"`
# touch /var/adm/messges
第二步可能都不用,系統(tǒng)應當自動產生
085Q: /usr滿了,新增了一塊硬盤接下來怎么辦?
原來的系統(tǒng)中/usr與 / 在同一個硬盤分區(qū)上,由于安裝了許多軟件,此分區(qū)已滿 ,現(xiàn)在系統(tǒng)增加了硬盤,如何將/usr 目錄挪到新的硬盤上?
A:
1.在新的硬盤上將文件系統(tǒng)建好,
2.mv /usr /usr.bak
3.mkdir /usr
4.mount newdriverpath /usr
5.cp -r /usr.bak /usr
6.修改/etc/vfstab 文件.
086Q: 如何改變文件系統(tǒng)的大小?
現(xiàn)在的機器情況如下:
# df -k
Filesystem kbytes used avail capacity Mounted on
/dev/dsk/c0t1d0s6 6050182 5296231 693450 89% /data
/dev/dsk/c0t0d0s7 192807 9 173518 1% /export/home
/dev/dsk/c0t1d0s5 6050182 5640570 349111 95% /program
……
因項目安裝需求,想增加/program的空間,如何操作?
A:
一種最安全的辦法是增加一個硬盤,先做backup /program然后再把它mount到另一個硬盤上!!!
另一種就是從c0t1d0s6里擠出一部分空間先要做backup /data和/program
還有一種辦法就是從c0t0d0s7里擠出空間。
在比較大的空間系統(tǒng)中用mkfsck /dev/rdsk/c0txdx
tar -cvf backup.tar /program
umount /program
mount /dev/dsk/c0txdx /program
tar xvf backup.tar
呵呵,做link算了,這個辦法是不能真正增加文件系統(tǒng)大小的。
是把文件存在其他文件系統(tǒng)上,然后在/program上用ln命令做鏈接。這樣用戶在訪問文件時,可以從/program/linkfile訪問。
087Q: 如何增加空間大小
# df -k
Filesystem kbytes used avail capacity Mounted on
/dev/dsk/c0d0s0 72719 65449 0 100% /
/dev/dsk/c0d0s6 951030 353612 540357 40% /usr
/dev/dsk/c0d0p0:boot 10484 1623 8861 16% /boot
/proc 0 0 0 0% /proc
fd 0 0 0 0% /dev/fd
mnttab 0 0 0 0% /etc/mnttab
/dev/dsk/c0d0s3 64135 7329 50393 13% /var
swap 380404 0 380404 0% /var/run
swap 380696 292 380404 1% /tmp
/dev/dsk/c0d0s5 53535 1222 46960 3% /opt
/dev/dsk/c0d0s1 592438 250108 283087 47% /usr/openwin
#
以上是我的機器的空間使用情況。我要pkgadd,結果發(fā)現(xiàn)空間不夠了。請問怎么增加。我看了以前的一些方法。 有這樣的一個方法,請幫我解釋一下,怎么做第一點,第三點里面metainit的參數(shù),還有具體怎么改vfstab。謝謝。
通過創(chuàng)建一個串聯(lián)來擴大文件系統(tǒng)
1。首先從一個比較大的分區(qū)中劃分出一部分空間出來,這個比較簡單,就不多說了
2。卸載要擴大的文件系統(tǒng) 比如/docs (c0t1d0s2)
3.將劃分出來的新分區(qū)(c0t2d0s7)和 c0t1d0s2串聯(lián)起來
#metainit d24 2 1 c0t1d0s2 1 c0t2dos7
注意先后順序非常重要
4。然后編輯vfstab
A:
你干嗎不用圖形界面直接做呢??
088Q: SOLARIS 分區(qū)分錯了,不重裝還有其他什么辦法嗎?
A:
可以在線擴展,可是非常復雜!
你要有其他沒用的硬盤,然后通過disksuite的在線擴展文件系統(tǒng)的功能來完成.
Expanding a File System on the Fly By Joseph Gan
A metadevice consists of one or more devices (slices). It can be expanded by adding slices. Then, it can be grown to fill a larger space while the file system is in use.
However, not all UNIX file systems (UFS) can be expanded this way. The concatenation is good only for small random I/O and for even I/O distribution. On the other hand, striping is advantageous for large sequential I/O and for uneven I/O distribution, because striping will increase performance by accessing data in parallel.
Note: If you wish to expand a file system to be a single striped metadevice, you can't do it on the fly. You have to dismount the file system, then copy or "move" over to a new partition.
How to Expand a File System With a Single Stripe, On the Fly
First, the file system has to be created and mounted as a one-way mirror metadevice; as in this example, with d80 mounted by /opt:
# metastat d80
d80: Mirror
Submirror 0: d81
State: Okay
Pass: 1
Read option: roundrobin (default)
Write option: parallel (default)
Size: 10261520 blocks
d81: Submirror of d80
State: Okay
Size: 10261520 blocks
Stripe 0: (interlace: 32 blocks)
Device Start Block Dbase State Hot Spare
c1t12d0s0 0 No Okay
c1t13d0s0 1520 No Okay
c1t14d0s0 1520 No Okay
c1t15d0s0 1520 No Okay
Next, use the metattach command to dynamically concatenate a new slice, /dev/dsk/c0t1d0s1, to the end of the existing submirror of d80, d81:
# metattach d81 c0t1d0s1
# metastat d80
d80: Mirror
Submirror 0: d81
State: Okay
Pass: 1
Read option: roundrobin (default)
Write option: parallel (default)
Size: 10261520 blocks
d81: Submirror of d80
State: Okay
Size: 10261520 blocks
Stripe 0: (interlace: 32 blocks)
Device Start Block Dbase State Hot Spare
c1t12d0s0 0 No Okay
c1t13d0s0 1520 No Okay
c1t14d0s0 1520 No Okay
c1t15d0s0 1520 No Okay
Stripe 1:
Device Start Block Dbase State Hot Spare
c0t1d0s1 0 No Okay
Then, use the growfs command to expand the mounted file system ( /opt) onto the raw metadevice /dev/md/rdsk/d80:
# growfs -M /opt /dev/md/rdsk/d80
/dev/md/rdsk/d80: 12336320 sectors in 8116 cylinders of 19 tracks,
80 sectors
6023.6MB in 129 cyl groups (63 c/g, 46.76MB/g, 5888 i/g)
super-block backups (for fsck -F ufs -o b=#) at:
32, 95872, 191712, 287552, 383392, 479232, 575072, 670912, 766752, 862592,
958432, 1054272, 1150112, 1245952, 1341792, 1437632, 1533472, 1629312,
1725152, 1820992, 1916832, 2012672, 2108512, 2204352, 2300192, 2396032,
2491872, 2587712, 2683552, 2779392, 2875232, 2971072, 3064352, 3160192,
3256032, 3351872, 3447712, 3543552, 3639392, 3735232, 3831072, 3926912,
4022752, 4118592, 4214432, 4310272, 4406112, 4501952, 4597792, 4693632,
4789472, 4885312, 4981152, 5076992, 5172832, 5268672, 5364512, 5460352,
5556192, 5652032, 5747872, 5843712, 5939552, 6035392, 6128672, 6224512,
6320352, 6416192, 6512032, 6607872, 6703712, 6799552, 6895392, 6991232,
7087072, 7182912, 7278752, 7374592, 7470432, 7566272, 7662112, 7757952,
7853792, 7949632, 8045472, 8141312, 8237152, 8332992, 8428832, 8524672,
8620512, 8716352, 8812192, 8908032, 9003872, 9099712, 9192992, 9288832,
9384672, 9480512, 9576352, 9672192, 9768032, 9863872, 9959712, 10055552,
10151392, 10247232, 10343072, 10438912, 10534752, 10630592, 10726432,
10822272, 10918112, 11013952, 11109792, 11205632, 11301472, 11397312,
11493152, 11588992, 11684832, 11780672, 11876512, 11972352, 12068192,
12164032, 12257312,
Now the file system (/opt) has been expanded dynamically, but it contains two stripes: stripe 0, which is the original one, and stripe 1, which is the expanded one.
The next step is to create a single stripe metadevice d82, which is the same size as the submirror d81.
In the following example, we create a stripe with three 2.1-Gbyte disks:
# metainit d82 1 3 c0t11d0s2 c0t12d0s2 c0t13d0s2
d82: Concat/Stripe is setup
# metastat d82
d82: Concat/Stripe
Size: 12457920 blocks
Stripe 0: (interlace: 32 blocks)
Device Start Block Dbase
c0t11d0s2 0 No
c0t12d0s2 1520 No
c0t13d0s2 1520 No
Then, add the metadevice d82 as the second submirror to d80, and resync will automatically take place:
# metattach d80 d82
d80: submirror d82 is attached
# metastat d80
d80: Mirror
Submirror 0: d81
State: Okay
Submirror 1: d82
State: Resyncing
Resync in progress: 20 % done
Pass: 1
Read option: roundrobin (default)
Write option: parallel (default)
Size: 12336320 blocks
......
After the resync is complete, we have the following two-way mirrors:
# metastat d80
d80: Mirror
Submirror 0: d81
State: Okay
Submirror 1: d82
State: Okay
Pass: 1
Read option: roundrobin (default)
Write option: parallel (default)
Size: 12336320 blocks
d81: Submirror of d80
State: Okay
Size: 12336320 blocks
Stripe 0: (interlace: 32 blocks)
Device Start Block Dbase State Hot Spare
c1t12d0s0 0 No Okay
c1t13d0s0 1520 No Okay
c1t14d0s0 1520 No Okay
c1t15d0s0 1520 No Okay
Stripe 1:
Device Start Block Dbase State Hot Spare
c0t1d0s1 0 No Okay
d82: Submirror of d80
State: Okay
Size: 12336320 blocks
Stripe 0: (interlace: 32 blocks)
Device Start Block Dbase State Hot Spare
c0t11d0s2 0 No Okay
c0t12d0s2 1520 No Okay
c0t13d0s2 1520 No Okay
Finally, you can detach the submirror d81 from d80, and remove it completely:
# metadetach d80 d81
# metaclear d81
# metastat d80
d80: Mirror
Submirror 1: d82
State: Okay
Pass: 1
Read option: roundrobin (default)
Write option: parallel (default)
Size: 12336320 blocks
d82: Submirror of d80
State: Okay
Size: 12336320 blocks
Stripe 0: (interlace: 32 blocks)
Device Start Block Dbase State Hot Spare
c0t11d0s2 0 No Okay
c0t12d0s2 1520 No Okay
c0t13d0s2 1520 No Okay
Now, you have dynamically expanded the file system (/opt) with a single stripe metadevice.
--------------------------------------------------------------------------------
Please note: This procedure must be done during a quiet period, or the file system must be locked, in order to avoid possible changes to the file system during the sync. You can use the fuser -u command to check that no one is using the file system. If users are logged on overnight in their logging directory, the system admin could write-lock the file system if it is possible. In that case, users can still read files in the directory. As long as no one creates files during the sync, everything will be fine.
089Q: solaris的抓圖工具?
我需要編寫在solaris安裝sybase的說明書,最后能把安裝界面圖形放在說明書上,但是,如何才能像windows print screen一樣copysolaris的圖形界面呢? 有什么工具嗎?
A:
Solaris自帶呀!右鍵里面就有。
一個很笨的辦法
你有X-manager嗎? 在你的windows平臺上就有辦法了!
090Q: md5.txt文件有甚麼作用?
我下載了多個文件?也從來沒用到過這個文件嘛。
A:
md5拿來做校驗的,因為下載大文件容易出錯。 下載完后在本地做一次md5,把結果跟服務器上公布的md5比較一下,如果相同,就表示下載的文件正確,沒有誤碼。
對于壓縮文件,因為壓縮時已經保存了校驗信息,如果下載有誤碼,將無法解壓。所以,壓縮文件可以不必做md5。
win下可以用WinMD5.exe或者是md5sum.exe或md5.exe,自己下一個就好了
我常在FreeBSD下做,一個命令就ok: md5 filename |
|