1. 솔라리스 디스크 추가 절차
touch /reconfigure로 시스템이 새로 추가한 디스크를 인식하도록 함
↓
init 5
↓
디스크 추가
↓
부팅
↓
fdisk로 솔라리스 시스템 전체 할당
↓
partition으로 각 슬라이스마다 용량 할당
↓
newfs로 파일시스템 포맷(기본 ufs)
↓
mount로 슬라이스와 마운팅포인트를 마운트
↓
vi /etc/vfstab에 내용을 추가하여 자동 마운트 되도록 설정
2. 솔라리스 디스크 추가 방법
# touch /reconfigure / 에 reconfigure(빈 파일) 생성
# init 5 서버 셧다운 후 -> 하드 디스크 장착 후 -> 서버 파워 온
# prtconf 현재 시스템 장치의 구성 상황을 알기 위해서 사용하는 명령어
※ 참고
init S 단일 사용자 모드로 본쉘만 실행된 상태, 필수 파일 시스템만 마운트 된다.
init 0 시스템을 종료하고 부트 PROM 의 ok 프롬프트 상태가 된다.
init 1 단일 사용자 모드와 같으나, 모든 파일 시스템이 마운트 된다.
init 2 다중 사용자 모드로 NFS서버 데몬 제외, 일반적인 데몬은 모두 수행된다.
init 3 런 레벨2 와 같으나 NFS 서버 데몬까지 실행된 상태
init 4 미사용
init 5 시스템 종료
init 6 시스템 종료, 재부팅
# format format 명령어를 이용해서 현재 시스템에 부착된 디스크를 확인
Searching for disks...done
AVAILABLE DISK SELECTIONS:
0. c0d0 <DEFAULT cyl 44381 alt 2 hd 15 sec 63>
/pci@0,0/pci-ide@7,1/ide@0/cmdk@0,0
1. c0d1 <DEFAULT cyl 2077 alt 2 hd 16 sec 63>
/pci@0,0/pci-ide@7,1/ide@0/cmdk@1,0
2. c1d1 <DEFAULT cyl 4158 alt 2 hd 16 sec 63>
/pci@0,0/pci-ide@7,1/ide@1/cmdk@1,0
3. c2t0d0 <DEFAULT cyl 2556 alt 2 hd 128 sec 32>
/pci@0,0/pci15ad,1976@10/sd@0,0
4. c2t1d0 <DEFAULT cyl 98 alt 2 hd 64 sec 32>
/pci@0,0/pci15ad,1976@10/sd@1,0
5. c2t2d0 <DEFAULT cyl 509 alt 2 hd 64 sec 32>
/pci@0,0/pci15ad,1976@10/sd@2,0
Specify disk (enter its number): 5 5번 DISK 선택 ( 필자의 경우는 5번이지만, 추가 한 디스크를 선택 해야 함 )
selecting c2t2d0
[disk formatted]
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
fdisk - run the fdisk program
repair - repair a defective sector
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
inquiry - show vendor, product and revision
volname - set 8-character volume name
!<cmd> - execute <cmd>, then return
quit
format> fdisk 추가한 디스크의 공간을 어떤 용도로 쓸지 설정 ( 필자는 500MB 전체를 솔라리스 시스템 용도로 사용 할 예정 )
No fdisk table exists. The default partition for the disk is:
a 100% "SOLARIS System" partition
Type "y" to accept the default partition, otherwise type "n" to edit the
partition table.
y
format> Mar 28 15:40:08 server115 sendmail[244]: [ID 702911 mail.alert] unable to qualify my own domain name (server115) -- using short name
Mar 28 15:40:08 server115 sendmail[243]: [ID 702911 mail.alert] unable to qualify my own domain name (server115) -- using short name
format> verify verify 명령어를 입력하여 현재 디스크의 상태 확인
Warning: Primary label on disk appears to be different from
current label.
Warning: Could not read backup labels.
Warning: Check the current partitioning and 'label' the disk or use the
'backup' command.
Primary label contents:
Volume name = < >
ascii name = <DEFAULT cyl 508 alt 2 hd 64 sec 32>
pcyl = 510
ncyl = 508
acyl = 2
bcyl = 0
nhead = 64
nsect = 32
Part Tag Flag Cylinders Size Blocks
0 unassigned wm 0 0 (0/0/0) 0
1 unassigned wm 0 0 (0/0/0) 0
2 backup wu 0 - 507 508.00MB (508/0/0) 1040384
3 unassigned wm 0 0 (0/0/0) 0
4 unassigned wm 0 0 (0/0/0) 0
5 unassigned wm 0 0 (0/0/0) 0
6 unassigned wm 0 0 (0/0/0) 0
7 unassigned wm 0 0 (0/0/0) 0
8 boot wu 0 - 0 1.00MB (1/0/0) 2048
9 unassigned wm 0 0 (0/0/0) 0
format> partition partition 명령어를 이용하여 우리가 나눌 용량대로 슬라이스를 할당 (필자는 500MB 를 100MB/200MB/나머지 로 나눌 예정 )
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
!<cmd> - execute <cmd>, then return
quit
partition> 0 0번 슬라이스를 할당할 것이므로 0 입력
Part Tag Flag Cylinders Size Blocks
0 unassigned wm 0 0 (0/0/0) 0
Enter partition id tag[unassigned]: [Enter] ( 기본값 설정)
Enter partition permission flags[wm]: [Enter] ( 기본값 설정)
Enter new starting cyl[0]: 시작 실린더는 0 부터 시작이므로 기본값이 0 이기 때문에 [Enter]
Enter partition size[0b, 0c, 0e, 0.00mb, 0.00gb]: 100mb 100mb 설정
partition> print 지금까지 작업한 파티션 정보를 보여준다.
Current partition table (unnamed):
Total disk cylinders available: 508 + 2 (reserved cylinders)
Part Tag Flag Cylinders Size Blocks
0 unassigned wm 0 - 99 100.00MB (100/0/0) 204800
1 unassigned wm 0 0 (0/0/0) 0
2 backup wu 0 - 508 509.00MB (509/0/0) 1042432
3 unassigned wm 0 0 (0/0/0) 0
4 unassigned wm 0 0 (0/0/0) 0
5 unassigned wm 0 0 (0/0/0) 0
6 unassigned wm 0 0 (0/0/0) 0
7 unassigned wm 0 0 (0/0/0) 0
8 boot wu 0 - 0 1.00MB (1/0/0) 2048
9 unassigned wm 0 0 (0/0/0) 0
partition>
partition> 1
Part Tag Flag Cylinders Size Blocks
1 unassigned wm 0 0 (0/0/0) 0
Enter partition id tag[unassigned]:
Enter partition permission flags[wm]:
Enter new starting cyl[0]: 100 0번 슬라이드 다음 Cylinders 의 번호를 입력 0번이 99에 끝났으니깐 100을 입력
Enter partition size[0b, 0c, 100e, 0.00mb, 0.00gb]: 200mb
partition> print
Current partition table (unnamed):
Total disk cylinders available: 508 + 2 (reserved cylinders)
Part Tag Flag Cylinders Size Blocks
0 unassigned wm 0 - 99 100.00MB (100/0/0) 204800
1 unassigned wm 100 - 299 200.00MB (200/0/0) 409600
2 backup wu 0 - 508 509.00MB (509/0/0) 1042432
3 unassigned wm 0 0 (0/0/0) 0
4 unassigned wm 0 0 (0/0/0) 0
5 unassigned wm 0 0 (0/0/0) 0
6 unassigned wm 0 0 (0/0/0) 0
7 unassigned wm 0 0 (0/0/0) 0
8 boot wu 0 - 0 1.00MB (1/0/0) 2048
9 unassigned wm 0 0 (0/0/0) 0
partition>
partition> 3 2번 슬라이스는 기본적으로 backup 으로 사용하고 있으므로 사용하지 않아야 한다
Part Tag Flag Cylinders Size Blocks
3 unassigned wm 0 0 (0/0/0) 0
Enter partition id tag[unassigned]:
Enter partition permission flags[wm]:
Enter new starting cyl[0]: 300
Enter partition size[0b, 0c, 300e, 0.00mb, 0.00gb]: $
partition> print
Current partition table (unnamed):
Total disk cylinders available: 508 + 2 (reserved cylinders)
Part Tag Flag Cylinders Size Blocks
0 unassigned wm 0 - 99 100.00MB (100/0/0) 204800
1 unassigned wm 100 - 299 200.00MB (200/0/0) 409600
2 backup wu 0 - 508 509.00MB (509/0/0) 1042432
3 unassigned wm 300 - 507 208.00MB (208/0/0) 425984
4 unassigned wm 0 0 (0/0/0) 0
5 unassigned wm 0 0 (0/0/0) 0
6 unassigned wm 0 0 (0/0/0) 0
7 unassigned wm 0 0 (0/0/0) 0
8 boot wu 0 - 0 1.00MB (1/0/0) 2048
9 unassigned wm 0 0 (0/0/0) 0
partition> label partition 설정 저장
Ready to label disk, continue? y
partition> q
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
fdisk - run the fdisk program
repair - repair a defective sector
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
inquiry - show vendor, product and revision
volname - set 8-character volume name
!<cmd> - execute <cmd>, then return
quit
format> q
#
#
#
# newfs /dev/rdsk/c2t2d0s0
newfs: construct a new file system /dev/rdsk/c2t2d0s0: (y/n)? y
/dev/rdsk/c2t2d0s0: 204800 sectors in 100 cylinders of 64 tracks, 32 sectors
100.0MB in 7 cyl groups (16 c/g, 16.00MB/g, 7680 i/g)
super-block backups (for fsck -F ufs -o b=#) at:
32, 32832, 65632, 98432, 131232, 164032, 196832,
# newfs /dev/rdsk/c2t2d0s1
newfs: construct a new file system /dev/rdsk/c2t2d0s1: (y/n)? y
/dev/rdsk/c2t2d0s1: 409600 sectors in 200 cylinders of 64 tracks, 32 sectors
200.0MB in 13 cyl groups (16 c/g, 16.00MB/g, 7680 i/g)
super-block backups (for fsck -F ufs -o b=#) at:
32, 32832, 65632, 98432, 131232, 164032, 196832, 229632, 262432, 295232,
328032, 360832, 393632,
# newfs /dev/rdsk/c2t2d0s3
newfs: construct a new file system /dev/rdsk/c2t2d0s3: (y/n)? y
/dev/rdsk/c2t2d0s3: 425984 sectors in 208 cylinders of 64 tracks, 32 sectors
208.0MB in 13 cyl groups (16 c/g, 16.00MB/g, 7680 i/g)
super-block backups (for fsck -F ufs -o b=#) at:
32, 32832, 65632, 98432, 131232, 164032, 196832, 229632, 262432, 295232,
328032, 360832, 393632,
#
#
#
# mkdir /dbbalance1
# mkdir /dbbalance2
# mkdir /dbbalance3
#
# mount /dev/dsk/c2t2d0s0 /dbbalance1
# mount /dev/dsk/c2t2d0s1 /dbbalance2
# mount /dev/dsk/c2t2d0s3 /dbbalance3
#
# df -h
Filesystem size used avail capacity Mounted on
/dev/dsk/c0d0s0 4.8G 1.5G 3.2G 32% /
/proc 0K 0K 0K 0% /proc
mnttab 0K 0K 0K 0% /etc/mnttab
fd 0K 0K 0K 0% /dev/fd
/dev/dsk/c0d0s1 939M 30M 852M 4% /var
swap 2.3G 20K 2.3G 1% /var/run
swap 2.3G 4K 2.3G 1% /tmp
/dev/dsk/c2t1d0s0 91M 1.0M 81M 2% /data
/dev/dsk/c0d0s4 12G 12M 12G 1% /export/home
/vol/dev/dsk/c1t0d0/sol_9_905_x86_2
445M 445M 0K 100% /cdrom/sol_9_905_x86_2
/dev/dsk/c2t2d0s0 93M 1.0M 83M 2% /dbbalance1
/dev/dsk/c2t2d0s1 188M 1.0M 168M 1% /dbbalance2
/dev/dsk/c2t2d0s3 196M 1.0M 175M 1% /dbbalance3
#
#
# vi /etc/vfstab
"/etc/vfstab" 14 lines, 596 characters
#device device mount FS fsck mount mount
#to mount to fsck point type pass at boot options
#
fd - /dev/fd fd - no -
/proc - /proc proc - no -
/dev/dsk/c0d0s3 - - swap - no -
/dev/dsk/c0d0s0 /dev/rdsk/c0d0s0 / ufs 1 no -
/dev/dsk/c0d0s1 /dev/rdsk/c0d0s1 /var ufs 1 no -
/dev/dsk/c0d0s4 /dev/rdsk/c0d0s4 /export/home ufs 2 yes -
swap - /tmp tmpfs - yes -
/dev/dsk/c2t1d0s0 /dev/rdsk/c2t1d0s0 /data ufs 2 yes -
/dev/dsk/c2t2d0s0 /dev/rdsk/c2t2d0s0 /dbbalance1 ufs 3 yes - 직접 입력
/dev/dsk/c2t2d0s1 /dev/rdsk/c2t2d0s1 /dbbalance2 ufs 3 yes -
/dev/dsk/c2t2d0s3 /dev/rdsk/c2t2d0s3 /dbbalance3 ufs 3 yes -
3. 솔라리스 디스크의 네이밍
가. c # t # d # s #
c : controller name , c0, c1, c2, 보통 SCSI 카드의 번호
t : target number, t0, t1, t2, SCSI 카드의 케이블 연결 번호
d : disk number, d0, d1, d2 : SCSI 카드의 target에 디스크 젠더 등을 통해 연결할 때의 번호
s : slice number, s0, s1, s2, 디스크의 슬라이스 번호
※ 참고
1. 솔라리스의 슬라이스(slice)는 리눅스의 파티션과 같은 개념
2. x86 시스템에서 IDE 디스크를 장착할 때에는 target 번호는 생략
'Note > UNIX/LINUX 노트' 카테고리의 다른 글
Set DISPLAY environment variable, then re-run. (0) | 2013.08.27 |
---|---|
Scheduled Processing (0) | 2013.03.29 |
Special File Permission (0) | 2013.03.28 |
Managing User Access (0) | 2013.03.28 |
솔라리스 Putty 연결 설정 (0) | 2013.03.27 |