--
Step1.
拆機器安裝或外接硬碟等等~
Step2.
用dmesg指令查看系統對新增硬碟的認定
[root@localhost /]# dmesg|grep hd|more
Step3.
利用fdisk建立新的分割並且儲存
[root@locahost /]# fdisk /dev/sdb ;指令下達後,請看最下方
Command (m for help):m ;按m去得到幫助,會出現一串文字
Command action
a toggle a bootable ;設定硬碟啟動區
b edit bsd disklabel
c toggle the dos compatibility flag
d delete a patition ;刪除硬碟分割區屬性
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 functionallity (experts only)
Command (m for help):n ;選此參數新增硬碟
Command action
e extended ;硬碟為[延伸]分割區
p primary partition ;硬碟為[主要]分割區
p ;一開始當然選主要分割區
Partition number (1-4):1 ;可以有四個主要分割區,請選其一
First cylinder (1-16431, default 1): ;從哪個磁柱開始,預設值1
Using default value 1
Last cylinder or +sizeM or +sizeK (1-16431, default 16431):16431
(上面一行是要你選這分割區最後的磁柱是哪,或使用MB與KB當單位,
例如: +1024K 這個分割區就等於 這麼大而已 了乎?)
Command (m for help):w 結束並且儲存
Step4.
開始為新的partition建立新的檔案格式
[root@locahost /]# mkfs -t ext3 /dev/sdb1 ;這樣那partition就建立成ext3的系統
Step5
mount(掛載) new file system
[root@locahost /]# mkdir /newhd ;製造一個目錄用來掛載
[root@locahost /]# mount -t ext3 /dev/sdb1 /newhd ;掛載到此目錄
[root@locahost /]# df -k ;查看你新掛載的磁碟狀態
Step6
修改/etc/fstab使開機能自動掛載
[root@locahost /]# vi /etc/fstab
在此檔案最底下新增
/dev/sdb1 /newhd ext3 defaults 1 1
分割區位置 掛載點 檔案格式 掛載參數 傾印 檢查
這樣以後開機就會多這顆硬碟了
拆機器安裝或外接硬碟等等~
Step2.
用dmesg指令查看系統對新增硬碟的認定
[root@localhost /]# dmesg|grep hd|more
Step3.
利用fdisk建立新的分割並且儲存
[root@locahost /]# fdisk /dev/sdb ;指令下達後,請看最下方
Command (m for help):m ;按m去得到幫助,會出現一串文字
Command action
a toggle a bootable ;設定硬碟啟動區
b edit bsd disklabel
c toggle the dos compatibility flag
d delete a patition ;刪除硬碟分割區屬性
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 functionallity (experts only)
Command (m for help):n ;選此參數新增硬碟
Command action
e extended ;硬碟為[延伸]分割區
p primary partition ;硬碟為[主要]分割區
p ;一開始當然選主要分割區
Partition number (1-4):1 ;可以有四個主要分割區,請選其一
First cylinder (1-16431, default 1): ;從哪個磁柱開始,預設值1
Using default value 1
Last cylinder or +sizeM or +sizeK (1-16431, default 16431):16431
(上面一行是要你選這分割區最後的磁柱是哪,或使用MB與KB當單位,
例如: +1024K 這個分割區就等於 這麼大而已 了乎?)
Command (m for help):w 結束並且儲存
Step4.
開始為新的partition建立新的檔案格式
[root@locahost /]# mkfs -t ext3 /dev/sdb1 ;這樣那partition就建立成ext3的系統
Step5
mount(掛載) new file system
[root@locahost /]# mkdir /newhd ;製造一個目錄用來掛載
[root@locahost /]# mount -t ext3 /dev/sdb1 /newhd ;掛載到此目錄
[root@locahost /]# df -k ;查看你新掛載的磁碟狀態
Step6
修改/etc/fstab使開機能自動掛載
[root@locahost /]# vi /etc/fstab
在此檔案最底下新增
/dev/sdb1 /newhd ext3 defaults 1 1
分割區位置 掛載點 檔案格式 掛載參數 傾印 檢查
這樣以後開機就會多這顆硬碟了
沒有留言:
張貼留言