
mount: special device /dev/sdb1 does not exist的错误解决记录
挂载 硬盘分区时出现了下面的错误
mount: special device /dev/sdb1 does not exist
就是说sdb1设备不存在。。。
重新分区一下硬盘即可
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
fdisk /dev/sdb
Welcome to fdisk (util-linux 2.25.2).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
Command (m for help): d
Selected partition 1
Partition 1 has been deleted.
Command (m for help): d
No partition is defined yet!
Could not delete partition 1
Command (m for help): n
Partition type
p primary (0 primary, 0 extended, 4 free)
e extended (container for logical partitions)
Select (default p): p
Partition number (1-4, default 1):
First sector (2048-1953525167, default 2048):
Last sector, +sectors or +size{K,M,G,T,P} (2048-1953525167, default 1953525167):
Created a new partition 1 of type 'Linux' and of size 931.5 GiB.
Command (m for help): p
Disk /dev/sdb: 931.5 GiB, 1000204886016 bytes, 1953525168 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: 0x8e61971e
Device Boot Start End Sectors Size Id Type
/dev/sdb1 2048 1953525167 1953523120 931.5G 83 Linux
Command (m for help): w
The partition table has been altered.
Calling ioctl() to re-read partition table.
Syncing disks.
限制挂载该分区,然后又出现了下面的错误
mount: unknown filesystem type 'ddf_raid_member'
说明以前该硬盘配置过软RAID,检查软RAID状态
cat /proc/mdstat
显示如下信息,但是其实服务器本身并没有配置软RAID,所以删除掉软RAID即可
1
2
3
4
5
6
md126 : inactive sdb[0]
976224256 blocks super external:/md127/0
md127 : inactive sdb[0](S)
538328 blocks super external:ddf
删除掉系统的软RAID
1
2
3
4
usre@demo:~# mdadm -S /dev/md126
mdadm: stopped /dev/md126
user@demao:~# mdadm -S /dev/md127
mdadm: stopped /dev/md127
限制重新挂载分区到某个目录即可,
mount /dev/sdb1 /demo
挂载 /dev/sdb1
到根目录的demo文件夹
使用df /home/data
查看目录所挂载的分区