当前位置: 首页 > news >正文

rk3568 nvme硬盘分区,格式化,挂载测试

前言

环境介绍:

1.编译环境

Ubuntu 18.04.5 LTS

2.SDK

rk356x_linux

3.单板

迅为itop-3568开发板 + 自制底板


一、查看硬盘

插上硬盘上电,进入系统后通过命令lspci查看nvme硬盘识别情况

[root@RK356X:/]# lspci -k
21:00.0 Class 0108: 1e4b:1202 nvme
20:00.0 Class 0604: 1d87:3566 pcieport
[root@RK356X:/]#

可以看到能正常识别到nvme设备
21:00.0 Class 0108: 1e4b:1202 nvme

二、查看分区

在/dev下面查看硬盘分区情况

[root@RK356X:/]# ls /dev/nvme0
nvme0    nvme0n1

可以看到nvme硬盘已经分好一个区了nvme0n1
要是还想分区可以通过fdisk进行分区。

[root@RK356X:/]# fdisk /dev/nvme0n1
Device contains neither a valid DOS partition table, nor Sun, SGI, OSF or GPT disklabel
Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that the previous content
won't be recoverable.The number of cylinders for this disk is set to 488386.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs(e.g., DOS FDISK, OS/2 FDISK)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
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)

这里制作测试,一个区够用,不再进行分区。
分好区后可以通过fdisk -l查看分区情况

[root@RK356X:/]# fdisk -l
Found valid GPT with protective MBR; using GPTDisk /dev/mmcblk0: 30547968 sectors, 2628M
Logical sector size: 512
Disk identifier (GUID): f4420000-0000-426c-8000-368900004ad5
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 30547934Number  Start (sector)    End (sector)  Size Name1           16384           24575 4096K uboot2           24576           32767 4096K misc3           32768          163839 64.0M boot4          163840          294911 64.0M recovery5          294912          360447 32.0M backup6          360448        25526271 12.0G rootfs7        25526272        25919487  192M oem8        25919488        30547903 2259M userdata
Disk /dev/nvme0n1: 477 GB, 512110190592 bytes, 1000215216 sectors
488386 cylinders, 64 heads, 32 sectors/track
Units: sectors of 1 * 512 = 512 bytesDisk /dev/nvme0n1 doesn't contain a valid partition table
[root@RK356X:/]#

这是识别到的nvme盘信息,就一个分区。
Disk /dev/nvme0n1: 477 GB, 512110190592 bytes, 1000215216 sectors
488386 cylinders, 64 heads, 32 sectors/track
Units: sectors of 1 * 512 = 512 bytes

三、格式化

硬盘分好区后,要格式化才能正常挂载
系统自带了格式化工具mkfs.ext4,可以直接使用。

[root@RK356X:/]# mkfs.ext4 /dev/nvme0n1
mke2fs 1.46.5 (30-Dec-2021)
/dev/nvme0n1 contains a ext4 file systemlast mounted on Thu Jan  1 08:15:21 1970
Proceed anyway? (y,N) y
Discarding device blocks: done
Creating filesystem with 125026902 4k blocks and 31260672 inodes
Filesystem UUID: 19d88471-cbb2-4cc6-a39f-f5d0c776607e
Superblock backups stored on blocks:32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968,102400000Allocating group tables: done
Writing inode tables: done
Creating journal (262144 blocks): done
Writing superblocks and filesystem accounting information: done[root@RK356X:/]#

四、 挂载

直接mount就行

[root@RK356X:/]# mount /dev/nvme0n1 /mnt
[ 4152.556192] EXT4-fs (nvme0n1): mounted filesystem with ordered data mode. Opts[root@RK356X:/]# : (null)[root@RK356X:/]# ls /mnt/
lost+found
[root@RK356X:/]#

查看系统挂载情况

[root@RK356X:/]# df -TH
Filesystem     Type      Size  Used Avail Use% Mounted on
/dev/root      ext4       13G  844M   12G   7% /
devtmpfs       devtmpfs  1.1G     0  1.1G   0% /dev
tmpfs          tmpfs     1.1G     0  1.1G   0% /dev/shm
tmpfs          tmpfs     1.1G  263k  1.1G   1% /tmp
tmpfs          tmpfs     1.1G  300k  1.1G   1% /run
/dev/mmcblk0p7 ext2      193M   13M  170M   7% /oem
/dev/mmcblk0p8 ext2      2.4G   26k  2.4G   1% /userdata
/dev/nvme0n1   ext4      503G   29k  478G   1% /mnt
[root@RK356X:/]#
http://www.lryc.cn/news/149332.html

相关文章:

  • Failed to load ApplicationContext解决办法,spring版本问题
  • Is f(z)=1/z truly an analytic function
  • 代理模式 静态代理和动态代理(jdk、cglib)——Java入职第十一天
  • Remmina在ubuntu22.04中无法连接Windows
  • 【uniapp】this有时为啥打印的是undefined?(箭头函数修改this)
  • 2023高教社杯数学建模思路 - 复盘:光照强度计算的优化模型
  • 河道漂浮物检测:安防监控/视频智能分析/AI算法智能分析技术如何助力河道整治工作?
  • Dubbo 应用切换 ZooKeeper 注册中心实例,流量无损迁移
  • ADB入门教程
  • SQLPro Studio for Mac:强大的SQL开发和管理工具
  • 淘宝API技术解析,实现按图搜索淘宝商品
  • 错误:依赖检测失败: mysql-community-libs(x86-64) >= 5.7.9 被 (已安裝) mysql-community-li
  • 使用MATLAB解算炼油厂的选址
  • AudioTrack播放音乐之getMinBufferSize
  • React和Redux中的不变性
  • NPM 常用命令(一)
  • 【ES6】Promise推荐用法
  • 【JavaScript】版本判断
  • Nano编辑器安装使用指南
  • Java版电子招投标管理系统源码-电子招投标认证服务平台-权威认证
  • Java String类(1)
  • 渗透测试漏洞原理之---【CSRF跨站请求伪造】
  • 带量采购药品数据查询集采分析平台(建议收藏!)
  • 概念解析 | 无线感知的新篇章:异构网络感知的原理与挑战
  • 【大数据模型】让chatgpt为开发增速(开发专用提示词)
  • 读书笔记-《ON JAVA 中文版》-摘要23[第二十章 泛型-2]
  • 【爬虫】5.6 Selenium等待HTML元素
  • 0102阿里云配置3台ECS服务器-大数据学习
  • android 输入法demo
  • 【经验分享】Markdown中如何显示空格和回车