티스토리 뷰

파티션 확인

 

[root@localhost ~]# fdisk -l

 

기존파티션

Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          13      104391   83  Linux
/dev/sda2              14        1160     9213277+  82  Linux swap / Solaris
/dev/sda3            1161       60801   479066332+  83  Linux

 

추가한 하드는 아래와 같이 출력

Disk /dev/sdb: 2000.3 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

 

 

파티션 생성할 드라이브 선택

 

root@localhost ~]# fdisk /dev/sdb

Command (m for help): n 입력

Command action : p 입력
e extended
p primary partition (1-4)

 

Partition number (1-4): 1 입력
First cylinder (1-243201, default 1): 1 입력
Last cylinder or +size or +sizeM or +sizeK (1-243201, default 243201): 243201 입력

 

Command (m for help): w 입력


The partition table has been altered!

 

아래와 같이 떳었다 작업완료후

WARNING: Re-reading the partition table failed with error 16: 장치나 자원이 동작 중.
The kernel still uses the old table.
The new table will be used at the next reboot.

 

 

파티션 생성한 하드디스크 포맷하기

[root@localhost ~]# mkfs.ext3 /dev/sdb1


mke2fs 1.39 (29-May-2006)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
244203520 inodes, 488378000 blocks
24418900 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=4294967296
14905 block groups
32768 blocks per group, 32768 fragments per group
16384 inodes per group
Superblock backups stored on blocks:
        32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
        4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968,
        102400000, 214990848

Writing inode tables:  1716/14905

 

포맷 완료후 디렉토리 생성후  파티션 연결하기

mkdir /backup

mount /dev/sdb1 /backup

 

/etc/fstab 에 아래 내용 추가

/dev/sdb1               /backup                 ext3    defaults        1 1

 

리부팅 해보자 정상적으로 올라오면 된것임 

 

댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2025/02   »
1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28
글 보관함