본문 바로가기
Tech

하드 추가시

by ohrohi 2016. 8. 30.
파일시스템

-window - NTFS
-linux - ext
         5.X - ext3
         6.X, 7.X - ext4
-리눅스 버전정보 확인 - rpm -qa *-release

-HDD 추가

#fdisk -l

Disk /dev/sda: 128.0 GB, 128035676160 bytes
255 heads, 63 sectors/track, 15566 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          64      514048+  83  Linux
/dev/sda2              65         586     4192965   82  Linux swap / Solaris
/dev/sda3             587       15566   120326850   83  Linux

WARNING: The size of this disk is 8.0 TB (7999955402752 bytes).
DOS partition table format can not be used on drives for volumes
larger than 2.2 TB (2199023255040 bytes). Use parted(1) and GUID
partition table format (GPT).


Disk /dev/sdb: 7999.9 GB, 7999955402752 bytes
255 heads, 63 sectors/track, 972605 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes


-파티션 생성

#fdisk /dev/sdb


Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-972605, default 1): 1
Last cylinder or +size or +sizeM or +sizeK (1-267349, default 267349):
Using default value 267349
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.


-포멧

#mkfs.ext3 /dev/sdb

작업 확인

#disk -l

Disk /dev/sda: 128.0 GB, 128035676160 bytes
255 heads, 63 sectors/track, 15566 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          64      514048+  83  Linux
/dev/sda2              65         586     4192965   82  Linux swap / Solaris
/dev/sda3             587       15566   120326850   83  Linux

WARNING: The size of this disk is 8.0 TB (7999955402752 bytes).
DOS partition table format can not be used on drives for volumes
larger than 2.2 TB (2199023255040 bytes). Use parted(1) and GUID
partition table format (GPT).


Disk /dev/sdb: 7999.9 GB, 7999955402752 bytes
255 heads, 63 sectors/track, 972605 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1      267349  2147480811   83  Linux




-마운트

#mount /dev/sdb1 /data

-부팅시 마운트 정보 입력
#vi /etc/fatab

#/dev/sdb1  /data      ext3    defaults    1 2

맨아래 추가


-리마운트

mount -o remount r,w /
vi /etc/fstab


'Tech' 카테고리의 다른 글

ssh su 명령어시 권한이 없다고 나올때  (0) 2016.08.30
sendmail 설치 및 설정  (0) 2016.08.30
root 패스워드 분실시  (0) 2016.08.30
ftp 접속 에러 1.  (0) 2016.08.30
rsync 옵션  (0) 2016.08.30