Solaris devfsadm 一個命令, 讓我鬱悶了一下午 !

ysjxjf發表於2008-03-05
知道與不知道之間,只是一張紙。
08.03.05 I want to add a disk in vmware system of solaris 10 os , but i could not find it using the command "format " . I search in the net . I found something about this as following . But not the same situation as what i see .
最後,終於在 中,透過關鍵詞"solaris 10 增加硬碟" 找到了 。
不容易啊!
不過,我相信,我會對這個命令有深刻的印象的:devfsadm
看一下這個結果:
bash-3.00# devfsadm
bash-3.00# format
Searching for disks...done

AVAILABLE DISK SELECTIONS:
0. c0d0

1. c0d1

2. c1d1

Specify disk (enter its number):
solaris 10 在 vmware 下增加一塊硬碟需要怎麼才能看到

devfsadm
或在ok下 boot -r
# format
Searching for disks...done

AVAILABLE DISK SELECTIONS:
0. c0t0d0

1. c0t2d0

Specify disk (enter its number): 1selecting c0t2d0
[disk formatted, no defect list found]

FORMAT MENU:
disk - select a disk
type - select (define) a disk type
partition - select (define) a partition table
current - describe the current disk
format - format and analyze the disk
repair - repair a defective sector
show - translate a disk address
label - write label to the disk
analyze - surface analysis
defect - defect list management
backup - search for backup labels
verify - read and display labels
save - save new disk/partition definitions
volname - set 8-character volume name
! - execute , then return
quit
PARTITION MENU:
0 - change `0' partition
1 - change `1' partition
2 - change `2' partition
3 - change `3' partition
4 - change `4' partition
5 - change `5' partition
6 - change `6' partition
7 - change `7' partition
select - select a predefined table
modify - modify a predefined partition table
name - name the current table
print - display the current table
label - write partition map and label to the disk
! - execute , then return
quit
partition> 7Part Tag Flag Cylinders Size Blocks
7 home wm 0 - 19155 37.27GB (19156/0/0) 78156480
Enter partition id tag[home]:
Enter partition permission flags[wm]:
Enter new starting cyl[0]:
Enter partition size[78156480b, 19156c, 19155e, 38162.34mb, 37.27gb]:
format> t

AVAILABLE DRIVE TYPES:
0. WDC WD400BB-22DEA0
1. other
Specify disk type (enter its number)[0]:
selecting c0t2d0
[disk formatted, no defect list found]
format> saSaving new disk and partition definitions
Enter file name["./format.dat"]:
format> q
# newfs /dev/dsk/c0t2d0s7newfs: /dev/rdsk/c0t2d0s7 上次被安裝為 /export/home0
newfs: 建構新的檔案系統 /dev/rdsk/c0t2d0s7: (y/n)? y
/dev/rdsk/c0t2d0s7: 在 19156 磁軌上,16 扇區的 255 柱面的 78156480 扇區
38162.3MB 在 737 柱面群組 (26 c/g, 51.80MB/g, 6400 i/g)
超塊 (fsck -F ufs -o b=#) 備份在:
32, 106368, 212704, 319040, 425376, 531712, 638048, 744384, 850720, 957056,
初始化柱面組:
..............
最後 10 個柱面組的超級塊備份位置:
77121984, 77228320, 77334656, 77440992, 77547328, 77653664, 77760000,
77866336, 77972672, 78074912,
# mkdir /export/home0# mount /dev/dsk/c0t2d0s7 /export/home0
# bash
# export LANG=en# export TERM=vt100# vi /etc/vfstab

在該檔案中加入一行:

#/dev/dsk/c0t2d0s7 /dev/rdsk/c0t2d0s7 /export/home0 ufs 2 yes -

重起。

#init 6
[@more@]

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/66634/viewspace-1000458/,如需轉載,請註明出處,否則將追究法律責任。

相關文章