亚洲乱码中文字幕综合,中国熟女仑乱hd,亚洲精品乱拍国产一区二区三区,一本大道卡一卡二卡三乱码全集资源,又粗又黄又硬又爽的免费视频

詳解linux添加硬盤分區(qū)掛載教程

 更新時間:2018年04月13日 09:16:52   作者:渣渣輝  
本篇文章主要介紹了詳解linux添加硬盤分區(qū)掛載教程,小編覺得挺不錯的,現(xiàn)在分享給大家,也給大家做個參考。一起跟隨小編過來看看吧

基本步驟:分區(qū)——格式化——掛載——寫入文件

1、首先用fdisk -l命令查看添加的硬盤名稱,可以看到sdb為新增的硬盤

[root@oracle ~]# fdisk -l

Disk /dev/sdb: 21.5 GB, 21474836480 bytes

255 heads, 63 sectors/track, 2610 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: 0x00000000

Disk /dev/sda: 21.5 GB, 21474836480 bytes

255 heads, 63 sectors/track, 2610 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: 0x0006b59c

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    2358  18631680  83 Linux

/dev/sda3      2358    2611   2031616  82 Linux swap / Solaris 

2、進行分區(qū),輸入m查看提示

[root@oracle ~]# fdisk /dev/sdb 

Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel

Building a new DOS disklabel with disk identifier 0x09f38795.

Changes will remain in memory only, until you decide to write them.

After that, of course, the previous content won't be recoverable.

 

Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

 

WARNING: DOS-compatible mode is deprecated. It's strongly recommended to

     switch off the mode (command 'c') and change display units to

     sectors (command 'u').

 

Command (m for help): m

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) 

分析:主要參數(shù)的解析

1. 輸入 m 顯示所有命令列示。

2. 輸入 p 顯示硬盤分割情形,打印分區(qū)表。

3. 輸入 a 設定硬盤啟動區(qū)。

4. 輸入 n 創(chuàng)建新的硬盤分割區(qū)。

  4.1. 輸入 e 硬盤為[延伸]分割區(qū)(extend)。

  4.2. 輸入 p 硬盤為[主要]分割區(qū)(primary)。

5. 輸入 t 改變硬盤分割區(qū)屬性。          

  1. t:分區(qū)系統(tǒng)id號
  2. L:82:linux swap
  3. 83:linux
  4. 86:NTFS window分區(qū)

6. 輸入 d 刪除硬盤分割區(qū)屬性。

7. 輸入 q 結(jié)束不存入硬盤分割區(qū)屬性。

8. 輸入 w 結(jié)束并寫入硬盤分割區(qū)屬性

3、輸入n創(chuàng)建新的硬盤分區(qū)——輸入p創(chuàng)建主分區(qū)——輸入1設置一個分區(qū)——回車——回車(默認全部空間)

Command (m for help): n

Command action

  e  extended                                  ···擴展分區(qū)

  p  primary partition (1-4)                          ···主分區(qū)

p

Partition number (1-4): 1

First cylinder (1-2610, default 1): 

Using default value 1

Last cylinder, +cylinders or +size{K,M,G} (1-2610, default 2610): 

Using default value 2610 

4、輸入p查看分區(qū)情況——輸入w保存退出(一定要w保存不然無效)

Command (m for help): p

 

Disk /dev/sdb: 21.5 GB, 21474836480 bytes

255 heads, 63 sectors/track, 2610 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: 0x09f38795

 

  Device Boot   Start     End   Blocks  Id System

/dev/sdb1        1    2610  20964793+ 83 Linux

 

Command (m for help): w

The partition table has been altered!

 

Calling ioctl() to re-read partition table.

Syncing disks. 

5、mkfs命令格式化磁盤

[root@oracle ~]# mkfs.ext4 /dev/sdb

mkfs.ext4: invalid fragment size - /dev/sdb 

6、mount命令掛載分區(qū)

[root@oracle ~]# mount /dev/sdb /oracle/

You have new mail in /var/spool/mail/root

[root@oracle ~]# df -TH

Filesystem   Type  Size Used Avail Use% Mounted on

/dev/sda2   ext4  19G  11G 7.3G 60% /

