Jef*_*nes 6 permissions mount hfs+
我正在将我的 FreeNAS 卷备份到外部 WD 4TB My Book 的分区上,该分区使用 hfs 文件系统并安装在运行 Ubuntu 16.04 的笔记本电脑上。每次安装驱动器时,所有分区都以只读方式安装。我试过了:
使用安装hfsprogs
和重新安装卷
sudo mount -t hfsplus -o remount,force,rw /dev/sdb2 /media/mntpoint
使用更改所有卷内容的权限 chmod
这有效,我能够写入和删除已安装的卷。然后,突然问题又回来了,上述解决方案不再有效。我能够写入该卷,但无法删除任何内容,无论是使用rsync
还是rm
.
我跑了sudo dmesg | tail
,它给出了输出:
[ 109.876362] hfsplus: Filesystem was not cleanly unmounted, running fsck.hfsplus is recommended. mounting read-only.
Run Code Online (Sandbox Code Playgroud)
输入mount | grep /dev/sdb2
也表明是mount ro:
/dev/sdb2 on /media/mntpoint1 type hfsplus (ro,nosuid,nodev,relatime,umask=22,uid=0,gid=0,nls=utf8,uhelper=udisks2)
Run Code Online (Sandbox Code Playgroud)
运行sudo fsck.hfsplus /dev/sdb2
表明卷有问题:
** /dev/sdb2
** Checking HFS Plus volume.
** Checking Extents Overflow file.
** Checking Catalog file.
** Checking Catalog hierarchy.
** Checking Extended Attributes file.
Keys out of order
(8, 3)
** Repairing volume.
** Rechecking volume.
** Checking HFS Plus volume.
** Checking Extents Overflow file.
** Checking Catalog file.
** Checking Catalog hierarchy.
** Checking Extended Attributes file.
Keys out of order
(8, 3)
** Repairing volume.
** Rechecking volume.
** Checking HFS Plus volume.
** Checking Extents Overflow file.
** Checking Catalog file.
** Checking Catalog hierarchy.
** Checking Extended Attributes file.
Keys out of order
(8, 3)
** Repairing volume.
** Rechecking volume.
** Checking HFS Plus volume.
** Checking Extents Overflow file.
** Checking Catalog file.
** Checking Catalog hierarchy.
** Checking Extended Attributes file.
Keys out of order
(8, 3)
** The volume Volume Name could not be repaired after 3 attempts.
Run Code Online (Sandbox Code Playgroud)
回到我的 Mac,我运行了磁盘工具,但似乎没有安装任何分区。我运行了验证磁盘,它发现了错误并建议使用修复磁盘,它成功地修复了卷,随后所有其他分区都显示为已安装且正常。
回到 Ubuntu,mount | grep /dev/sdb2
现在给出:
/dev/sdb2 on /media/mntpoint1 type hfsplus (rw,nosuid,nodev,relatime,umask=22,uid=0,gid=0,nls=utf8,uhelper=udisks2)
Run Code Online (Sandbox Code Playgroud)
表明它已安装 rw。然后我可以用 删除文件rw
,并且rsync
可以写入该卷。
几天后(我不知道发生了什么变化),我失去了删除文件的能力rw
,rsync
决定随机删除目标卷上的大部分文件,并且我无法写入该卷。sudo dmesg | tail
现在运行为每个已安装的分区提供以下两个输出之一(我不确定哪个是有问题的卷):
[133264.935495] hfsplus: filesystem was not cleanly unmounted, running fsck.hfsplus is recommended. leaving read-only.
[133274.501698] hfsplus: walked past end of dir
Run Code Online (Sandbox Code Playgroud)
最后,运行sudo fsck.hfsplus /dev/sdb2
提供与以前相同的输出,在 3 次尝试后未能修复卷。
作为新手,我完全不知所措。帮我问问 Ubuntu,你是我唯一的希望。