# fdisk -l

=> 디스크 목록 확인 

Device

Boot

Start

End

Blocks

 Id

System

/dev/xvda1

64 

 512000

83 

Linux 

/dev/xvda2

 

64

13055 

104344576 

8e 

Linux LVM 

Partition 1 does not end on cylinder boundary.


Disk /dev/xvdb: 214.7 GB, 214748364800 bytes

255 heads, 63 sectors/track, 26108 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk identifier: 0x00000000

=> 빨간 이름이 디스크이름 xvdb가 추가 디스크



# fdisk /dev/xvdb

Command (m for help):  p (빈 디스크인지 확인* 파티션 확인) => 

n => 

  e   extended
  p   primary partition (1-4)

p => 

Partition number (1-4) = 1(1이있다고 하면 2 )

First cylinder (1-130, default 1): 1

Last cylinder, +cylinders or +size{K,M,G} : +500M (전체 사용시 엔터 )

정상 일 경우 커맨드로 돌아 옴 . 다시 P를 통해 파티션 확인



Command (m for help): n =>

e

Selected partition : 2 (위 Partition number 와 일치)

First cylinder : 디폴트 값

Last cylinder, +cylinders or +size{K,M,G} : 디폴트 값

커맨드에서 p 파티션 확인


위와 동일 하게 로지컬 파티션도 만듬 * 입력 값은 모두 디폴트


(정상 저장 메세지)

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.




# mkfs.ext4 /dev/xvdb

== 정상 처리 메세지 ==

Writing inode tables: done
Creating journal (8192 blocks): done
Writing superblocks and filesystem accounting information: done

== 정상 처리 메세지 ==


# cd /

# mkdir /data

# mount /dev/xvdb /data

# df -h


// mount 삭제 시 

# cd ~

# umount /dev/xvdb

# cd /

# rm -r xvdb




재부팅 시 재등록 해야 되는 경우


# vi /etc/fstab

/dev/xvdb    /home     ext4    defaults        1 2

위 구문 추가 후 재부팅 해볼 것 



+ Recent posts