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

ubuntu磁盤分區(qū)、格式化、掛載方式

 更新時(shí)間:2026年02月09日 08:50:31   作者:立昂  
文章介紹了如何查看設(shè)備、進(jìn)行分區(qū)、格式化和掛載磁盤的步驟,以及可能遇到的問題和解決方案

一、查看設(shè)備

1、列出系統(tǒng)上的所有塊設(shè)備:sudo fdisk -l

xxx@xxx:~$ sudo fdisk -l
Disk /dev/ram0: 8 MiB, 8388608 bytes, 16384 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram1: 8 MiB, 8388608 bytes, 16384 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram2: 8 MiB, 8388608 bytes, 16384 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram3: 8 MiB, 8388608 bytes, 16384 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram4: 8 MiB, 8388608 bytes, 16384 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram5: 8 MiB, 8388608 bytes, 16384 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram6: 8 MiB, 8388608 bytes, 16384 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram7: 8 MiB, 8388608 bytes, 16384 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram8: 8 MiB, 8388608 bytes, 16384 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram9: 8 MiB, 8388608 bytes, 16384 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram10: 8 MiB, 8388608 bytes, 16384 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram11: 8 MiB, 8388608 bytes, 16384 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram12: 8 MiB, 8388608 bytes, 16384 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram13: 8 MiB, 8388608 bytes, 16384 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram14: 8 MiB, 8388608 bytes, 16384 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram15: 8 MiB, 8388608 bytes, 16384 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/loop0: 16 MiB, 16777216 bytes, 32768 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x00000000


Disk /dev/mtdblock0: 4 MiB, 4194304 bytes, 8192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


GPT PMBR size mismatch (26769407 != 244023295) will be corrected by w(rite).
Disk /dev/mmcblk0: 116.4 GiB, 124939927552 bytes, 244023296 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 2D215E13-695C-4DAB-B877-B01320240ACB

Device          Start      End  Sectors  Size Type
/dev/mmcblk0p1  28672 61067263 61038592 29.1G Linux filesystem
/dev/mmcblk0p2   2048     2303      256  128K Linux filesystem
/dev/mmcblk0p3   4096     4991      896  448K Linux filesystem
/dev/mmcblk0p4   6144     7295     1152  576K Linux filesystem
/dev/mmcblk0p5   8192     8319      128   64K Linux filesystem
/dev/mmcblk0p6  10240    10623      384  192K Linux filesystem
/dev/mmcblk0p7  12288    13055      768  384K Linux filesystem
/dev/mmcblk0p8  14336    14463      128   64K Linux filesystem
/dev/mmcblk0p9  16384    17279      896  448K Linux filesystem
/dev/mmcblk0p10 18432    19327      896  448K Linux filesystem
/dev/mmcblk0p11 20480    22015     1536  768K Linux filesystem
/dev/mmcblk0p12 22528    22655      128   64K Linux filesystem
/dev/mmcblk0p13 24576    24959      384  192K Linux filesystem
/dev/mmcblk0p14 26624    26879      256  128K Linux filesystem

Partition table entries are not in disk order.


Disk /dev/zram0: 2 GiB, 2078359552 bytes, 507412 sectors
Units: sectors of 1 * 4096 = 4096 bytes
Sector size (logical/physical): 4096 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/zram1: 2 GiB, 2078359552 bytes, 507412 sectors
Units: sectors of 1 * 4096 = 4096 bytes
Sector size (logical/physical): 4096 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/zram2: 2 GiB, 2078359552 bytes, 507412 sectors
Units: sectors of 1 * 4096 = 4096 bytes
Sector size (logical/physical): 4096 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/zram3: 2 GiB, 2078359552 bytes, 507412 sectors
Units: sectors of 1 * 4096 = 4096 bytes
Sector size (logical/physical): 4096 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes

可以看到磁盤/dev/mmcblk0中還有剩余的空間未被分區(qū)。

2、打開需要進(jìn)行分區(qū)的磁盤進(jìn)行分區(qū)操作:sudo fdisk /dev/sdX

xxx@xxx:~$ sudo fdisk /dev/mmcblk0

