最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

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

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

基本步驟:分區(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、進(jìn)行分區(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 設(shè)定硬盤啟動(dòng)區(qū)。

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

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

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

5. 輸入 t 改變硬盤分割區(qū)屬性?!         ?/p>

  1. t:分區(qū)系統(tǒng)id號(hào)
  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設(shè)置一個(gè)分區(qū)——回車——回車(默認(rèn)全部空間)

Command (m for help): n

Command action

  e  extended                                  ···擴(kuò)展分區(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保存不然無(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 

以上就是本文的全部?jī)?nèi)容,希望對(duì)大家的學(xué)習(xí)有所幫助,也希望大家多多支持腳本之家。

相關(guān)文章

  • 詳解如何在Linux中檢查和設(shè)置時(shí)區(qū)

    詳解如何在Linux中檢查和設(shè)置時(shí)區(qū)

    時(shí)區(qū)是地球上的一部分,其中的時(shí)間被認(rèn)為是相同的,每個(gè)時(shí)區(qū)都有一個(gè)基準(zhǔn)點(diǎn),其時(shí)間被認(rèn)為是“標(biāo)準(zhǔn)時(shí)間”,在 Linux 系統(tǒng)中,時(shí)區(qū)通常存儲(chǔ)在 /usr/share/zoneinfo/ 目錄中,本文給大家介紹了如何在Linux中檢查和設(shè)置時(shí)區(qū),需要的朋友可以參考下
    2024-06-06
  • Linux系統(tǒng)軟件包依賴性的解決方案

    Linux系統(tǒng)軟件包依賴性的解決方案

    這篇文章主要介紹了Linux系統(tǒng)軟件包依賴性的解決方案,具有很好的參考價(jià)值,希望對(duì)大家有所幫助,如有錯(cuò)誤或未考慮完全的地方,望不吝賜教
    2024-02-02
  • 你需要知道的16個(gè)Linux服務(wù)器監(jiān)控命令

    你需要知道的16個(gè)Linux服務(wù)器監(jiān)控命令

    如果你想知道你的服務(wù)器正在做干什么,你就需要了解一些基本的命令,一旦你精通了這些命令,那你就是一個(gè) 專業(yè)的 Linux 系統(tǒng)管理員
    2012-03-03
  • Apache中使非偽靜態(tài)url跳轉(zhuǎn)到偽靜態(tài)url的方法

    Apache中使非偽靜態(tài)url跳轉(zhuǎn)到偽靜態(tài)url的方法

    這篇文章主要介紹了Apache中使非偽靜態(tài)url跳轉(zhuǎn)到偽靜態(tài)url的方法,主要是在使用.htaccess時(shí)的問(wèn)題,需要的朋友可以參考下
    2015-07-07
  • CentOS 7如何快速開(kāi)放端口

    CentOS 7如何快速開(kāi)放端口

    這篇文章主要為大家詳細(xì)介紹了CentOS 7如何快速開(kāi)放端口,如何使用firewalld開(kāi)放Linux端口,具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下
    2017-01-01
  • linux用戶和組命令實(shí)例分析【切換、添加用戶、權(quán)限控制等】

    linux用戶和組命令實(shí)例分析【切換、添加用戶、權(quán)限控制等】

    這篇文章主要介紹了linux用戶和組命令,結(jié)合實(shí)例形式分析了Linux系統(tǒng)切換、添加用戶、權(quán)限控制等相關(guān)命令與使用技巧,需要的朋友可以參考下
    2020-03-03
  • CentOS7安裝GlusterFS集群的全過(guò)程

    CentOS7安裝GlusterFS集群的全過(guò)程

    GlusterFS是一款分布式文件系統(tǒng),能支持的clinet數(shù)很多,并能很好的管理各個(gè)節(jié)點(diǎn),下面這篇文章主要給大家介紹了關(guān)于CentOS7安裝GlusterFS集群的相關(guān)資料,需要的朋友可以參考下
    2022-04-04
  • Linxu服務(wù)器上安裝JDK 詳細(xì)步驟

    Linxu服務(wù)器上安裝JDK 詳細(xì)步驟

    這篇文章主要介紹了Linxu服務(wù)器上安裝JDK 詳細(xì)步驟,在安裝之前需要先卸載自己linux上的jdk,具體內(nèi)容詳情大家參考下本文
    2017-12-12
  • 5個(gè)可能被你忽略的Linux安全設(shè)置方法

    5個(gè)可能被你忽略的Linux安全設(shè)置方法

    眾所周知,網(wǎng)絡(luò)安全是一個(gè)非常重要的課題,而服務(wù)器是網(wǎng)絡(luò)安全中最關(guān)鍵的環(huán)節(jié)。Linux被認(rèn)為是一個(gè)比較安全的Internet服務(wù)器,作為一種開(kāi)放源代碼操作系統(tǒng),一旦Linux系統(tǒng)中發(fā)現(xiàn)有安全漏洞,Internet上來(lái)自世界各地的志愿者會(huì)踴躍修補(bǔ)它。
    2008-09-09
  • Linux里Makefile是什么?它是如何工作的?

    Linux里Makefile是什么?它是如何工作的?

    今天小編就為大家分享一篇關(guān)于makefile是什么及其工作原理的文章,小編覺(jué)得內(nèi)容挺不錯(cuò)的,現(xiàn)在分享給大家,具有很好的參考價(jià)值,需要的朋友一起跟隨小編來(lái)看看吧
    2018-09-09

最新評(píng)論

松滋市| 江津市| 于都县| 察雅县| 永川市| 彝良县| 安溪县| 庆云县| 建宁县| 建阳市| 郯城县| 泰来县| 寿阳县| 阿坝县| 万州区| 三门县| 山阴县| 卢湾区| 永城市| 汤阴县| 都昌县| 英山县| 丰台区| 潢川县| 从江县| 扶沟县| 湾仔区| 邓州市| 五峰| 茶陵县| 剑河县| 措勤县| 长丰县| 青阳县| 阳信县| 延边| 谢通门县| 都安| 彭州市| 阆中市| 宣武区|