tmpfs     tmpfs 2.1G  74k 2.1G  1% /dev/shm

/dev/sda1   ext4  297M  29M 253M 11% /boot

/dev/sdb    ext4  22G  47M  20G  1% /oracle 

7、添加到/etc/fstab文件下保存退出否則重啟后硬盤消失

/dev/sdb    /oracle     ext4  defaults,noatime    0 0 

以上就是本文的全部內(nèi)容,希望對大家的學習有所幫助,也希望大家多多支持腳本之家。

相關文章

  • ubuntu下用dpkg命令行運行deb安裝包的方法

    ubuntu下用dpkg命令行運行deb安裝包的方法

    在Ubuntu系統(tǒng)中,除了通過桌面啟動deb安裝包外,還能通過命令行來運行deb安裝包,需要使用到dpkg命令,下面這篇文中就給大家介紹下Ubuntu下使用dpkg命令運行deb安裝包的方法,需要的朋友可以參考借鑒,一起來學習下吧。
    2017-01-01
  • Apache Shiro 使用手冊(四) Realm 實現(xiàn)

    Apache Shiro 使用手冊(四) Realm 實現(xiàn)

    在認證、授權內(nèi)部實現(xiàn)機制中都有提到,最終處理都將交給Real進行處理。因為在Shiro中,最終是通過Realm來獲取應用程序中的用戶、角色及權限信息的
    2014-06-06
  • ubuntu系統(tǒng)下matplotlib中文亂碼問題的解決方法

    ubuntu系統(tǒng)下matplotlib中文亂碼問題的解決方法

    本篇文章主要介紹了ubuntu系統(tǒng)下matplotlib中文亂碼問題的解決方法,具有一定的參考價值,有興趣的可以了解一下
    2017-06-06
  • linux下安裝nodejs的詳細步驟

    linux下安裝nodejs的詳細步驟

    本篇文章主要介紹了linux下安裝nodejs的詳細步驟,小編覺得挺不錯的,現(xiàn)在分享給大家,也給大家做個參考。一起跟隨小編過來看看吧
    2017-06-06
  • 在lnmp環(huán)境中的nginx編譯安裝

    在lnmp環(huán)境中的nginx編譯安裝

    本篇文章給大家分享了在lnmp環(huán)境中的nginx編譯安裝的相關步驟以及需要注意的地方,有興趣的朋友參考學習下。
    2018-04-04
  • Linux堆內(nèi)存修改及清理命令方式

    Linux堆內(nèi)存修改及清理命令方式

    這篇文章主要介紹了Linux堆內(nèi)存修改及清理命令方式,具有很好的參考價值,希望對大家有所幫助,如有錯誤或未考慮完全的地方,望不吝賜教
    2023-12-12
  • Linux下正確快速刪除海量文件的方法分享

    Linux下正確快速刪除海量文件的方法分享

    linux服務器運行久了,可能會出現(xiàn)海量的垃圾文件去刪除,下面這篇文章就給大家分享了在Linux下正確快速刪除海量文件的方法,需要的朋友可以參考借鑒,下面來一起看看吧。
    2017-02-02
  • centos6.5 安裝hadoop1.2.1的教程詳解【親測版】

    centos6.5 安裝hadoop1.2.1的教程詳解【親測版】

    這篇文章主要介紹了centos6.5 安裝hadoop1.2.1的教程詳細,該教程小編親測過,非常不錯,值得推薦給大家,需要的朋友可以參考下
    2018-08-08
  • Mysql常用命令 詳細整理版

    Mysql常用命令 詳細整理版

    MySQL是一個快速的、多線程、多用戶和健壯的SQL數(shù)據(jù)庫服務器。MySQL服務器支持關鍵任務、重負載生產(chǎn)系統(tǒng)的使用,也可以將它嵌入到一個大配置(mass-deployed)的軟件中去。
    2010-12-12
  • Apache No space left on device: mod_rewrite: could not create rewrite_log_lock Configuration Failed

    Apache No space left on device: mod_rewrite: could not creat

    這篇文章主要介紹了Apache No space left on device: mod_rewrite: could not create rewrite_log_lock Configuration Failed問題的解決方法,需要的朋友可以參考下
    2014-09-09

最新評論