질문&답변
클라우드/리눅스에 관한 질문과 답변을 주고 받는 곳입니다.
리눅스 분류

하드디스크 추가시 어떻게 해야하나요?

작성자 정보

  • 지나가다 작성
  • 작성일

컨텐츠 정보

본문

..안뇽하세요...
음.. 먼저 디스크를 새로 추가 설치하신거와 동일하다면...
파티션 설정부터 해야할거 같네여...(device 명을... /dev/sda 로 가정...)

 # fdisk /dev/sda


The number of cylinders for this disk is set to 4982.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
   (e.g., DOS FDISK, OS/2 FDISK)

Command (m for help): p (현재파티션정보 보기)

Disk /dev/sda: 255 heads, 63 sectors, 4982 cylinders
Units = cylinders of 16065 * 512 bytes

   Device Boot    Start       End    Blocks   Id  System
/dev/sda1   *         1      4983  40021600+  83  Linux     ==> 파티션 사용중임
Partition 1 does not end on cylinder boundary:                  파티션 없는경우 공백표시
     phys=(1023, 15, 63) should be (1023, 254, 63)

##파티션정보가 있는경우
Command (m for help):  
d (파티션정보 삭제)
Partition number (1-4):    1(디바이스명옆에 숫자가 파티션영역 표기함)

Command (m for help): p (현재파티션정보 보기)

Disk /dev/sda: 255 heads, 63 sectors, 4982 cylinders
Units = cylinders of 16065 * 512 bytes

   Device Boot    Start       End    Blocks   Id  System

Command (m for help): n (새파티션 생성)
Command action
   e   extended
   p   primary partition (1-4)
p (주영역으로 설정)
Partition number (1-4): 1(파티션 번호 설정)
First cylinder (1-4982, default 1): 1(실린더 시작번호)
Last cylinder or +size or +sizeM or +sizeK (1-4982, default 4982): <enter>(디스크를 하나의 영역으로 사용할경우)
Using default value 4982
## 만약 용량으로 설정하는 방법 ==> 예) 2G설정   +2048M

Command (m for help):  w(파티션정보 저장) 

## 디스크포멧
mke2fs      -j     /dev/sda1    (ext3 file system 으로 포멧)

e2label      dev/sda1      /disk  ( device 에 대한 라벨 지정)
 mkdir     /disk  ( 마운트할 위치 디렉토리 생성)
 mount    /dev/sda1     /disk  (디스크마운트)
 more     /etc/mtab  (디스크마운트확인하기)
/dev/sda1 /disk ext3 rw 0 0   ==> 마운트 된것을 확인
 umount      /disk (디스크마운트 해제)
 vi      /etc/fstab (마운트 정보 편집)
LABEL=/disk            /disk                  ext3    defaults        1 2   ==> 추가후 저장
 mount  /disk (==> 라벨이름으로 마운트 하기)

## 시스템 재시작후 자동으로 마운트 돼는지 확인해 보시기 바랍니다.
즐건하루 되시길....

관련자료

댓글 0
등록된 댓글이 없습니다.

공지사항


뉴스광장


  • 현재 회원수 :  60,341 명
  • 현재 강좌수 :  37,019 개
  • 현재 접속자 :  333 명