国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 系統 > Linux > 正文

詳解Linux下掛載新硬盤方法

2019-11-02 15:55:15
字體:
來源:轉載
供稿:網友

Linux的硬盤識別:

一般使用”fdisk -l”命令可以列出系統中當前連接的硬盤

設備和分區信息.新硬盤沒有分區信息,則只顯示硬盤大小信息.

1.關閉服務器加上新硬盤

2.啟動服務器,以root用戶登錄

3.查看硬盤信息

#fdisk -l
Disk /dev/sda: 42.9 GB, 42949672960 bytes 255 heads, 63 sectors/track, 5221 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x0004406e   Device Boot   Start     End   Blocks  Id System /dev/sda1  *      1     39   307200  83 Linux Partition 1 does not end on cylinder boundary. /dev/sda2       39    2589  20480000  83 Linux /dev/sda3      2589    2850   2097152  82 Linux swap / Solaris /dev/sda4      2850    5222  19057664  5 Extended /dev/sda5      2850    5222  19056640  83 Linux   Disk /dev/sdb: 10.7 GB, 10737418240 bytes 255 heads, 63 sectors/track, 1305 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x14b52796   Device Boot   Start     End   Blocks  Id System 

4.創建新硬盤分區命令參數:

fdisk可以用m命令來看fdisk命令的內部命令;

a:命令指定啟動分區; d:命令刪除一個存在的分區; l:命令顯示分區ID號的列表; m:查看fdisk命令幫助; n:命令創建一個新分區; p:命令顯示分區列表; t:命令修改分區的類型ID號; w:命令是將對分區表的修改存盤讓它發生作用。

5.進入磁盤,對磁盤進行分區,注意紅色部分。

#fdisk /dev/sdb
Command (m for help):n Command action     e  extended         //輸入e為創建擴展分區     p  primary partition (1-4)   //輸入p為創建邏輯分區 p Partion number(1-4):1   //在這里輸入l,就進入劃分邏輯分區階段了; First cylinder (51-125, default 51):  //注:這個就是分區的Start 值;這里最好直接按回車,如果您輸入了一個非默認的數字,會造成空間浪費; Using default value 51 Last cylinder or +size or +sizeM or +sizeK (51-125, default 125): +200M 注:這個是定義分區大小的,+200M 就是大小為200M ;當然您也可以根據p提示的單位cylinder的大小來算,然后來指定 End的數值。回頭看看是怎么算的;還是用+200M這個辦法來添加,這樣能直觀一點。如果您想添加一個10G左右大小的分區,請輸入 +10000M ;  Command (m for help): w           //最后輸入w回車保存。 

查看一下:

#fdisk -l

可以看到/dev/sdb1分區,我就省略截圖咯。

6.格式化分區:

#mkfs.ext3 /dev/sdb1      //注:將/dev/sdb1格式化為ext3類型
mke2fs 1.41.12 (17-May-2010) 文件系統標簽= 操作系統:Linux 塊大小=4096 (log=2) 分塊大小=4096 (log=2) Stride=0 blocks, Stripe width=0 blocks 640848 inodes, 2562359 blocks 128117 blocks (5.00%) reserved for the super user 第一個數據塊=0 Maximum filesystem blocks=2625634304 79 block groups 32768 blocks per group, 32768 fragments per group 8112 inodes per group Superblock backups stored on blocks:     32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632   正在寫入inode表: 完成 Creating journal (32768 blocks): 完成 Writing superblocks and filesystem accounting information: 完成   This filesystem will be automatically checked every 35 mounts or 180 days, whichever comes first. Use tune2fs -c or -i to override. 
發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 宣武区| 宿松县| 枣庄市| 高雄市| 古田县| 芦溪县| 仁寿县| 宿迁市| 宁陵县| 孟村| 柳河县| 垦利县| 江源县| 吴旗县| 玛沁县| 阿拉善左旗| 文化| 彭阳县| 贞丰县| 桦甸市| 长子县| 阆中市| 铁力市| 长沙市| 科技| 林芝县| 泾川县| 龙陵县| 清新县| 壶关县| 潞城市| 南木林县| 筠连县| 平舆县| 望江县| 株洲县| 道孚县| 日喀则市| 台中县| 铜山县| 高安市|