我有一个类似的问题,磁盘是如何在读写配置的情况下突然变成写保护的?
我使用这些命令来解析这个umount /dev/sdb1 e2fsck /dev/sdb1 mount /dev/sdb1
但
~# e2fsck /dev/sdb1
e2fsck 1.44.5 (15-Dec-2018)
ext2fs_open2: Bad magic number in super-block
e2fsck: Superblock invalid, trying backup blocks...
e2fsck: Bad magic number in super-block while trying to open /dev/sdb1
The superblock could not be read or does not describe a valid ext2/ext3/ext4
filesystem. If the device is valid and it really contains an ext2/ext3/ext4
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
e2fsck -b 8193 <device>
or
e2fsck -b 32768 <device>
/dev/sdb1 contains a ufs file system
其他命令,以帮助您了解其他详细信息
~#nano /etc/fstab
UUID=###951671### /DATA ufs defaults 1 2
mkdir /DATA
mount /DATA
~# ls -lat | grep DATA
drwxr-xr-x 5 root root 1024 May 26 11:37 DATA
~# df -h | grep sd
/dev/sda1 276G 8.7G 254G 4% /
**/dev/sdb1 197G 102G 80G 57% /DATA**
~# lsblk -f | grep sd
sda
├─sda1 ext4 ###-c0fb-42ce-9c78-### 253.2G 3% /
├─sda2
└─sda5 swap ###-27b4-485b-98b3-### [SWAP]
sdb
└─sdb1 ufs ###951671### 79.3G 52% /DATA
~:/DATA# ls
ls: reading directory '.': Input/output error
~:/DATA# mount -o rw,remount /dev/sdb1
mount: /DATA: mount point not mounted or bad option.
~# umount /DATA
~# e2fsck /DATA
e2fsck 1.44.5 (15-Dec-2018)
e2fsck: Is a directory while trying to open /DATA
The superblock could not be read or does not describe a valid ext2/ext3/ext4
filesystem. If the device is valid and it really contains an ext2/ext3/ext4
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
e2fsck -b 8193 <device>
or
e2fsck -b 32768 <device>
~# mount /DATA
mount: /DATA: WARNING: device write-protected, mounted read-only.
总之,我想访问/DATA文件夹中的硬/dev/sdb1 1
我如何解决这个问题?
发布于 2019-10-14 14:06:02
根据e2fsck
、/etc/fstab
文件和lsblk
输出,/dev/sdb1
上的文件系统类型是ufs
。
e2fsck
只适用于文件系统类型ext2
、ext3
和ext4
。它根本无法修复文件系统类型ufs
,而且如果您强迫UFS文件系统无论如何尝试修复,它实际上可能会对它造成更大的破坏。
为了检查和修复UFS文件系统,您需要使用fsck.ufs
。在某些Linux发行版上,它可以作为一个名为ufsutils
的包使用:使用您的包管理器来安装它。
除此之外,UFS并不是Linux中经常使用的文件系统--我认为它更像是Solaris或*BSD。如果这个磁盘是从Solaris或BSD系统中移动的,您可以将它带回到那里,并使用原始系统的工具来检查文件系统--这些工具更有可能与实际使用的文件系统版本更新。
https://unix.stackexchange.com/questions/546712
复制相似问题