본문 바로가기

Server

[Linux] 새로운 디스크 추가

- fdisk –l 명령어로 디스크 내역을 확인합니다.

 

[root@file /]# fdisk -l

Disk /dev/sda: 80.0 GB, 80026361856 bytes 
255 heads, 63 sectors/track, 9729 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        9729    78043770   8e  Linux LVM

Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes 
255 heads, 63 sectors/track, 121601 cylinders 
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System 
/dev/sdb1               1      121601   976760001   83  Linux

Disk /dev/sdc: 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/sdc1   *           1       60801   488384001   83  Linux

Disk /dev/sdd: 1000.2 GB, 1000204886016 bytes 
255 heads, 63 sectors/track, 121601 cylinders 
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System

 

- fdisk /dev/sdd 명령어로 파티션을 설정합니다.

 

[root@file /]# fdisk /dev/sdd

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

Command (m for help): n 
Command action 
   e   extended 
   p   primary partition (1-4) 
p 
Partition number (1-4): 1 
First cylinder (1-121601, default 1): 1 
Last cylinder or +size or +sizeM or +sizeK (1-121601, default 121601): 121601

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

Calling ioctl() to re-read partition table.

 

- mkfs –t ext3 /dev/sdd1  명령어로 포맷

 

[root@file /]# mkfs -t ext3 /dev/sdd1 
mke2fs 1.39 (29-May-2006) 
Filesystem label= 
OS type: Linux 
Block size=4096 (log=2) 
Fragment size=4096 (log=2) 
122109952 inodes, 244190000 blocks 
12209500 blocks (5.00%) reserved for the super user 
First data block=0 
Maximum filesystem blocks=4294967296 
7453 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: done                            
Creating journal (32768 blocks): done 
Writing superblocks and filesystem accounting information: 

 

- fdisk –l 명령어로 생성된 디스크 영역을 확인

 

[root@file /]# fdisk -l

Disk /dev/sda: 80.0 GB, 80026361856 bytes 
255 heads, 63 sectors/track, 9729 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        9729    78043770   8e  Linux LVM

Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes 
255 heads, 63 sectors/track, 121601 cylinders 
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System 
/dev/sdb1               1      121601   976760001   83  Linux

Disk /dev/sdc: 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/sdc1   *           1       60801   488384001   83  Linux

Disk /dev/sdd: 1000.2 GB, 1000204886016 bytes 
255 heads, 63 sectors/track, 121601 cylinders 
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System 
/dev/sdd1               1      121601   976760001   83  Linux