[LINUX] HDD 마운트 (포멧)

1. 설치된 하드디스크 확인하기

   다음 명령으로 설치된 디스크를 확인한다.

    # fdisk -l | grep '^Disk'
   출력화면

    Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
    Disk /dev/sdb: 2000.3 GB, 2000398934016 bytes



2. 포맷 먼저 하기
   mke2fs -T ext3 /dev/sdb


2. 파티션 설정하기

   다음 명령으로 파티션 삭제 및 설정을 합니다.

   # fdisk /dev/sdb

   출력화면

The number of cylinders for this disk is set to 243201.
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):




명령어

   a   toggle a bootable flag
   b   edit bsd disklabel
   c   toggle the dos compatibility flag
   d   delete a partition
   l   list known partition types
   m   print this menu
   n   add a new partition
   o   create a new empty DOS partition table
   p   print the partition table
   q   quit without saving changes
   s   create a new empty Sun disklabel
   t   change a partition's system id
   u   change display/entry units
   v   verify the partition table
   w   write table to disk and exit
   x   extra functionality (experts only)

2-1. 파티션 생성 : n

2-2. 파티션 볼륨 잡기 : p

2-3. 파티션 번호 지정 : 2

2-4. 파티션 볼륨 선택 : 숫자가 높은 것으로한다.

2-5. 성공했다면 : w


3. 포맷하기

   다음 명령으로 포맷을 합니다.

   # mkfs.ext3 -t /dev/sdb1


4. 마운트하기

   마운트할 폴터를 만듭니다.

   # mkdir /disk2




   마운트 합니다.

   # mount /dev/sdb1 /disk2



5. 부팅시 자동 마운트 되게 설정을 합니다.

   설정 파일을 오픈 합니다.

   # vi /etc/fstab


   다음을 추가 합니다.(맨 마지막에 추기함-재부팅후 성공 여부 확인)

   /dev/sdb1          /disk1             ext3         defaults             1   2


마운트 작동 여부 확인

mount -a

댓글

이 블로그의 인기 게시물

[MSSQL] 데이터베이스가 사용 중이어서 배타적으로 액서스할 수 없습니다

[LINUX] CentOS 부팅시 오류 : UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY

구글코랩) 안전Dream 실종아동 등 검색 오픈API 소스를 공유합니다. (구글드라이브연동, 이미지 수집 소스)