歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux綜合 >> Linux資訊 >> 更多Linux >> 新手學堂:Linux操作系統下進行硬盤擴容

新手學堂:Linux操作系統下進行硬盤擴容

日期:2017/2/27 9:51:35   编辑:更多Linux

本人硬盤擴容的步驟,注意:機器一定要先關機,然後在插硬盤,否則機器不是宕機就報一群IO錯誤。

1,啟動機器後 按 F8 鍵進入陣列管理 先 view logical driver 看看自己實際存在的物理硬盤個數及其所占的端口,然後 careate logical driver 很據實際需要選擇 radius[0] [0+1] [1],我選擇radius[0],按 F8 存盤退出 注意: 如果創建錯誤 運行 delete logical driver 進行刪除,最後重啟機器

2,查看現有文件系統

df -k

文件系統 1K-塊 已用 可用 已用% 掛載點

/dev/cciss/c0d0p1 98747 14994 78654 17% /boot

/dev/cciss/c0d0p7 21525300 5074728 15357136 25% /home

/dev/cciss/c0d1p1 70009904 553120 65900456 1% /old

根據結果推薦 新增家物理設備在Linux系統中的設備名,以上最到編號是 c0d1,由此我們可以推斷新設備名稱為 c0d2。

3,驗證新設備名的准確性

sfdisk -l /dev/cciss/c0d2

Disk /dev/cciss/c0d2: 17433 cylinders, 255 heads, 32 sectors/track

sfdisk: ERROR: sector 0 does not have an msdos signature

/dev/cciss/c0d2: unrecognized partition

4,對新設備進行分區

fdisk /dev/cciss/c0d2

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-17433, default 1):

Using default value 1

Last cylinder or +size or +sizeM or +sizeK (1-17433, default 17433):

Using default value 17433

Command (m for help): w

The partition table has been altered!

5,給新分區的存儲設備創建linux文件系統: mkfs -t ext3 /dev/cciss/c0d2p1

6, 把文件系統過載到新的目錄: mount /dev/cciss/c0d2p1 /目錄

ok,到現在你的硬盤已經添加到系統,你可以使用的新硬盤了,空間好大,呵呵。

注意:1,文件掛錯了,可以用 umount /dev/cciss/c0d2p1 /目錄 進行卸載

2,萬一陣列管理程序找不見硬盤及其現有硬盤也不見了,那你新插入的盤一定是壞盤 哈哈 以上情況我全遇到了。




Copyright © Linux教程網 All Rights Reserved