redhat 5.5 버전에서 실행함..
root 계정으로 먼저 접속해서 실행.
$> fdisk -l
마운트되지 않은 디스크가 있는지 디스크 확인부터 한다. 기존 마운트 된 파티션 밑에 마운트 되지 않은 디스크가 보인다면 마운트가 가능한 상태.
Disk /dev/cciss/c0d0: 220.1 GB, 220122071040 bytes
255 heads, 63 sectors/track, 26761 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/aaa * 1 13 104391 83 Linux
/dev/bbb 14 6540 52428127+ 83 Linux
/dev/ccc 6541 7845 10482412+ 83 Linux
...
...
...
Disk /dev/ddd: 299.9 GB, 299966445568 bytes
255 heads, 32 sectors/track, 71798 cylinders
Units = cylinders of 8160 * 512 = 4177920 bytes
Device Boot Start End Blocks Id System
$> fdisk /dev/ddd
fdisk를 사용해서 마운트를 한다. fdisk 명령어 다음에 디스크 이름을 적는다. 간단하게 fdisk 명령어를 보자면
p 는 파티션 정보 n 은 새로운 파티션 생성, d는 파티션 삭제, w는 저장 이다. 위 명령어를 실행하면 다음과 같은 화면이 나온다.
Command (m for help): n --> n으로 새로운 파티션을 생성
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1 -- > 파티션 개수를 선택(1개)
First cylinder (1-71798, default 1): 1 -- > 시작 실린더 위치
Last cylinder or +size or +sizeM or +sizeK (1-71798, default 71798): -->마지막 실린더 위치(엔터)
Using default value 71798
Command (m for help): p -- >파티션 확인
Disk /dev/ddd: 299.9 GB, 299966445568 bytes
255 heads, 32 sectors/track, 71798 cylinders
Units = cylinders of 8160 * 512 = 4177920 bytes
Device Boot Start End Blocks Id System
/dev/ddd 1 71798 292935824 83 Linux
Command (m for help): w --> 저장
The partition table has been altered!
$> mkfs.ext[n] /dev//ddd
파일 시스템에 맞게 포맷한다.
$> mount /dev/ddd /backup
마운트 시켜주고.
$> e2label /dev/ddd /backup
e2label 명령어로 라벨명도 만들어주고..(fstab 파일에서 label 을 사용하지 않는다면 안해주어도 무방함)
fstab 파일을 수정하기전에 혹시 모르니.. 파일 내용을 백업해두던가 메모장에 복사해놓자. 부팅이 실패할 경우를 대비해서!!!!
$> vim /etc/fstab
fstab 파일을 열고,
LABEL=/ / ext3 defaults 1 1
LABEL=/home /home ext3 defaults 1 2
..
..
LABEL=/backup /backup ext3 defaults 1 2 <--1
/dev/ddd /backup ext3 defaults 1 2 <--2
'Server' 카테고리의 다른 글
RHEL 6.x ftp 접속 장애 500 OOPS: cannot change directory:/home/user (0) | 2013.02.20 |
---|---|
redhat 에서 telnet 설정하기 (0) | 2013.02.20 |
redhat 마운트 이름 변경 mount, umount, e2label 사용 (0) | 2013.02.12 |
linux ctags 사용법 (0) | 2012.12.13 |
리눅스에서 사용하는 명령어들.. 메모 (0) | 2012.10.30 |