Welcome to fdisk (util-linux 2.31.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.

GPT PMBR size mismatch (26769407 != 244023295) will be corrected by w(rite).
GPT PMBR size mismatch (26769407 != 244023295) will be corrected by w(rite).

Command (m for help): e
e: unknown command

Command (m for help): m

Help:

  Generic
   d   delete a partition
   F   list free unpartitioned space  # 列出空閑的未分區(qū)的空間
   l   list known partition types
   n   add a new partition  # 增加一個(gè)新的分區(qū)
   p   print the partition table
   t   change a partition type
   v   verify the partition table
   i   print information about a partition

  Misc
   m   print this menu
   x   extra functionality (experts only)

  Script
   I   load disk layout from sfdisk script file
   O   dump disk layout to sfdisk script file

  Save & Exit
   w   write table to disk and exit
   q   quit without saving changes

  Create a new label
   g   create a new empty GPT partition table
   G   create a new empty SGI (IRIX) partition table
   o   create a new empty DOS partition table
   s   create a new empty Sun partition table


Command (m for help): F

Unpartitioned space /dev/mmcblk0: 87.2 GiB, 93673471488 bytes, 182955999 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes

   Start       End   Sectors  Size
61067264 244023262 182955999 87.2G

Command (m for help): n
Partition number (15-128, default 15): 15
First sector (61067264-244023262, default 61067264): 
Last sector, +sectors or +size{K,M,G,T,P} (61067264-244023262, default 244023262): 

Created a new partition 15 of type 'Linux filesystem' and of size 87.2 GiB.

Command (m for help): F
Unpartitioned space /dev/mmcblk0: 0 B, 0 bytes, 0 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes

Command (m for help): w
GPT PMBR size mismatch (26769407 != 244023295) will be corrected by w(rite).

The partition table has been altered.
Syncing disks.

二、格式化

1、掛載可能會(huì)遇到的格式問題

xxx@jxxx:~$ sudo mount /dev/mmcblk0p15 /home/xxx/node
NTFS signature is missing.
Failed to mount '/dev/mmcblk0p15': Invalid argument
The device '/dev/mmcblk0p15' doesn't seem to have a valid NTFS.
Maybe the wrong device is used? Or the whole disk instead of a
partition (e.g. /dev/sda, not /dev/sda1)? Or the other way around?

xxx@jxxx:~$ sudo fdisk -l /dev/mmcblk0p15
Disk /dev/mmcblk0p15: 87.2 GiB, 93673471488 bytes, 182955999 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

2、格式化

xxx@jxxx:~$ 
xxx@jxxx:~$ 
xxx@jxxx:~$ sudo mkfs.ntfs /dev/mmcblk0p15
Cluster size has been automatically set to 4096 bytes.
Initializing device with zeroes:  26%
                                                                                                                                                                                                             61%
                                                                                                                                                                                                                                                    100% - Done.
Creating NTFS volume structures.
mkntfs completed successfully. Have a nice day.

三、掛載

xxx@xxx:~$ sudo mount /dev/mmcblk0p15 /home/xxx/node

開機(jī)掛載

xxx@xxx:~$ sudo vim /etc/fstab
# <file system> <mount point>             <type>          <options>                               <dump> <pass>
/dev/root            /                     ext4           defaults                                     0 1
/dev/mmcblk0p15  /home/rushi/node          ntfs           defaults                                   0 0

總結(jié)

以上為個(gè)人經(jīng)驗(yàn),希望能給大家一個(gè)參考,也希望大家多多支持腳本之家。

相關(guān)文章

  • Linux定時(shí)任務(wù)Crontab命令使用詳解與總結(jié)

    Linux定時(shí)任務(wù)Crontab命令使用詳解與總結(jié)

    本為大家介紹了Linux定時(shí)任務(wù)Crontab命令使用詳解并總結(jié)Crontab命令的一些使用技巧以及工作中遇到的一些問題解決方法
    2018-10-10
  • Linux正確刪除軟鏈接方式

    Linux正確刪除軟鏈接方式

    在Linux上刪除軟鏈接時(shí),只刪除軟鏈接而不要?jiǎng)h除源文件,最推薦的做法是使用`rm`命令,其次的做法是使用`unlink`命令,不建議使用`rm-rf`命令,因?yàn)樗鼤?huì)誤刪源文件
    2026-01-01
  • Ubuntu 下安裝和配置 FTP服務(wù)器

    Ubuntu 下安裝和配置 FTP服務(wù)器

    本篇文章主要介紹了Ubuntu 下安裝和配置 FTP服務(wù),小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,也給大家做個(gè)參考。一起跟隨小編過來(lái)看看吧
    2017-04-04
  • 淺談簡(jiǎn)單使用CentOS7防火墻及開放端口

    淺談簡(jiǎn)單使用CentOS7防火墻及開放端口

    這篇文章主要介紹了淺談簡(jiǎn)單使用CentOS7防火墻及開放端口,小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,也給大家做個(gè)參考。一起跟隨小編過來(lái)看看吧
    2018-09-09
  • Linux中的內(nèi)核態(tài)&用戶態(tài)使用

    Linux中的內(nèi)核態(tài)&用戶態(tài)使用

    本文詳細(xì)介紹了Linux系統(tǒng)內(nèi)核態(tài)與用戶態(tài)的概念、區(qū)別及實(shí)現(xiàn)原理,包括特權(quán)級(jí)、地址空間劃分、系統(tǒng)調(diào)用機(jī)制、頁(yè)表結(jié)構(gòu)等核心內(nèi)容,文章通過對(duì)比用戶態(tài)與內(nèi)核態(tài)的特征,以及具體的操作系統(tǒng)實(shí)現(xiàn)細(xì)節(jié),幫助讀者理解Linux系統(tǒng)中這兩個(gè)重要概念的運(yùn)行機(jī)制和實(shí)際應(yīng)用
    2026-01-01
  • linux下php-fpm開啟關(guān)閉使用方法

    linux下php-fpm開啟關(guān)閉使用方法

    自php5.3.3開始,php源碼中包含了php-fpm,不需要單獨(dú)通過補(bǔ)丁的方式安裝php-fpm,在源碼安裝的時(shí)候直接 configure 中增加參數(shù) –enable-fpm即可,使用方法如下
    2014-03-03
  • 【Linux】linux常用基本命令總結(jié)(推薦)

    【Linux】linux常用基本命令總結(jié)(推薦)

    Linux中許多常用命令是必須掌握的,這里將我學(xué)linux入門時(shí)學(xué)的一些常用的基本命令分享給大家一下,有興趣的可以了解一下。
    2016-11-11
  • Linux系統(tǒng)非正常關(guān)機(jī)導(dǎo)致磁盤異常的問題及解決

    Linux系統(tǒng)非正常關(guān)機(jī)導(dǎo)致磁盤異常的問題及解決

    文章介紹了在VMware ESXi虛擬化環(huán)境中,由于斷電導(dǎo)致的Linux系統(tǒng)非正常關(guān)機(jī)和磁盤異常問題及其解決方案,主要問題包括文件系統(tǒng)損壞和報(bào)錯(cuò)信息,解決方案涉及檢查和修復(fù)`/etc/fstab`文件中的語(yǔ)法錯(cuò)誤,并使用`dmsetup`命令恢復(fù)設(shè)備映射
    2025-11-11
  • linux系統(tǒng)磁盤存儲(chǔ)擴(kuò)容根目錄邏輯卷擴(kuò)容詳解

    linux系統(tǒng)磁盤存儲(chǔ)擴(kuò)容根目錄邏輯卷擴(kuò)容詳解

    文章詳細(xì)介紹了如何將新增磁盤增加到Linux根目錄,包括區(qū)分邏輯卷和物理卷、查看新增磁盤信息、對(duì)新磁盤進(jìn)行分區(qū)和格式化、創(chuàng)建物理卷、擴(kuò)展卷組、擴(kuò)展邏輯卷、擴(kuò)展文件系統(tǒng)以及查看擴(kuò)容效果
    2026-01-01
  • 淺談RHEL 7中systemctl 的用法(替代service和chkconfig)

    淺談RHEL 7中systemctl 的用法(替代service和chkconfig)

    下面小編就為大家?guī)?lái)一篇淺談RHEL 7中systemctl 的用法(替代service和chkconfig)。小編覺得挺不錯(cuò)的,現(xiàn)在就分享給大家,也給大家做個(gè)參考。一起跟隨小編過來(lái)看看吧
    2016-11-11

最新評(píng)論

萍乡市| 荃湾区| 沙田区| 延津县| 泗洪县| 安多县| 张掖市| 淳安县| 江达县| 和政县| 乐业县| 莎车县| 墨江| 龙泉市| 通许县| 昆明市| 平定县| 安庆市| 繁昌县| 汶上县| 乳山市| 徐州市| 中阳县| 宽甸| 泾川县| 湄潭县| 齐齐哈尔市| 隆尧县| 乌兰县| 长葛市| 北宁市| 博白县| 临城县| 京山县| 礼泉县| 南昌县| 信宜市| 台南县| 永安市| 渭源县| 北票市|