tangye 发表于 2013-05-04 12:05

服务器重装系统后,有个lv无法fsck

服务器比较老,多次意外宕机后,原来的系统盘无法正常启动。

因此找了块硬盘重新装了操作系统,HP-UX 11.0

用vgimport恢复了一个VG,其中有4个lv,第一个lv做了fsck后可以正常使用,第二个lv无法执行fsck# mount /dev/data/lvol2 /work2
/dev/data/lvol2: unrecognized file system
# fsck /dev/data/lvol2
fsck: /etc/default/fs is used for determining the file system type
cannot open device /dev/data/lvol2
file system check failure, aborting ...这个可能是啥原因?如何修复?

lbseraph 发表于 2013-05-04 14:27

还记得这个LV原来是什么文件系统类型么?fsck的时候直接指定文件系统类型试一下看看。

tangye 发表于 2013-05-04 23:00

回复 2# lbseraph


    好的,我试试看

uriyliu 发表于 2013-05-07 10:24

OS盘的lvol2通常是swap,不是文件系统,可以不管。

tangye 发表于 2013-05-07 14:27

本帖最后由 tangye 于 2013-05-07 14:28 编辑

回复 4# uriyliu


    我这个不是vg00

lbseraph 发表于 2013-05-07 21:45

回复 4# uriyliu

他这个是data的VG了,不是系统盘。
   

haizdl 发表于 2013-05-08 13:40

fsck 检查的不是逻辑卷而是文件系统。
先看看你的文件系统信息吧:

fstype -v /dev/data/lvol2

tangye 发表于 2013-05-09 10:51

本帖最后由 tangye 于 2013-05-09 10:52 编辑

这个问题大概搞清楚了,很久以前这个vg已经坏掉一块盘,一直没处理:em06:

Disk layout

    LVM disk                   Device file      HW Addr      size   vol. grp
    HP 73.4GST373405LC         /dev/dsk/c3t9d0    0/4/0/0.9.070007/dev/data
    HP 73.4GST373405LW         /dev/dsk/c6t9d0    1/10/0/0.9.0 0      /dev/data
    HP 73.4GST373405LC         /dev/dsk/c6t10d0   1/10/0/0.10.0 70007/dev/data

现在vgimport的时候只能加进来2块盘, 需要的这个lv有一些PE应该在坏掉那块盘上

# vgdisplay /dev/data
--- Volume groups ---
VG Name                     /dev/data
VG Write Access             read/write   
VG Status                   available               
Max LV                      255   
Cur LV                      4      
Open LV                     4      
Max PV                      16   
Cur PV                      3      
Act PV                      2      
Max PE per PV               8750         
VGDA                        4   
PE Size (Mbytes)            8               
Total PE                  17498   
Alloc PE                  13751   
Free PE                     3747   
Total PVG                   0      
Total Spare PVs             0            
Total Spare PVs in use      0                     

# lvdisplay -v /dev/data/lvol2
--- Logical volumes ---
LV Name                     /dev/data/lvol2
VG Name                     /dev/data
LV Permission               read/write   
LV Status                   available/syncd         
Mirror copies               0            
Consistency Recovery      MWC               
Schedule                  parallel   
LV Size (Mbytes)            80000         
Current LE                  10000   
Allocated PE                10000      
Stripes                     0      
Stripe Size (Kbytes)      0                  
Bad block                   on         
Allocation                  strict                  
IO Timeout (Seconds)      default            

   --- Distribution of logical volume ---
   PV Name            LE on PVPE on PV
   /dev/dsk/c11t10d03687      3687      

   --- Logical extents ---
   LE    PV1                PE1   Status 1
   00000 ???                00000 current
   00001 ???                00001 current
   00002 ???                00002 current
   00003 ???                00003 current
   00004 ???                00004 current
   00005 ???                00005 current
   00006 ???                00006 current
   00007 ???                00007 current
   00008 ???                00008 current
   00009 ???                00009 current
   00010 ???                00010 current
   00011 ???                00011 current
   00012 ???                00012 current
   00013 ???                00013 current

tangye 发表于 2013-05-09 11:08

回复 2# lbseraph


    象我这种情况,如果lv用到的PV坏了,用户读写这个lv上另外一个PV的PE会报错吗?

   如果可以读写,那就有可能有新的数据。否则让他们找找以前的磁带恢复一下就结了

lbseraph 发表于 2013-05-09 11:15

回复 9# tangye

你这个以前是mirror的,LV的状态是stale没关系,只要看到另外一个PV的PE都是current状态,那么读写没问题的。
页: [1] 2
查看完整版本: 服务器重装系统后,有个lv无法fsck