:::
一般研習學員

help!服务器当了

discuss pic 2014-04-02 00:38:52
原因:内网服务器(centos6.5)启动过程中断电,重启不能登录系统!
提示:mount wrong fs type,bad option ,bad superblock on /dev/sda4
解决办法:进入单用户模式执行:#mount -o rw,remount /
提示:waring :can`t open /etc/fstab:No such file or directory
          mount: can`t find /in /etc/fstab or /etc/mtab
如果单用户模式下执行命令:#df -l  或#  fdisk 或#  fsck      提示找不到
help!请老师们帮忙哦!

discuss pic 2014-04-02 01:01:44
谢谢老师回复,该网站不能登录,是不是被屏了?
麻烦老师把内容贴出来好吗?
discuss pic 2014-04-02 01:06:51
tad

以下是轉貼內容:

今天在測試限制使用者硬碟使用Quota時, 出現以下錯誤訊息:

# mount -t ext3 /dev/sda8 /mnt/hd
mount: wrong fs type, bad option, bad superblock on /dev/sda7,
missing codepage or other error
In some cases useful info is found in syslog - try
dmesg | tail or so
# dmesg | tail
(檢查一下訊息)
EXT3 FS on sda8, internal journal
hfs: unable to find HFS+ superblock
VFS: Can't find ext3 filesystem on dev sda7.
end_request: I/O error, dev fd0, sector 0
end_request: I/O error, dev fd0, sector 0
kjournald starting. Commit interval 5 seconds
EXT3 FS on sda8, internal journal
EXT3-fs: mounted filesystem with ordered data mode.
SELinux: initialized (dev sda8, type ext3), uses xattr
VFS: Can't find ext3 filesystem on dtable 4f QNX4.x 3rd part 8e Linux LVM df BootIt
a OS/2 Boot Manag 50 OnTrack DM 93 Amoeba e1 DOS access
b W95 FAT32 51 OnTrack DM6 Aux 94 Amoeba BBT e3 DOS R/O
c W95 FAT32 (LBA) 52 CP/M 9f BSD/OS e4 SpeedStor
e W95 FAT16 (LBA) 53 OnTrack DM6 Aux a0 IBM Thinkpad hi eb BeOS fs
f W95 Ext'd (LBA) 54 OnTrackDM6 a5 FreeBSD ee EFI GPT
10 OPUS 55 EZ-Drive a6 OpenBSD ef EFI (FAT-12/16/
11 Hidden FAT12 56 Golden Bow a7 NeXTSTEP f0 Linux/PA-RISC b
12 Compaq diagnost 5c Priam Edisk a8 Darwin UFS f1 SpeedStor
14 Hidden FAT16 <3 61 SpeedStor a9 NetBSD f4 SpeedStor
16 Hidden FAT16 63 GNU HURD or Sys ab Darwin boot f2 DOS secondary
17 Hiddenev sda7.

判斷應該是硬碟分割區id不正確的關係:

# fdisk -l
(檢視一下硬碟分割區屬性)
Disk /dev/sda: 10.7 GB, 10737418240 bytes
255 heads, 63 sectors/track, 1305 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 1020 8193118+ 83 Linux
/dev/sda4 1021 1305 2289262+ 5 Extended
/dev/sda5 1021 1045 200781 8e Linux LVM
/dev/sda6 1046 1070 200781 8e Linux LVM
/dev/sda7 1071 1095 200781 8e Linux LVM
/dev/sda8 1096 1120 200781 8e Linux LVM

# HPFS/NTF 64 Novell Netware b7 BSDI fs fd Linux raid auto
18 AST SmartSleep 65 Novell Netware b8 BSDI swap fe LANstep
1b Hidden W95 FAT3 70 DiskSecure Mult bb Boot Wizard hid ff BBT

Command (m for help): p (列印出目前的partition table)

Disk /dev/sda: 10.7 GB, 10737418240 bytes
255 heads, 63 sectors/track, 1305 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 1020 8193118+ 83 Linux
/dev/sda4 1021 1305 2289262+ 5 Extended
/dev/sda5 1021 1045 200781 8e Linux LVM
/dev/sda6 1046 1070 200781 8e Linux LVM
/dev/sda7 1071 1095 fdisk /dev/sda

(重新設定/dev/sda底下的分割區屬性)
The number of cylinders for this disk is set to 1305.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)

Command (m for help): t (更改指定分割區的id)

Partition number (1-8): 8 (指定為/dev/sda8)
Hex code (type L to list codes): 83 (Linux)
Command (m for help): l (列出所有id用途)

