웹모아 
웹모아  로그인  회원가입   
웹모아
 
서버운영
 


  하드디스크 추가 - 파티션설정, 포멧, 마운트
  등록: 2012-05-05 09:18:55 조회:4497


디스크정보
[root@localhost ~]# fdisk -l

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

Disk /dev/sdc doesn't contain a valid partition table

파티션 설정
[root@localhost ~]# fdisk /dev/sdc
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):
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-243201, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-243201, default 243201): 143000

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

Calling ioctl() to re-read partition table.

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.
Syncing disks.
[root@localhost ~]# fdisk -l

Disk /dev/sda: 120.0 GB, 120034123776 bytes
255 heads, 63 sectors/track, 14593 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 14593 117113850 8e Linux LVM

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

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

Device Boot Start End Blocks Id System
/dev/sdc1 1 143000 1148647468+ 83 Linux
[root@localhost ~]#

[root@localhost ~]# fdisk /dev/sdc

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): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 2
First cylinder (143001-243201, default 143001):
Using default value 143001
Last cylinder or +size or +sizeM or +sizeK (143001-243201, default 243201):
Using default value 243201

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

Calling ioctl() to re-read partition table.
Syncing disks.
[root@localhost ~]# fdisk -l
Disk /dev/sdc: 2000.3 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sdc1 1 143000 1148647468+ 83 Linux
/dev/sdc2 143001 243201 804864532+ 83 Linux

마운트 정보보기
[root@localhost ~]# mount
/dev/mapper/VolGroup00-LogVol00 on / type ext3 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
/dev/sda1 on /boot type ext3 (rw)
tmpfs on /dev/shm type tmpfs (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
/dev/sdb1 on /etcc2 type ext3 (rw)

포멧하기
[root@localhost ~]# mkfs.ext3 /dev/sdc1
mke2fs 1.39 (29-May-2006)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
143589376 inodes, 287161867 blocks
14358093 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=0
8764 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: ^[[3;5~done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 29 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.

리눅스에서 파티션의 파일 시스템 타입 확인하기
[root@localhost ~]# df -T
Filesystem Type 1K-blocks Used Available Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
ext3 108430192 65050444 37782976 64% /
/dev/sda1 ext3 101086 48941 46926 52% /boot
tmpfs tmpfs 1542860 0 1542860 0% /dev/shm

하드 디스크 마운트
[root@localhost ~]# mkdir /etcc33
[root@localhost ~]# mount /dev/sdc1 /etcc33

[root@localhost ~]# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
108430192 65050288 37783132 64% /
/dev/sda1 101086 48941 46926 52% /boot
tmpfs 1542860 0 1542860 0% /dev/shm
/dev/sdb1 480719056 409478720 46821136 90% /etcc2
/dev/sdc1 1130623364 203812 1072987180 1% /etcc33
[root@localhost ~]#


 

 댓글 (0)





서버운영
페이지: 1 / 1   


   서브도메인 자동셋팅 Rewrite(리눅스 BIND,3563
하드디스크 추가 - 파티션설정, 포멧, 마운트4498
   smartctl을 이용한 하드디스크 진단2028
≪ [1]   ≫

복수단어 검색은 공백(space)로 구분해 주세요.




공지사항
 
인기 글
5022
4042
4791
9950
3808
3947
3798
4008
4354
6528
4491
4428
4972
10158
4950
 
최근 글
127
200
169
134
104
127
2932
755
740
929
804
4014
3361
3407
3798