Cent OS

CentOSにハードディスク増設

最近は、2TBや3TBのハードディスクが安くなってきているので、増設を行う。

gdiskの準備

2TB以上のハードディスクの領域を扱うには、fdiskよりgdiskの方が 便利。

そのため、yumでインストールするが、epelリポジトリがつかえるようにする登録が必要。

下記ホームページにある、

http://ftp.riken.jp/Linux/fedora/epel/6/i386/repoview/epel-release.html

  • epel-release-6-8.noarch.rpm をインストールする。

(このページにも添付しておきます。)

rpm -ivh /home/fujio/epel-release-6-8.noarch.rpm
  • 次にgdiskをyumでインストール
yum install gdisk
  • 2番目のSTATディスクなら、/dev/sdbなので(注意!!!!!!!)
gdisk /dev/sdbとする
  • まず、パーティションを
# gdisk /dev/sdb

GPT fdisk (gdisk) version 0.8.4

Partition table scan:

 MBR: MBR only
 BSD: not present
 APM: not present
 GPT: not present

************************************************************

Found invalid GPT and valid MBR; converting MBR to GPT format. THIS OPERATION IS POTENTIALLY DESTRUCTIVE! Exit by typing 'q' if you don't want to convert your MBR partitions to GPT format!

************************************************************

Command (? for help): n Partition number (1-128, default 1): First sector (34-3907029134, default = 2048) or {+-}size{KMGTP}: Last sector (2048-3907029134, default = 3907029134) or {+-}size{KMGTP}: Current type is 'Linux filesystem' Hex code or GUID (L to show codes, Enter = 8300): Changed type of partition to 'Linux filesystem'

Command (? for help): w

Final checks complete. About to write GPT data. THIS WILL OVERWRITE EXISTING PARTITIONS!!

Do you want to proceed? (Y/N): Y OK; writing new GUID partition table (GPT) to /dev/sdb. The operation has completed successfully.

gdisk /dev/sdb
GPT fdisk (gdisk) version 0.8.4 

Partition table scan:
  MBR: protective
  BSD: not present
  APM: not present
  GPT: present 

Found valid GPT with protective MBR; using GPT.

Command (? for help): p
Disk /dev/sdb: 3907029168 sectors, 1.8 TiB
Logical sector size: 512 bytes
Disk identifier (GUID): A44F6289-32B2-4EDA-9D0E-BF4228EBE4A6
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 3907029134
Partitions will be aligned on 2048-sector boundaries
Total free space is 2014 sectors (1007.0 KiB) 

Number  Start (sector)    End (sector)  Size       Code  Name
   1            2048      3907029134   1.8 TiB     8300  Linux filesystem 

Command (? for help): q
  • File Systemを作る
  • ext3の場合
mkfs -t ext3 /dev/sdb1

mke2fs 1.41.12 (17-May-2010)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=1 blocks, Stripe width=0 blocks
122101760 inodes, 488378385 blocks
24418919 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
8192 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: done  

This filesystem will be automatically checked every 38 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.
  • ext3の場合のdf
/dev/sdb1            1922859892    200160 1824984056   1% /app
  • ext4の場合(だいぶ初期化に時間がかかる)
    mkfs -t ext4 /dev/sdb1
    mke2fs 1.41.12 (17-May-2010)
    Filesystem label=
    OS type: Linux
    Block size=4096 (log=2)
    Fragment size=4096 (log=2)
    Stride=1 blocks, Stripe width=0 blocks
    122101760 inodes, 488378385 blocks
    24418919 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
    8192 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: done




This filesystem will be automatically checked every 36 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.
  • ext4 の場合
/dev/sdb1            1922859892    200028 1824984188   1% /app
  • マウントする
mount /dev/sdb1 /app
  • Auto Mountするように、設定する

添付ファイル: fileepel-release-6-8.noarch.rpm 79件 [詳細]

トップ   編集 凍結 差分 バックアップ 添付 複製 名前変更 リロード   新規 一覧 単語検索 最終更新   ヘルプ   最終更新のRSS
Last-modified: 2016-08-29 (月) 21:41:06 (1266d)