ubuntu_使用问题17_挂载硬盘

1 查看磁盘信息

sudo fdisk -l
Disk /dev/nvme0n1: 953.89 GiB, 1024209543168 bytes, 2000409264 sectors
Disk model: KXG60ZNV1T02 NVMe KIOXIA 1024GB         
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: E12E300F-A0FA-45B2-BC6B-773E8BFDEECB

Device              Start        End    Sectors   Size Type
/dev/nvme0n1p1       2048    1023999    1021952   499M EFI System
/dev/nvme0n1p2    1024000    1286143     262144   128M Microsoft reserved
/dev/nvme0n1p3    1286144  625516543  624230400 297.7G Microsoft basic data
/dev/nvme0n1p4 1982097408 2000408575   18311168   8.7G Windows recovery environment
/dev/nvme0n1p5  625516544 1982097407 1356580864 646.9G Linux filesystem

Partition table entries are not in disk order.


Disk /dev/sda: 7.28 TiB, 8001563222016 bytes, 15628053168 sectors
Disk model: HGST HUS728T8TAL
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: BD84688B-45A2-4D89-AEB3-9F51076B38E5

Device      Start         End     Sectors  Size Type
/dev/sda1    2048      264191      262144  128M Microsoft reserved
/dev/sda2  264192 15628052479 15627788288  7.3T Microsoft basic data

2 查看UUID

sudo blkid
/dev/sda1: PARTLABEL="Microsoft reserved partition" PARTUUID="217b8118-216b-4522-a759-511146e35e0b"
/dev/sda2: LABEL="DATA" UUID="B602D16302D128DF" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="01e747c8-7c0c-4f5d-a737-9145478d60a0"

3 创建挂载点

sudo mkdir /data

4 永远挂载分区

sudo vi /etc/fstab

# 自动挂载
# 需要注意是ext4还是ntfs
echo UUID="B602D16302D128DF" /data ext4 defaults 0 0 >> /etc/fstab

5 参考资料

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

张欣-男

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值