Hello,

Thanks for your reply.

Here is the results from my system:

Two VGs.

systemvg on /dev/sda4
datavg on /dev/sdb1

ls -la /dev/mapper


total 124
drwxr-xr-x�� 2 root root��� 4096 Sep 16� 2005 .
drwxr-xr-x� 36 root root� 118784 Sep 16 01:49 ..
crw-------�� 1 root root� 10, 63 Sep 16� 2005 control
brw-------�� 1 root root 253,� 8 Sep 16� 2005 datavg-backup
brw-------�� 1 root root 253,� 6 Jul 16 20:32 datavg-rootlv
brw-------�� 1 root root 253,� 7 Jul 16 22:40 datavg-snk2lv
brw-------�� 1 root root 253,� 0 Jun� 5 03:24 systemvg-optlv
brw-------�� 1 root root 253,� 1 May 10 03:08 systemvg-rootlv
brw-------�� 1 root root 253,� 4 Jun� 5 03:27 systemvg-temp
brw-------�� 1 root root 253,� 2 Jun� 5 03:26 systemvg-tmplv
brw-------�� 1 root root 253,� 3 Jun� 5 03:26 systemvg-usrlv
brw-------�� 1 root root 253,� 1 Jun� 5 03:25 systemvg-varlv


df -h output is follows:

Filesystem�������� �� ��� � � Size� Used Avail Use% Mounted on
/dev/root/rootlv�� � ��� � � 1008M� 255M� 702M� 27% /
tmpfs�������������� �� �� � � 500M�� 24K� 500M�� 1% /dev/shm
/dev/sda2����������� ��� ��� � 54M� 7.1M�� 44M� 14% /boot
/dev/mapper/systemvg-optlv� � 3.0G� 607M� 2.4G� 20% /opt�� �� �� <--,�
These filesystems and their
/dev/mapper/systemvg-tmplv��� 4.0G� 2.7G� 1.4G� 67% /usr�� �� �� <---� mapped devices are scrambled
/dev/mapper/systemvg-usrlv��� 2.0G� 442M� 1.6G� 22% /var�� �� �� <---� and I found this combination
/dev/mapper/systemvg-varlv� � 2.0G� 4.7M� 2.0G�� 1% /tmp�� �� �� <--'� by try-and-find !!
/dev/mapper/datavg-backup�� �� 69G�� 33M�� 69G�� 1% /mnt/backup
/dev/mapper/datavg-rootlv �� 1020M� 261M� 760M� 26% /mnt/datavg-rootlv
/dev/mapper/datavg-snk2lv� �� 4.0G� 2.7G� 1.4G� 68% /mnt/datavg-snk2�� �� <---- This filesystem is broken
/dev/mapper/systemvg-rootlv � 2.0G� 4.7M� 2.0G�� 1% /mnt/systemvg-rootlv
/dev/mapper/systemvg-temp�� �� 91G�� 63G�� 29G� 69% /mnt/systemvg-temp


dmsetup ls output is:

systemvg-temp� (253, 4)
systemvg-usrlv (253, 2)
systemvg-tmplv (253, 1)
systemvg-rootlv�� (253, 5)
systemvg-varlv (253, 3)
datavg-backup� (253, 8)
datavg-snk2lv� (253, 7)
datavg-rootlv� (253, 6)
systemvg-optlv (253, 0)



dmsetup table output is:

systemvg-temp: 0 190791680 linear 8:4 33554816
systemvg-usrlv: 0 8388608 linear 8:4 20971904
systemvg-tmplv: 0 4194304 linear 8:4 16777600
systemvg-rootlv: 0 2097152 linear 8:4 384
systemvg-varlv: 0 4194304 linear 8:4 29360512
datavg-backup: 0 104857600 linear 8:17 41943424
datavg-backup: 104857600 37830656 linear 8:17 274727296
datavg-snk2lv: 0 39845888 linear 8:17 2097536
datavg-snk2lv: 39845888 127926272 linear 8:17 146801024
datavg-rootlv: 0 2097152 linear 8:17 384
systemvg-optlv: 0 6291456 linear 8:4 10486144


