幾臺虛擬機須要重啓,重啓後鏈接不上,經過管理軟件看到node
Your system appears to have shut down uncleanly
press Y within 1 seconds to force file system integrity check...
checking root filesystem
/contains a file system with errors,check forced.
/:
Unattached inode 813065
/:UNEXPECTED INCONSISTENCY;RUN FSCK MANUALLY.
(i.e.,without -a or -p options)
[FAILED]
*** An error occurred during the file system check.
*** Dropping you to a shell; the system will reboot
*** when you leave the shell.
Give root password for maintenance
(or type Control-D to continue):shell
一開始按ctrl+d仍是跳到這個頁面,在就是輸入root密碼,能進入系統,開始使用網上的方法修復系統。vim
fsck -y /dev/vda1app
fsck -y /dev/vda3ide
重啓系統後發現仍是原來的問題,用df -Th查看,/boot和新增的分區都沒有掛在上oop
# df -Th
Filesystem Type Size Used Avail Use% Mounted on
/dev/vda3 ext4 42G 13G 27G 32% /
tmpfs tmpfs 1.9G 0 1.9G 0% /dev/shmhadoop
先把/從新掛載rem
mount -rw -o remount /虛擬機
掛載boot
it
mount /dev/vda1 /boot
再去查看/etc/fstab之前掛載過硬盤,發現後來還添加了一起vdb
# cat /etc/fstab
UUID=fc9d60a8-e39b-4c20-8d24-8f7975e6f1d7 / ext4 defaults 1 1
UUID=e1de6afb-150c-407d-80ec-e2c03ebcd8dd /boot ext4 defaults 1 2
UUID=c6b62139-385b-4891-b9e2-15876655cce9 swap swap defaults 0 0
tmpfs /dev/shm tmpfs defaults 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
sysfs /sys sysfs defaults 0 0
proc /proc proc defaults 0 0
/dev/vdb1 /hadoopWs ext4 defaults,noatime 1 1
fdisk -l 發現並無新增長的磁盤。
解決辦法
chmod a+rw /etc/fstab
vim /etc/fstab
下面一行註釋掉
#/dev/vdb1 /hadoopWs ext4 defaults,noatime 1 1
重啓系統reboot
再掛載硬盤