V
V
Vii2018-11-21 09:12:54
linux
Vii, 2018-11-21 09:12:54

Did the hard drive on the server go to read only?

Hello
, I will immediately warn you that I am not a very advanced user in terms of linux.
The following situation occurred:
the database got up on the server

service mysqld status
Redirecting to /bin/systemctl status mysqld.service
● mariadb.service - MariaDB database server
   Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; vendor preset: disabled)
  Drop-In: /etc/systemd/system/mariadb.service.d
           └─custom.conf, nofile.conf
   Active: failed (Result: exit-code) since Wed 2018-11-21 07:39:04 MSK; 2min 46s ago
  Process: 4004 ExecStop=/etc/init.d/mysql stop (code=exited, status=0/SUCCESS)
  Process: 1370 ExecStart=/etc/init.d/mysql start (code=exited, status=0/SUCCESS)
 Main PID: 1384 (code=exited, status=1/FAILURE)

Nov 21 04:26:32 ****.ru systemd[1]: Starting MariaDB database server...
Nov 21 04:26:33 ****.ru mysql[1370]: Starting MySQL.181121 04:26:33 mysqld_safe Logging to '/var/lib/mysql/******.err'.
Nov 21 04:26:33 ****.ru mysql[1370]: 181121 04:26:33 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
Nov 21 04:26:36 ****.ru systemd[1]: Started MariaDB database server.
Nov 21 07:39:04 ****.ru systemd[1]: mariadb.service: main process exited, code=exited, status=1/FAILURE
Nov 21 07:39:04 ****.ru systemd[1]: Unit mariadb.service entered failed state.
Nov 21 07:39:04 ****.ru systemd[1]: mariadb.service failed.

service mysqld restart

Redirecting to /bin/systemctl restart mysqld.service
Job for mariadb.service failed because a configured resource limit was exceeded. See "systemctl status mariadb.service" and "journalctl -xe" for details.

df -h
says that there is free space
further, when trying to create or delete a file via ftp, winscp returned an error.
touch ~/test
touch: cannot touch ‘/root/test’: Read-only file system

mount
/dev/mapper/disk-1 on / type ext4 (ro,relatime,data=ordered)


mount -o remount,rw /dev/mapper/disk-1 /
mount: cannot remount /dev/mapper/disk-1 read-write, is write-protected

how to understand what's going on?
could it be that this is a hardware problem?
please tell me the next steps

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
sash999, 2018-11-21
@sash999

1. View logs. (/var/log/messages or so depending on the distribution)
2. Boot from any resque cd/usb and run fsck on bad partitions (there may be subtleties if you have raid, lvm or something else different from a normal partition on disk)

C
CityCat4, 2018-11-21
@CityCat4

Let's start with the fact that usually a hardware error does not convert disks to read-only.
Look at the logs first. /var/log/messages in particular. Since you have a blasphemous systemd - first you have to read how to do it :) If there are failure messages in the logs - get ready to replace the disk - in principle, since LVM is there, there will be no special problems, although you will have to suffer .
If there are no crash messages, boot from any LiveCD and run fsck to disk

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question