15.04로 업데이트한 후 파일 시스템이 읽기 전용이 되었습니까?

15.04로 업데이트한 후 파일 시스템이 읽기 전용이 되었습니까?

나는 어리석게도 14.04LTS에서 14.10으로 업데이트한 다음 15.04로 업데이트하기로 결정했습니다.

그 이후로 내 웹사이트는 다운되었고 파일 시스템은 읽기 전용이 되었습니다. 업데이트가 성공적으로 완료되었으므로 무엇이 잘못되었는지 전혀 알 수 없습니다.

이것이 내가 지금까지 찾은 것입니다:

    root@lew:/# service apache2 status
apache2.service - LSB: Apache2 web server
   Loaded: loaded (/etc/init.d/apache2)
   Active: failed (Result: exit-code) since Sun 2015-07-12 08:36:18 EDT; 31min ago
     Docs: man:systemd-sysv-generator(8)
  Process: 901 ExecStart=/etc/init.d/apache2 start (code=exited, status=1/FAILURE)

Jul 12 08:36:18 lew.im systemd[1]: Starting LSB: Apache2 web server...
Jul 12 08:36:18 lew.im apache2[901]: * Starting web server apache2
Jul 12 08:36:18 lew.im apache2[901]: mktemp: failed to create file via template ‘/tmp/tmp.XXXXXXXXXX’: Read-only file system
Jul 12 08:36:18 lew.im apache2[901]: /etc/init.d/apache2: 91: /etc/init.d/apache2: cannot create : Directory nonexistent
Jul 12 08:36:18 lew.im apache2[901]: *
Jul 12 08:36:18 lew.im apache2[901]: * The apache2 configtest failed.
Jul 12 08:36:18 lew.im systemd[1]: apache2.service: control process exited, code=exited status=1
Jul 12 08:36:18 lew.im systemd[1]: Failed to start LSB: Apache2 web server.
Jul 12 08:36:18 lew.im systemd[1]: Unit apache2.service entered failed state.
Jul 12 08:36:18 lew.im systemd[1]: apache2.service failed.

그런 다음 fdisk -l:

root@lew:/# fdisk -l

Disk /dev/vda: 20 GiB, 21476933632 bytes, 41947136 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: gpt
Disk identifier: 06F7B3C9-8E13-42CD-AD52-7A02301B6F16

Device     Start      End  Sectors Size Type
/dev/vda1   2048 41945087 41943040  20G Linux filesystem

그리고 fsck /

root@lew:/# sudo fsck /
fsck from util-linux 2.25.2
fsck.ext4: Unable to resolve 'UUID=815063a9-c956-44a6-ab11-05e1d0bb3a58'

저는 이 모든 것에 초보자입니다. 하지만 제가 읽은 내용에 따르면 fstab에서 뭔가를 수정해야 합니까? 업데이트로 인해 이 문제가 발생한 이유는 무엇입니까? 무엇이 잘못되었을 수 있습니까?

DigitalOcean에서 호스팅되므로 이 서버에 SSH로 연결합니다.

편집하다:

블키드

root@lew:~# blkid
/dev/vda1: LABEL="DOROOT" UUID="18254707-08e8-494e-b456-938592928a5e" TYPE="ext4" PTTYPE="dos" PARTLABEL="primary" PARTUUID="8c484e81-f919-4803-acc7-1447fdd81b45"

root@lew:~# mount
/dev/vda1 on / type ext4 (rw,errors=remount-ro)
proc on /proc type proc (rw,nodev,noexec,nosuid)
sysfs on /sys type sysfs (rw,nodev,noexec,nosuid)
none on /sys/fs/cgroup type tmpfs (rw,uid=0,gid=0,mode=0755,size=1024)
none on /sys/fs/fuse/connections type fusectl (rw)
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/security type securityfs (rw)
udev on /dev type devtmpfs (rw,mode=0755)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
tmpfs on /run type tmpfs (rw,noexec,nosuid,size=10%,mode=0755)
none on /run/lock type tmpfs (rw,nodev,noexec,nosuid,size=5242880)
none on /run/shm type tmpfs (rw,nosuid,nodev)
none on /run/user type tmpfs (rw,nodev,noexec,nosuid,size=104857600,mode=0755)
none on /sys/fs/pstore type pstore (rw)
systemd on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,noexec,nodev,none,name=systemd)

Fstab

root@lew:~# cat /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/vda1 during installation
#UUID=815063a9-c956-44a6-ab11-05e1d0bb3a58 /               ext4    errors=remount-ro 0       1
UUID=06F7B3C9-8E13-42CD-AD52-7A02301B6F16 /               ext4    errors=remount-rw 0       1

/swapfile       none    swap    sw      0       0

답변1

해결책은 댓글에 게시되었습니다.@Lewis Lebentz 7월 26일 15:00.

답변을 찾는 사람이 여기에서 쉽게 찾을 수 있도록 다른 말로 바꿔 보겠습니다. 그러나 @Lewis는 답변을 직접 게시하여 답변으로 표시해야 하며 귀하는 정당한 인정을 받아야 합니다.

해결책: 지원 티켓을 열고 Digital Ocean에 복구 ISO 마운트를 요청하세요(그들만이 마운트할 수 있는 특수 ISO입니다).

  1. 파일 시스템을 마운트하고 편집하려면 1을 선택합니다 /etc/fstab. 메모:콘솔을 사용하여 nano또는 vi /mnt/etc/fstab. 또는 복구 옵션에서 SSH 및 네트워킹을 활성화하여 터미널에 로그인할 수 있습니다(참조:지침) 비록 제가 직접 시도해본 적은 없지만요.
  2. 거기에 있는 UUID를 blkid 출력으로 변경하고 저장하세요.
  3. DO에게 복구 디스크 제거를 요청하세요. 다시 시작하면 다시 액세스할 수 있습니다!

답변2

ændrük이 댓글에 게시한 대로 수행할 수 있습니다.

$ mount -rw -o remount /dev/vda1 /
$ sed s/wrong_uuid/correct_uuid/ -i /etc/fstab

..그리고 리눅스를 다시 부팅하세요! 장치 이름으로 vda1을 변경했는지 확인하십시오. 그리고 sed 명령에는 물론 올바른 UUID가 포함됩니다!

답변3

나에게도 이런 일이 일어나는 것을 발견했습니다. /etc/fstab의 디스크 UUID를 확인할 수 없습니다. 먼저 다음을 실행하여 디스크의 UUID를 찾아 이 문제를 해결했습니다.

sudo blkid -c /dev/null -o list

마운트 지점에 대한 디스크 UUID 복사/

그런 다음 @ændrük 의견을 따르고 다음을 사용하여 디스크를 다시 마운트했습니다.

mount -rw -o remount UUID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx

그런 다음 /etc/fstab을 편집하여 루트 디스크의 디스크 UUID를 변경했습니다.

관련 정보