今天,我将 Ubuntu 服务器从 14.04 升级到 16.04 sudo do-release-upgrade
,升级过程非常顺利,直到它重新启动并且我登录时看到以下消息:
Unable to setup logging. [Error 30] Read only file system:
'var/log/landspace/sysinfo.log'
run-parts: /etc/update-motd.d/50-landscape-sysinfo exited with return code 1
/usr/lib/ubuntu-release-upgrader/release-upgrade-motd: 39: /usr/lib/ubuntu-release-upgrader/release-upgrade-motd: cannot create /var/lib/ubuntu-release-upgrader/release-upgrader-available: Read-only file system
/usr/lib/update-notierfier/update-motd-fsck-at-reboot: 33: /usr/lib/update-notifier/update-motd-fsck-at-reboot: cannot create /usr/liv/update-notifier-fsck-at-reboot: Read-only file system
-bash: cannot create temp file for here-document: Read-only file system
所以我认为系统是只读的,如果文件系统或磁盘出现某种错误/损坏,这是一种预防措施?
所以我的问题有两个:
- 究竟发生了什么事?
- 我如何解决它?
不知道这是否相关,但是当 Raid 5 中有 6 个驱动器时,操作系统正在通过 USB 笔运行。
提前致谢!
显然,我可以重新安装操作系统并重新设置所有内容,这只需要几个小时,但我真的想学习和理解它:)
编辑1
dmesg 日志添加:http://pastebin.com/0bP8T4hH
编辑2
/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/sda1 during installation
/dev/md0 /mnt/rdisk ext4 user 0 0
答案1
无论出于什么原因,您/etc/fstab
甚至没有提到目录根目录的挂载点。假设您实际上已启用系统/dev/sdg1
,请按如下方式修改文件:
# /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/sda1 during installation
/dev/md0 /mnt/rdisk ext4 user 0 0
/dev/sdg1 / ext4 rw,noatime,data=ordered 0 1
重新启动以测试它是否有效,但实际上我不建议/dev/sdg1
直接在文件中使用,因为设备名称可能会更改。您最好使用文件系统的 UUID。要找到它,请执行。然后在 中ls -l /dev/disk/by-uuid/ | grep sdg1
替换/dev/sdg1
为。UUID=The-Number-You-Just-Got
/etc/fstab