본문 바로가기
Solaris

Solaris 디스크 추가

by 레이루이 2008. 5. 5.
반응형
HARD disk 추가
  OK probe-scsi 또는 probe-ide 또는 probe-fcal명령으로 disk 확인
 
  설치 방법
  OK boot -r
  -r option은 새로 설치된 디바이스를 kernel에 인식시키는 option
 
  @partition 나누기
  format 명령을 실행하면 시스템에 연결된 하드디스크가 0번부터 선택할 수 있도록
  나열되어 보여진다. 새로 연결한 디스크 번호를 선택한 후 enter키를 친다.
  #format
  Searching for disks...done
 
 
  AVAILABLE DISK SELECTIONS:
   0. c0t0d0
   /sbus@2,0/SUNW,socal@d,10000/sf@0,0/ssdw21000020379ca2dd,0
   1. c0t1d0
   /sbus@2,0/SUNW,socal@d,10000/sf@0,0/ssdw21000020379ca2dd,0
  Specify disk (enter its number):1
  selecting c0t1d0
  [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
   repair - repair a defective sector
   label - write label to the disk
   analyze - surface analysis
   defect - defect list management
   backup - search for display labels
   verify - read and display labels
   save - save new disk/partition definitions
   inquiry - show vendor, product and revision
   volname - set 8-character volume name
   ! - execute , then return
   quit
  format> p
  (format프롬프트에서 p 키를 친다)
  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>p
  (partition 프롬프트상태에서 다시 p키를 쳐서 현재 디스크의 용량을 print한다)
  Current partition table (original):
  Total disk cylinders available: 11697 + 2 (reserver cylinders)
 
  Part Tag Flag Cylinders Size Blocks
   0 unassigned wm 0 - 1034 1.50GB (1035/0/0) 3146400
   1 unassigned wm 1035 - 2414 2.00GB (1380/0/0) 4195200
   2 backup wu 0 - 11696 16.96GB (11697/0/0) 35558880
   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 2415 - 11696 13.46GB (9282/0/0) 28217280
   7 unassigned wm 0 0 (0/0/0) 0
 
  (print결과 2번 slice가 전체 용량을 보여주며, 위의 결과에서 전체 디스크용량
  은 16.96GB이며 11697개의 cylinder를 가지고 있음을 알 수 있다. 사용할 슬라이스
  와 할당할 사이즈를 아래와 같이 0번,1번,6번 slice에 할당된 영역은 지우고 7번
  slice에 전체 디스크를 하나의 slice로 잡는다)
  partition>0
  Part Tag Flag Cylinders Size Blocks
  0 unassigned wm 0 - 1034 1.50GB (1035/0/0) 3146400
 
  Enter partition id tag[unassigned]:
  Enter partition permission flags[wm]:
  Enter new starting cyl[0]: 0
  Enter partition size[3146400b, 1035c, 1536.33mb, 1.50gb]: 0
  partition>1
  Part Tag Flag Cylinders Size Blocks
   1 unassigned wm 1035 - 2414 2.00GB (1380/0/0) 4195200
 
  Enter partition id tag[unassigned]:
  Enter partition permission flags[wm]:
  Enter new starting cyl[0]: 0
  Enter partition size[4195200b, 1380c, 2048.44mb, 2.00gb]: 0
  partition>6
  Part Tag Flag Cylinders Size Blocks
   6 unassigned wm 2415 - 11696 13.46GB (9282/0/0) 28217280
 
  Enter partition id tag[unassigned]:
  Enter partition permission flags[wm]:
  Enter new starting cyl[0]: 0
  Enter partition size[28217280b, 9282c, 13777.97mb, 13.46gb]: 0
  partition>7
  Part Tag Flag Cylinders Size Blocks
   7 unassigned wm 0 0 (0/0/0) 0
 
  Enter partition id tag[unassigned]:
  Enter partition permission flags[wm]:
  Enter new starting cyl[0]: 0
  Enter partition size[0b, 0c, 0.00mb, 0.00gb]: $
  partition>label
  Ready to label disk, continue? y
 
  partition>q
 
  format>q
 
  @ newfs실행 (file system만들기)
  #newfs /dev/rdsk/c0t1d0s7
  c0t1d0s7은 새 디스크에 만든 slice의 device이름이다.
 
  @ vfstab file수정(booting시 disk가 mount되도록 해주는 file)
  #vi /etc/vfstab
  #device device mount FS fsck mount mount
  #to mount to fsck point type pass at boot options
  #
  #/dev/dsk/c1d0s2 /dev/rdsk/c1d0s2 /usr ufs 1 yes -
  fd - /dev/fd fd - no -
  /proc - /proc proc - no -
  /dev/dsk/c0t0d0s1 - - swap - no -
  /dev/dsk/c0t0d0s0 /dev/rdsk/c0t0d0s0 / ufs 1 no
  -
  /dev/dsk/c0t0d0s7 /dev/rdsk/c0t0d0s7 /home1 ufs 2 yes
  -
  /dev/dsk/c0t1d0s7 /dev/rdsk/c0t1d0s7 /home2 ufs 3 yes
  -
  swap - /tmp tmpfs - yes -
 
 
  @ mount하기
  #mkdir home2 --> mount point를 만들어준다.
 
  #mount home2 --> vfstab의 정보를 이용 home2가 mount된다.
 
  #df -k --> mount 확인
반응형