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

首頁 > 系統 > Linux > 正文

Linux磁盤分區實戰案例(必看篇)

2019-11-02 16:43:38
字體:
來源:轉載
供稿:網友

一.查看新添加磁盤

[root@localhost /]# fdisk -l 磁盤 /dev/sda:53.7 GB, 53687091200 字節,104857600 個扇區Units = 扇區 of 1 * 512 = 512 bytes扇區大小(邏輯/物理):512 字節 / 512 字節I/O 大小(最小/最佳):512 字節 / 512 字節磁盤標簽類型:dos磁盤標識符:0x0009f1d1   設備 Boot   Start     End   Blocks  Id System/dev/sda1  *    2048   1026047   512000  83 Linux/dev/sda2     1026048   5253119   2113536  82 Linux swap / Solaris/dev/sda3     5253120  104857599  49802240  83 Linux 磁盤 /dev/sdb:21.5 GB, 21474836480 字節,41943040 個扇區Units = 扇區 of 1 * 512 = 512 bytes扇區大小(邏輯/物理):512 字節 / 512 字節I/O 大小(最小/最佳):512 字節 / 512 字節磁盤標簽類型:dos磁盤標識符:0x12f9141b   設備 Boot   Start     End   Blocks  Id System/dev/sdb1      2048  10487807   5242880  83 Linux

 二.磁盤分區

[root@localhost /]# fdisk /dev/sdb歡迎使用 fdisk (util-linux 2.23.2)。 更改將停留在內存中,直到您決定將更改寫入磁盤。使用寫入命令前請三思。  命令(輸入 m 獲取幫助):n                                                         (n為創建分區)Partition type:  p  primary (1 primary, 0 extended, 3 free)                                            (p為主分區)  e  extended                                                                   (e為擴展分區)Select (default p): p分區號 (2-4,默認 2):2起始 扇區 (10487808-41943039,默認為 10487808):將使用默認值 10487808Last 扇區, +扇區 or +size{K,M,G} (10487808-41943039,默認為 41943039):+5G            (分區的大小)分區 2 已設置為 Linux 類型,大小設為 5 GiB 命令(輸入 m 獲取幫助):w                                                         (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 atthe next reboot or after you run partprobe(8) or kpartx(8)正在同步磁盤。

三.磁盤格式化

[root@localhost /]# partprobe /dev/sdb2                          (刷新分區表)[root@localhost /]# mke2fs /dev/sdb2mke2fs 1.42.9 (28-Dec-2013)文件系統標簽=OS type: Linux塊大小=4096 (log=2)分塊大小=4096 (log=2)Stride=0 blocks, Stripe width=0 blocks327680 inodes, 1310720 blocks65536 blocks (5.00%) reserved for the super user第一個數據塊=0Maximum filesystem blocks=134217728040 block groups32768 blocks per group, 32768 fragments per group8192 inodes per groupSuperblock backups stored on blocks:    32768, 98304, 163840, 229376, 294912, 819200, 884736 Allocating group tables: 完成              正在寫入inode表: 完成              Writing superblocks and filesystem accounting information: 完成 

四.創建目錄并掛載分區

[root@localhost /]# mkdir /soft[root@localhost /]# mount /dev/sdb2 /soft

五.設置開機自掛載

[root@localhost /]# vim /etc/fstab /dev/sdb2     /soft     xfs     defaults    0   0
發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 汝南县| 荔浦县| 青阳县| 南京市| 自治县| 乌拉特后旗| 温宿县| 岐山县| 汤原县| 恭城| 淮北市| 张掖市| 襄汾县| 海宁市| 海阳市| 全南县| 方山县| 德阳市| 林州市| 平潭县| 雷山县| 海安县| 临洮县| 莫力| 桦南县| 黑龙江省| 铅山县| 南平市| 永宁县| 三亚市| 万年县| 辽阳市| 互助| 华坪县| 涟水县| 随州市| 渭南市| 屏东市| 天长市| 潞城市| 潞城市|