linux挂移动硬盘命令,Linux挂载移动硬盘

编程入门 行业动态 更新时间:2024-10-06 18:22:27

linux挂<a href=https://www.elefans.com/category/jswz/34/1769062.html style=移动硬盘命令,Linux挂载移动硬盘"/>

linux挂移动硬盘命令,Linux挂载移动硬盘

机器重启后,移动硬盘就不识别了,需要重新挂载,但是使用fdisk -l之后并没有发现移动硬盘的踪迹。也就无从挂载了。

挂载磁盘方法

首先使用fdisk -l查看当前硬盘状态。

➜ ~ fdisk -l

WARNING: fdisk GPT support is currently new, and therefore in an experimental phase. Use at your own discretion.

磁盘 /dev/sdb:320.1 GB, 320072933376 字节,625142448 个扇区

Units = 扇区 of 1 * 512 = 512 bytes

扇区大小(逻辑/物理):512 字节 / 512 字节

I/O 大小(最小/最佳):512 字节 / 512 字节

磁盘标签类型:gpt

Disk identifier: AF1B577B-830C-4026-AC5F-37870D362B3C

# Start End Size Type Name

1 2048 411647 200M EFI System EFI System Partition

2 411648 2508799 1G Microsoft basic

3 2508800 625141759 296.9G Linux LVM

磁盘 /dev/mapper/centos-root:53.7 GB, 53687091200 字节,104857600 个扇区

Units = 扇区 of 1 * 512 = 512 bytes

扇区大小(逻辑/物理):512 字节 / 512 字节

I/O 大小(最小/最佳):512 字节 / 512 字节

磁盘 /dev/mapper/centos-swap:3623 MB, 3623878656 字节,7077888 个扇区

Units = 扇区 of 1 * 512 = 512 bytes

扇区大小(逻辑/物理):512 字节 / 512 字节

I/O 大小(最小/最佳):512 字节 / 512 字节

磁盘 /dev/mapper/centos-home:261.5 GB, 261468717056 字节,510681088 个扇区

Units = 扇区 of 1 * 512 = 512 bytes

扇区大小(逻辑/物理):512 字节 / 512 字节

I/O 大小(最小/最佳):512 字节 / 512 字节

磁盘 /dev/sda:1000.2 GB, 1000170586112 字节,1953458176 个扇区

Units = 扇区 of 1 * 512 = 512 bytes

扇区大小(逻辑/物理):512 字节 / 512 字节

I/O 大小(最小/最佳):512 字节 / 512 字节

磁盘标签类型:dos

磁盘标识符:0x16f2a91f

设备 Boot Start End Blocks Id System

/dev/sda1 1 4294967295 2147483647+ ee GPT

我这里移动硬盘1T,可以知道就是最后的/dev/sda1,那么使用mount命令挂载即可

➜ ~ mkdir 60Gug

➜ ~ mount /dev/sda1 ~/60Gaug

➜ ~ ll 60Gaug

总用量 712M

drwxrwxrwx 1 root root 0 8月 29 09:35 169306313

-rwxrwxrwx 1 root root 481M 9月 28 12:24 backup.zip

drwxrwxrwx 1 root root 0 9月 21 18:48 djan

-rwxrwxrwx 1 root root 375K 10月 29 08:42 download

drwxrwxrwx 1 root root 4.0K 10月 31 18:19 genome

drwxrwxrwx 1 root root 4.0K 8月 31 08:55 a

drwxrwxrwx 1 root root 8.0K 10月 8 18:33 jiali

drwxrwxrwx 1 root root 4.0K 9月 21 13:42

drwxrwxrwx 1 root root 0 9月 21 13:31 N1800068

drwxrwxrwx 1 root root 4.0K 9月 10 15:47 1

-rwxrwxrwx 1 root root 231M 9月 28 12:31 2.zip

drwxrwxrwx 1 root root 4.0K 11月 27 14:04 3

无法识别硬盘的话

1.查看主机总线号

使用命令

➜ ~ ls /sys/class/scsi_host/

host2 host3 host4 host8

2.重新扫描SCSI总线添加设备

➜ ~ echo "- - -" > /sys/class/scsi_host/host2/scan

➜ ~ echo "- - -" > /sys/class/scsi_host/host3/scan

➜ ~ echo "- - -" > /sys/class/scsi_host/host4/scan

➜ ~ echo "- - -" > /sys/class/scsi_host/host8/scan

注意使用对应序号

再次使用fdisk -l如果出现了设备的话,使用前面的挂载命令就可以了

更多推荐

linux挂移动硬盘命令,Linux挂载移动硬盘

本文发布于:2024-02-28 08:32:53,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1769000.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:移动硬盘   命令   linux   Linux

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!