- 论坛徽章:
- 0
|
debian squeeze的系统,用mdadm建立raid1,跑有近两年无问题。前两天感觉不对去终端看发现报有fs inode方面的错误一大堆(具体没记下来),登陆不行,热键启动不行……只有强断电,然后就再也启不了。启动报错为文件系统错误。
这是另一台类似机上的环境:- root@s-ii:~# uname -a
- Linux s-ii 2.6.32-5-686-bigmem #1 SMP Sun Sep 23 10:27:25 UTC 2012 i686 GNU/Linux
- root@s-ii:~# df -h
- Filesystem Size Used Avail Use% Mounted on
- /dev/md0 942M 578M 317M 65% /
- tmpfs 4.0G 0 4.0G 0% /lib/init/rw
- udev 4.0G 280K 4.0G 1% /dev
- tmpfs 4.0G 0 4.0G 0% /dev/shm
- /dev/md3 312G 25G 272G 9% /home
- /dev/md5 110G 72G 34G 69% /mnt/nxp/disk
- /dev/md8 36G 177M 34G 1% /mnt/nxp/swap
- /dev/md7 37G 177M 35G 1% /mnt/nxp/user
- /dev/md6 19G 253M 18G 2% /mnt/nxp/wks
- /dev/md2 1.9G 35M 1.8G 2% /tmp
- /dev/md4 19G 898M 17G 6% /usr
- /dev/md1 12G 773M 9.7G 8% /var
- root@s-ii:~# cat /proc/mdstat
- Personalities : [raid0] [raid1]
- md8 : active raid0 sda13[0] sdb13[3] sda14[2] sdb14[1]
- 37302528 blocks 64k chunks
-
- md7 : active raid0 sda11[0] sdb11[3] sda12[2] sdb12[1]
- 39069696 blocks 64k chunks
-
- md6 : active raid0 sda10[0] sdb10[1]
- 19534848 blocks 64k chunks
-
- md5 : active raid0 sda8[0] sdb8[3] sda9[2] sdb9[1]
- 117177600 blocks 64k chunks
-
- md4 : active raid1 sda7[0] sdb7[1]
- 19534912 blocks [2/2] [UU]
-
- md3 : active raid1 sda6[0] sdb6[1]
- 332031296 blocks [2/2] [UU]
-
- md2 : active raid1 sda5[0] sdb5[1]
- 1951744 blocks [2/2] [UU]
-
- md1 : active raid1 sda3[0] sdb3[1]
- 11719296 blocks [2/2] [UU]
-
- md0 : active raid1 sda1[0] sdb1[1]
- 979840 blocks [2/2] [UU]
-
- unused devices: <none>
复制代码 为了要出里面的数据,新做了一台debian _Jessie_,挂上一只坏盘,这是分区情况:- root@ljwsy:~# fdisk -l /dev/sdc
- Disk /dev/sdc: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors
- Units: sectors of 1 * 512 = 512 bytes
- Sector size (logical/physical): 512 bytes / 4096 bytes
- I/O size (minimum/optimal): 4096 bytes / 4096 bytes
- Disklabel type: dos
- Disk identifier: 0x00017d93
- Device Boot Start End Sectors Size Id Type
- /dev/sdc1 * 63 1959929 1959867 957M 83 Linux
- /dev/sdc2 1959930 17591174 15631245 7.5G 82 Linux swap / Solaris
- /dev/sdc3 17591175 56661254 39070080 18.6G 83 Linux
- /dev/sdc4 56661255 1953520064 1896858810 904.5G 5 Extended
- /dev/sdc5 56661318 60565049 3903732 1.9G 83 Linux
- /dev/sdc6 60565113 78140159 17575047 8.4G 83 Linux
- /dev/sdc7 78140223 97675199 19534977 9.3G 83 Linux
- /dev/sdc8 97675263 839862134 742186872 353.9G 83 Linux
- /dev/sdc9 839862198 1953520064 1113657867 531G 83 Linux
复制代码 然后加个新盘多方尝试不成功(下面的md0是拿来试水的,其他区没动),sdb是新盘:
- root@ljwsy:~# cat /proc/mdstat
- Personalities : [raid1]
- md0 : active raid1 sdc1[2] sdb1[0]
- 979392 blocks super 1.2 [2/2] [UU]
-
- md3 : inactive sdc6[2](S)
- 8786499 blocks super 1.2
-
- md6 : inactive sdc9[2](S)
- 556827909 blocks super 1.2
-
- md1 : inactive sdc3[2](S)
- 19534016 blocks super 1.2
-
- md2 : inactive sdc5[2](S)
- 1950842 blocks super 1.2
-
- md5 : inactive sdc8[2](S)
- 371092412 blocks super 1.2
-
- md4 : inactive sdc7[2](S)
- 9766464 blocks super 1.2
-
- unused devices: <none>
- root@ljwsy:~# mdadm -E /dev/sdc1
- /dev/sdc1:
- Magic : a92b4efc
- Version : 1.2
- Feature Map : 0x0
- Array UUID : f9d4b320:c4922ad9:17645e56:897e8cb5
- Name : ljwsy:0 (local to host ljwsy)
- Creation Time : Thu Nov 12 11:21:59 2015
- Raid Level : raid1
- Raid Devices : 2
- Avail Dev Size : 1958811 (956.61 MiB 1002.91 MB)
- Array Size : 979392 (956.60 MiB 1002.90 MB)
- Used Dev Size : 1958784 (956.60 MiB 1002.90 MB)
- Data Offset : 1056 sectors
- Super Offset : 8 sectors
- Unused Space : before=968 sectors, after=27 sectors
- State : clean
- Device UUID : 4145857f:81c186e8:0a782966:e12dfc71
- Update Time : Thu Nov 12 11:22:40 2015
- Bad Block Log : 512 entries available at offset 72 sectors
- Checksum : f57c2b1 - correct
- Events : 19
- Device Role : Active device 1
- Array State : AA ('A' == active, '.' == missing, 'R' == replacing)
- root@ljwsy:~# mdadm -E /dev/sdb1
- /dev/sdb1:
- Magic : a92b4efc
- Version : 1.2
- Feature Map : 0x0
- Array UUID : f9d4b320:c4922ad9:17645e56:897e8cb5
- Name : ljwsy:0 (local to host ljwsy)
- Creation Time : Thu Nov 12 11:21:59 2015
- Raid Level : raid1
- Raid Devices : 2
- Avail Dev Size : 1958880 (956.64 MiB 1002.95 MB)
- Array Size : 979392 (956.60 MiB 1002.90 MB)
- Used Dev Size : 1958784 (956.60 MiB 1002.90 MB)
- Data Offset : 1056 sectors
- Super Offset : 8 sectors
- Unused Space : before=968 sectors, after=96 sectors
- State : clean
- Device UUID : 8c21a15c:dad6feed:64f78efc:c6a07396
- Update Time : Thu Nov 12 11:22:40 2015
- Bad Block Log : 512 entries available at offset 72 sectors
- Checksum : acc8a6d7 - correct
- Events : 19
- Device Role : Active device 0
- Array State : AA ('A' == active, '.' == missing, 'R' == replacing)
复制代码 挂接时:
- root@ljwsy:~# mount /dev/md0 /mnt/tmp
- mount: wrong fs type, bad option, bad superblock on /dev/md0,
- missing codepage or helper program, or other error
- In some cases useful info is found in syslog - try
- dmesg | tail or so.
复制代码 按其提示dmesg没见有异常。
再来,针对没动过的区:
- root@ljwsy:~# mdadm -E /dev/sdc3
- /dev/sdc3:
- Magic : a92b4efc
- Version : 1.2
- Feature Map : 0x0
- Array UUID : 70b21eb6:3fb9ddaa:e06afa2a:236955e2
- Name : wb:1
- Creation Time : Tue Jan 15 20:25:33 2013
- Raid Level : raid1
- Raid Devices : 2
- Avail Dev Size : 39068032 (18.63 GiB 20.00 GB)
- Array Size : 19533944 (18.63 GiB 20.00 GB)
- Used Dev Size : 39067888 (18.63 GiB 20.00 GB)
- Data Offset : 2048 sectors
- Super Offset : 8 sectors
- Unused Space : before=1968 sectors, after=144 sectors
- State : clean
- Device UUID : ec182df4:009d6cb4:b71fa16a:a5d02009
- Update Time : Wed Nov 11 09:03:16 2015
- Checksum : 10eec90d - correct
- Events : 1804
- Device Role : Active device 0
- Array State : AA ('A' == active, '.' == missing, 'R' == replacing)
- root@ljwsy:~# mdadm -D /dev/md1
- /dev/md1:
- Version : 1.2
- Raid Level : raid0
- Total Devices : 1
- Persistence : Superblock is persistent
- State : inactive
- Name : wb:1
- UUID : 70b21eb6:3fb9ddaa:e06afa2a:236955e2
- Events : 1804
- Number Major Minor RaidDevice
- - 8 35 - /dev/sdc3
- root@ljwsy:~# mount /dev/md1 /mnt/tmp
- mount: wrong fs type, bad option, bad superblock on /dev/md1,
- missing codepage or helper program, or other error
- In some cases useful info is found in syslog - try
- dmesg | tail or so.
- root@ljwsy:~# dmesg
- ……
- [ 3691.999867] EXT4-fs (md1): unable to read superblock
- [ 3691.999955] EXT4-fs (md1): unable to read superblock
- [ 3692.000533] EXT4-fs (md1): unable to read superblock
- root@ljwsy:~# fsck.ext3 /dev/md1
- e2fsck 1.42.12 (29-Aug-2014)
- fsck.ext3: Invalid argument while trying to open /dev/md1
- The superblock could not be read or does not describe a valid ext2/ext3/ext4
- filesystem. If the device is valid and it really contains an ext2/ext3/ext4
- filesystem (and not swap or ufs or something else), then the superblock
- is corrupt, and you might try running e2fsck with an alternate superblock:
- e2fsck -b 8193 <device>
- or
- e2fsck -b 32768 <device>
- root@ljwsy:~# e2fsck -b 8193 /dev/md1
- e2fsck 1.42.12 (29-Aug-2014)
- e2fsck: Invalid argument while trying to open /dev/md1
- The superblock could not be read or does not describe a valid ext2/ext3/ext4
- filesystem. If the device is valid and it really contains an ext2/ext3/ext4
- filesystem (and not swap or ufs or something else), then the superblock
- is corrupt, and you might try running e2fsck with an alternate superblock:
- e2fsck -b 8193 <device>
- or
- e2fsck -b 32768 <device>
复制代码 没思路了,哪位同学指点一二,非常感谢你们的帮助。 |
|