LV Dsplay for /dev/datavg/snk2lv :

� --- Logical volume ---
� LV Name��������������� /dev/datavg/snk2lv
� VG Name��������������� datavg
� LV UUID��������������� MCuj5G-XO1e-z3OE-BT9N-Lr5p-SbCO-3U8D4K
� LV Write Access������� read/write
� LV Status������������� available
� # open���������������� 1
� LV Size��������������� 80.00 GB
� Current LE������������ 20480
� Segments�������������� 2
� Allocation������������ inherit
� Read ahead sectors���� 0
� Block device���������� 253:7


As you can see it is 80 GB but in df -h output, it is only 4 GB, and the contents of the filesystem� is something like the contents of /usr, I think a snapshot of /usr at the time when this error occured.

Also here are the vgdisplay -v output� and dmsetup info output....

Also here is the fdisk -l output, incase needed..


fdisk -l

Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

�� Device Boot����� Start�������� End����� Blocks�� Id� System
/dev/sda1�� *���������� 1������� 5222��� 41945683+�� 7� HPFS/NTFS
/dev/sda2����������� 5223������� 5229������ 56227+� 83� Linux
/dev/sda3����������� 5230������� 5491���� 2104515�� 82� Linux swap / Solaris
/dev/sda4����������� 5492������ 19456�� 112173862+� 8e� Linux LVM

Disk /dev/sdb: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

�� Device Boot����� Start�������� End����� Blocks�� Id� System
/dev/sdb1�������������� 1������ 19456�� 156280288+� 8e� Linux LVM





What I am trying to do is:

- At least get the directory contents of the filesystem /dev/datavg/snk2lv inorder to know what I have lost. Is it possible to get this with jfsutils ?? Any experience ?
- If there is a way to fix-up the device-mapper tables and get my filesystems back, it is ofcourse welcome.


Thanks in advance....


Fabian Herschel wrote:
You have a look which device path is used when mounting your both file
systems (using mount).
Than you can have a look at the major and minor device number of these
devices (using ls -la).
If these devices are using the same major/minor combination the kernel
assumes these devices
the be the same. This would show the effects you mentioned.

ls -la /dev/mapper/*
brw-------  1 root root 253, 3 Jun 21 16:09 /dev/mapper/rootvg-homlv
brw-------  1 root root 253, 2 Jun 21 16:09 /dev/mapper/rootvg-optlv

in this case rootvg-homlv has major 253 and minor 3, while rootvg-optlv
has major 253 and minor 2.

best regards
Fabian Herschel


Suleyman Kutlu schrieb:

  
Hello all,


I have an AMD-64 machine running SuSE 9.2. I have one SATA disk (for
now, will add another later on) and a VG on it. I have created some LVs.

Sometimes later, I realized that when I mount an LV (say lv_a) I see
the directory structure of another LV (say lv_b). If I issue a df -k,
I see a wrong size for lv_a, it is the size of lv_b. But in lvdisplay
output, the size for lv_a is correct.

The file systems on lv_a and lv_b is JFS.

/mnt is mounted as lv_b
/mnt2 is mounted as lv_a but has contents of lv_b


I thought that, filesystem structure is corrupted and started to work
on some filesystem level utilities, but later I see that,
another filesystem pair also got the same problem.


So I think it is a problem in device-mapper level, not the filesystem
level.

What can be the possible works to get what is wrong and how to fix ?
If the corruption is at filesystem level, do you have any experience
on JFS-utils ? I just want to see what was stored in lv_a, what I lost
in lv_a...


I am new at device-mapper, I don't have enough experience on it and I
do not want to loose everything while there is something that can be
recovered...

Any help is appreciated.

Thanks and regards..

* Suleyman Kutlu
* mailto: suleyman.kutlu@gmail.com

_______________________________________________
linux-lvm mailing list
linux-lvm@redhat.com
https://www.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/