0 Empty 1e Hidden W95 FAT1 80 Old Minix be Solaris boot
1 FAT12 24 NEC DOS 81 Minix / old Lin bf Solaris
2 XENIX root 39 Plan 9 82 Linux swap / So c1 DRDOS/sec (FAT-
3 XENIX usr 3c PartitionMagic 83 Linux c4 DRDOS/sec (FAT-
4 FAT16 <32M 40 Venix 80286 84 OS/2 hidden C: c6 DRDOS/sec (FAT-
5 Extended 41 PPC PReP Boot 85 Linux extended c7 Syrinx
6 FAT16 42 SFS 86 NTFS volume set da Non-FS data
7 HPFS/NTFS 4d QNX4.x 87 NTFS volume set db CP/M / CTOS / .
8 AIX 4e QNX4.x 2nd part 88 Linux plaintext de Dell Utility
9 AIX boo 200781 8e Linux LVM
/dev/sda8 1096 1120 200781 83 Linux

Command (m for help): w (將資料寫入, 這時候如果q就是不儲存離開)
The partition table has been altered!

Calling ioctl() to re-read partition table.

WARNING: Re-reading the partition table failed with error 16: 裝置或系統資源忙碌中.
The kernel still uses the old table.
The new table will be used at the next reboot.
Syncing disks.

這時候需要重開機才能使partition table生效, 也可以使用底下指令:

# partprobe
(將partition讀進kernel中)
# mkfs.ext3 /dev/sda8
(將該分割區format成ext3格式)
mketable 4f QNX4.x 3rd part 8e Linux LVM df BootIt
a OS/2 Boot Manag 50 OnTrack DM 93 Amoeba e1 DOS access
b W95 FAT32 51 OnTrack DM6 Aux 94 Amoeba BBT e3 DOS R/O
c W95 FAT32 (LBA) 52 CP/M 9f BSD/OS e4 SpeedStor
e W95 FAT16 (LBA) 53 OnTrack DM6 Aux a0 IBM Thinkpad hi eb BeOS fs
f W95 Ext'd (LBA) 54 OnTrackDM6 a5 FreeBSD ee EFI GPT
10 OPUS 55 EZ-Drive a6 OpenBSD ef EFI (FAT-12/16/
11 Hidden FAT12 56 Golden Bow a7 NeXTSTEP f0 Linux/PA-RISC b
12 Compaq diagnost 5c Priam Edisk a8 Darwin UFS f1 SpeedStor
14 Hidden FAT16 <3 61 SpeedStor a9 NetBSD f4 SpeedStor
16 Hidden FAT16 63 GNU HURD or Sys ab Darwin boot f2 DOS secondary
17 Hidden HPFS/NTF 64 Novell Netware b7 BSDI fs fd Linux raid auto
18 AST SmartSleep 65 Novell Netware b8 BSDI swap fe LANstep
1b Hidden W95 FAT3 70 DiskSecure Mult bb Boot Wizard hid ff BBT

Command (m for help): p (列印出目前的partition table)

Disk /dev/sda: 10.7 GB, 10737418240 bytes
255 heads, 63 sectors/track, 1305 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 1020 8193118+ 83 Linux
/dev/sda4 1021 1305 2289262+ 5 Extended
/dev/sda5 1021 1045 200781 8e Linux LVM
/dev/sda6 1046 1070 200781 8e Linux LVM
/dev/sda7 1071 1095 2fs 1.39 (29-May-2006)
Filesystem label=
OS type: Linux
Block size=1024 (log=0)
Fragment size=1024 (log=0)
50200 inodes, 200780 blocks
10039 blocks (5.00%) reserved for the super user
First data block=1
Maximum filesystem blocks=67371008
25 block groups
8192 blocks per group, 8192 fragments per group
2008 inodes per group
Superblock backups stored on blocks:
8193, 24577, 40961, 57345, 73729

Writing inode tables: done
Creating journal (4096 blocks): done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 23 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.


如此一來, 問題該就解決囉~
200781 8e Linux LVM
/dev/sda8 1096 1120 200781 83 Linux

Command (m for help): w (將資料寫入, 這時候如果q就是不儲存離開)
The partition table has been altered!

Calling ioctl() to re-read partition table.

WARNING: Re-reading the partition table failed with error 16: 裝置或系統資源忙碌中.
The kernel still uses the old table.
The new table will be used at the next reboot.
Syncing disks.

這時候需要重開機才能使partition table生效, 也可以使用底下指令:

# partprobe
(將partition讀進kernel中)
# mkfs.ext3 /dev/sda8
(將該分割區format成ext3格式)
mke2fs 1.39 (29-May-2006)
Filesystem label=
OS type: Linux
Block size=1024 (log=0)
Fragment size=1024 (log=0)
50200 inodes, 200780 blocks
10039 blocks (5.00%) reserved for the super user
First data block=1
Maximum filesystem blocks=67371008
25 block groups
8192 blocks per group, 8192 fragments per group
2008 inodes per group
Superblock backups stored on blocks:
8193, 24577, 40961, 57345, 73729

Writing inode tables: done
Creating journal (4096 blocks): done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 23 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.


如此一來, 問題該就解決囉~

:::

搜尋

QR Code 區塊

https%3A%2F%2Ftad0616.net%2Fmodules%2Ftad_discuss%2Fdiscuss.php%3FBoardID%3D10%26DiscussID%3D29860%26g2p%3D1

線上使用者

70人線上 (48人在瀏覽討論留言)

會員: 0

訪客: 70

更多…