我添加了一个新硬盘作为存储设备,但想要将某些内容保存到挂载该硬盘的文件夹 (/hdd) 中却无法实现。例如,尝试保存一个 html 文件
Failed to save 'html': Unable to write file '/hdd/html' (Unknown (FileSystemError): Error: Unknown system error -74: Unknown system error -74, open '/hdd/html')
尝试使用修改权限的代码
chown -R user /hdd
结果如下:
chown: cannot read directory '/hdd': Bad message
sudo fdisk -l
Disk /dev/sda: 298,09 GiB, 320072933376 bytes, 625142448 sectors
Disk model: WDC WD3200AAJS-6
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: A4E0084C-7105-4787-B6D2-A1D70A1B6CDD
Device Start End Sectors Size Type
/dev/sda1 2048 625141759 625139712 298,1G Linux filesystem
在 /etc/fstab 中:
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
# / was on /dev/sdb2 during installation
UUID=04e3700b-e01f-4bd2-b273-6ee85780cf2e / ext4 errors=remount-ro 0 1
# /boot/efi was on /dev/sdb1 during installation
UUID=3782-4CC0 /boot/efi vfat umask=0077 0 1
/swapfile none swap sw 0 0
UUID=b0ea8d6d-49c9-4a0e-b496-5df4b2a16e52 /hdd ext4 defaults 0 0