linux 服务器那些事儿

最近公司服务器突然出现问题,导致软件工作停滞,于是本人就干起了网管的工作,决定去摸索一下,到底哪里出了问题,这里就分享一下个人的心路历程,希望对大家有用。

ubuntu 服务器无法编译软件,一直报filesystem 错误,首先想到的是重启系统,但是重启系统就进不去桌面了,只能进入命令模式了,由于服务器是由一个2T 系统盘,加上8个2T 组成的raid 6阵列,一个6T 的硬盘,只能心里祈祷raid 6 的阵列不能坏,因为raid6 的阵列完全不会搞。

在命令模式里输入:df - h (查看硬盘是否挂载),如下图:

sda1 ,sdi, md0(阵列)都已经在挂载的,但是为什么进不了系统,这就要对各个盘进行检测,在命令行里输入sudo fdisk -l查看坏的ubuntu 系统分区,这里我查看的正是/dev/sda1有问题,如何修复: 在命令行里输入sudo fsck /dev/sda1,系统会自动修复sda1 ,修复完会出现success ,之后 reboot ,就可以进入系统,再用fdisk -l就会显示各个硬盘显示正常:

Disk /dev/sda: 1.8 TiB, 2000398934016 bytes, 3907029168 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: dos

Disk identifier: 0x0006fbfe

Device Boot Start End Sectors Size Id Type

Disk /dev/sdb: 1.8 TiB, 2000398934016 bytes, 3907029168 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

Disk /dev/sdc: 1.8 TiB, 2000398934016 bytes, 3907029168 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

Disk /dev/sdd: 1.8 TiB, 2000398934016 bytes, 3907029168 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

Disk /dev/sde: 1.8 TiB, 2000398934016 bytes, 3907029168 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

Disk /dev/md0: 9.1 TiB, 10001323130880 bytes, 19533834240 sectors

Units: sectors of 1 * 512 = 512 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 524288 bytes / 2621440 bytes

Disk /dev/sdf: 1.8 TiB, 2000398934016 bytes, 3907029168 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

Disk /dev/sdg: 1.8 TiB, 2000398934016 bytes, 3907029168 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

Disk /dev/sdh: 1.8 TiB, 2000398934016 bytes, 3907029168 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

Units: sectors of 1 * 512 = 512 bytes

Sector size (logical/physical): 512 bytes / 4096 bytes

I/O size (minimum/optimal): 4096 bytes / 4096 bytes

---------------------------------------------------------

更多科技生活消息,请关注安卓ROM定制。

  • 发表于:
  • 原文链接https://kuaibao.qq.com/s/20180726G0W32N00?refer=cp_1026
  • 腾讯「云+社区」是腾讯内容开放平台帐号(企鹅号)传播渠道之一,根据《腾讯内容开放平台服务协议》转载发布内容。
  • 如有侵权,请联系 yunjia_community@tencent.com 删除。

同媒体快讯

扫码关注云+社区

领取腾讯云代金券