linux-lvm Digest, Vol 70, Issue 6
A message that is not in the archive (sent off-list or not yet received): [email protected]
Hi!
I was able to use dd to read from the two PVs, so i started looking in the /proc/* files as you said:
/proc/mounts:
rootfs / rootfs rw 0 0
none /sys sysfs rw,nosuid,nodev,noexec,relatime 0 0
none /proc proc rw,nosuid,nodev,noexec,relatime 0 0
udev /dev tmpfs rw,relatime,size=10240k,mode=755 0 0 /dev/disk/by-uuid/56b77d5f-64e8-4392-be98-81a17a4c895d / reiserfs rw,relatime,notail 0 0
tmpfs /lib/init/rw tmpfs rw,nosuid,relatime,mode=755 0 0
tmpfs /dev/shm tmpfs rw,nosuid,nodev,relatime 0 0
devpts /dev/pts devpts rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000 0 0 /dev/mapper/Dreamhack-dreamhacklv /home reiserfs rw,relatime 0 0
and in /proc/swap
Filename Type Size Used Priority/dev/sdb3 partition 1951888 0 -1
Which did not give much, but i looked in /proc/mdstat as well Personalities :
md127 : inactive sdc[1](S) sda[0](S)
4514 blocks super external:imsm
unused devices: <none>
Doesn't that mean the PVs are mapped to the md127 device? (the /dev/md127 device exists as well)
I googled some and found that mdadm --remove /dev/md127 /dev/sdc and the same for the other device should remove the devices from the raid, but i just want to check with you so that i don't toast my data.. :P Could this be the issue?
Thanks in regards :)
Johan Gardell
2009/12/18 <[email protected]>:
Quoted 346 lines
Quoted 55 lines
Message: 3
Date: Thu, 10 Dec 2009 10:40:53 -0800
From: [email protected]
Subject: Re: [linux-lvm] Re: Re: Problems with dissapearing PV when � � � �mounting (Stuart D. Gathman)
To: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=us-asciiQuoted 5 lines · Johan Gardell [[email protected]] wrote:
The output from
dmsetup table
� gardin-swap_1:
� gardin-root:
� Dreamhack-dreamhacklv: 0 2636726272 linear 8:34 384The above output clearly shows that gardin-root and gardin-swap_1 have empty tables. I remember there was a fix that cleaned up empty tables like above but that won't help you. You need to figure out the reason for 'device mapper lookup failure' messages.
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
[22723.980390] device-mapper: table: 254:1: linear: dm-linear: Device lookup failed [22723.980395] device-mapper: ioctl: error adding target to table [22724.001153] device-mapper: table: 254:2: linear: dm-linear: Device lookup failed [22724.001158] device-mapper: ioctl: error adding target to tableThe above messages are direct reason for not "really" creating gardin-root or gardin-swap_1 logical volumes. �If you know the underlying PV's that make up gardin-root LV, try reading from them using 'dd'. If you can read, then the most likely problem is that someone else has opened them. It may be hard to find though. You need to go through usual culprits by running, 'cat
/proc/mounts', 'cat/proc/swaps' etc. Is EVMS using them by any chance..., maybe mdraid...Quoted 19 lines
Quoted 19 lines
Quoted 18 lines
mount doesn't give any messages in dmesg
lvs shows:
? LV ? ? ? ? ?VG ? ? ? ?Attr ? LSize ? Origin Snap% ?Move Log Copy% ?Convert ? dreamhacklv Dreamhack -wi-ao ? 1,23t
? root ? ? ? ?gardin ? ?-wi-d- 928,00g
?swap_1? ? ?gardin ? ?-wi-d- ? 2,59gif i try to mount with:
? mount -t reiserfs/dev/mapper/gardin-root/mnt/tmpi get this in dmesg:
? [23113.711247] REISERFS warning (device dm-1): sh-2006read_super_block: bread failed (dev dm-1, block 2, size 4096) ? [23113.711257] REISERFS warning (device dm-1): sh-2006read_super_block: bread failed (dev dm-1, block 16, size 4096) ? [23113.711261] REISERFS warning (device dm-1): sh-2021reiserfs_fill_super: can not find reiserfs on dm-1Quoted 10 lines
Quoted 2 lines
Quoted 2 lines
Looks like you have some kind of LV here. What is the output of the following two commands:
Your 'dmsetup table' output shows why the mount failed. You have an LV created with no mapping.
Thanks, Malahal.
------------------------------
Message: 2
Date: Fri, 11 Dec 2009 16:55:40 -0800
From: [email protected]
Subject: Re: [linux-lvm] Re: Re: Re: Problems with dissapearing PV � � � �when � �mounting (Stuart D. Gathman)
To: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=us-asciiQuoted 3 lines · Johan Gardell [[email protected]] wrote:
Ok, but why is that? I haven't changed anything on the LV. The output of lvdisplay -m shows that i have physical volumes extents right? (but
/dev/gardindoes not exist at all)"lvdisplay -m" shows what is in LVM metadata. The LVs just fail to activate in your case (root and
swap_1). Since the LVM commands (lvdisplay) are able to read the metadata without any errors, I would assume that *some other software* on your machine openede the needed PVs before LVM did, so LVM is unable to activate the LVs (aka unable to load the mapping tables).Thanks, Malahal.
------------------------------
Message: 3
Date: Mon, 14 Dec 2009 14:45:21 +0100 (CET)
From: Thomas Voegtle <[email protected]>
Subject: [linux-lvm] lvcreate does not respect units?
To: [email protected]
Message-ID: <[email protected]>
Content-Type: TEXT/PLAIN; format=flowed; charset=US-ASCIIHi,
I ran in a problem while creating a lv with units in powers of 1000.
I looked up the free space with vgdisplay:
root@(none):~# vgdisplay --units G | grep Size vgdisplay �VG Size � � � � � � � 25.70 GB vgdisplay �PE Size � � � � � � � 0.00 GB vgdisplay �Alloc PE / Size � � � 0 / 0 GB vgdisplay �Free �PE / Size � � � 6127 / 25.70 GBAnd then I tried to create the lv a little bit smaller, like this:
root@(none):~# lvcreate -L 25.50G datavolume -n datavolume lvcreate �Insufficient free extents (6127) in volume group datavolume: 6528 requiredYou even get the same message using a small g:
root@(none):~# lvcreate -L 25.50g datavolume -n datavolume lvcreate �Insufficient free extents (6127) in volume group datavolume: 6528 requiredSo it seems lvcreate does not respect the unit in power of 1000?
I used 2.02.56.
------------------------------
Message: 4
Date: Mon, 14 Dec 2009 14:00:58 +0000
From: Alasdair G Kergon <[email protected]>
Subject: Re: [linux-lvm] lvcreate does not respect units?
To: LVM general discussion and development <[email protected]>
Message-ID: <[email protected]>
Content-Type: text/plain; charset=us-asciiQuoted 7 lines · Thomas Voegtle
vgdisplay �Free �PE / Size � � � 6127 / 25.70 GB
root@(none):~# lvcreate -L 25.50g datavolume -n datavolume lvcreate �Insufficient free extents (6127) in volume group datavolume: 6528 requiredSo it seems lvcreate does not respect the unit in power of 1000?
Use either:
� lvcreate -l 6127
or
� lvcreate -l 100%FREEAlasdair
------------------------------
Message: 5
Date: Mon, 14 Dec 2009 15:28:24 +0100 (CET)
From: Thomas Voegtle <[email protected]>
Subject: Re: [linux-lvm] lvcreate does not respect units?
To: LVM general discussion and development <[email protected]>
Message-ID: <[email protected]>
Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowedQuoted 7 lines · Alasdair G Kergon
Quoted 5 lines · Thomas Voegtle
vgdisplay �Free �PE / Size � � � 6127 / 25.70 GB
root@(none):~# lvcreate -L 25.50g datavolume -n datavolume lvcreate �Insufficient free extents (6127) in volume group datavolume: 6528 requiredQuoted 6 lines
Quoted 1 line
So it seems lvcreate does not respect the unit in power of 1000?
Use either:
� lvcreate -l 6127
or
� lvcreate -l 100%FREEYes, thanks. I know.
But I thought you guys would like to hear from bugs?
Why is it possible to use vgdisplay with units power of 1000, if you cant use lvcreate with that kind of units?
The lvcreate man page says:
� � �-L, --size LogicalVolumeSize[bBsSkKmMgGtTpPeE]
------------------------------
Message: 6
Date: Mon, 14 Dec 2009 14:45:19 +0000
From: Alasdair G Kergon <[email protected]>
Subject: Re: [linux-lvm] lvcreate does not respect units?
To: LVM general discussion and development <[email protected]>
Message-ID: <[email protected]>
Content-Type: text/plain; charset=us-asciiQuoted 4 lines · Thomas Voegtle
Why is it possible to use vgdisplay with units power of 1000, if you cant use lvcreate with that kind of units?
The lvcreate man page says:
� � �-L, --size LogicalVolumeSize[bBsSkKmMgGtTpPeE]For input, it ignores case.
I've not felt particularly happy about changing that as it could change the behaviour of existing scripts, and typically, people pay little attention to the case of units when they are typing.
But should we change this in time for RHEL6?
Any more opinions?
Alasdair
------------------------------
Message: 7
Date: Mon, 14 Dec 2009 17:21:31 +0100 (CET)
From: Thomas Voegtle <[email protected]>
Subject: Re: [linux-lvm] lvcreate does not respect units?
To: LVM general discussion and development <[email protected]>
Message-ID: <[email protected]>
Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowedQuoted 11 lines · Alasdair G Kergon
Quoted 4 lines · Thomas Voegtle
Why is it possible to use vgdisplay with units power of 1000, if you cant use lvcreate with that kind of units?
The lvcreate man page says:
� � �-L, --size LogicalVolumeSize[bBsSkKmMgGtTpPeE]For input, it ignores case.
I've not felt particularly happy about changing that as it could change the behaviour of existing scripts, and typically, people pay little attention to the case of units when they are typing.
Ah, ok, I agree.
Quoted 3 lines
But should we change this in time for RHEL6?
Any more opinions?
Why don't you just do something like
si_unit_consistencyagain, but this time for input? Or something similiar?------------------------------
Message: 8
Date: Thu, 17 Dec 2009 18:41:23 -0500
From: "Brian J. Murrell" <[email protected]>
Subject: [linux-lvm] brainfart: lilo'd a PV
To: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset="utf-8"I managed to write a lilo block (lilo) to the start of a PV which I have on
/dev/sda(note,/dev/sdais a whole disk PV, unpartitioned).However, looking at a number of different PVs here, it appears that the LVM data starts at
0x200with: "LABELONE". �i.e.:# hexdump -C /dev/sdc3 00000000 �00 00 00 00 00 00 00 00 �00 00 00 00 00 00 00 00 �|................| * 00000200 �4c 41 42 45 4c 4f 4e 45 �01 00 00 00 00 00 00 00 �|LABELONE........| ... # hexdump -C /dev/sdb 00000000 �00 00 00 00 00 00 00 00 �00 00 00 00 00 00 00 00 �|................| * 000001b0 �00 00 00 00 00 00 00 00 �dc 59 0f 10 cf c9 00 00 �|.........Y......| 000001c0 �00 00 00 00 00 00 00 00 �00 00 00 00 00 00 00 00 �|................| * 00000200 �4c 41 42 45 4c 4f 4e 45 �01 00 00 00 00 00 00 00 �|LABELONE........| ... # hexdump -C /dev/sda 00000000 �fa eb 31 12 00 00 4c 49 �4c 4f 16 08 10 00 01 00 �|..1...LILO......| ... 00000180 �30 e4 cd 13 eb 91 e8 93 �fe 44 69 73 6b 20 72 65 �|0........Disk re| 00000190 �61 64 20 65 72 72 6f 72 �0d 0a 00 00 00 00 00 00 �|ad error........| 000001a0 �00 00 00 00 00 00 00 00 �00 00 00 00 00 00 00 00 �|................| 000001b0 �00 00 00 00 00 00 00 00 �c6 08 1a 45 cf c9 00 00 �|...........E....| 000001c0 �00 00 00 00 00 00 00 00 �00 00 00 00 00 00 00 00 �|................| * 000001f0 �00 00 00 00 00 00 00 00 �00 00 00 00 00 00 55 aa �|..............U.| 00000200 �4c 41 42 45 4c 4f 4e 45 �01 00 00 00 00 00 00 00 �|LABELONE........|Is that correct?
Is there anything I should do to repair this or is my brainfart benign to this PV?
Thanx!
b.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
Url : https://www.redhat.com/archives/linux-lvm/attachments/20091217/49feb21d/attachment.bin------------------------------
_______________________________________________
linux-lvm mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/linux-lvmEnd of linux-lvm Digest, Vol 70, Issue 6
****************************************
Quoted 26 lines · Johan Gardell [[email protected]] wrote:
Hi!
I was able to use dd to read from the two PVs, so i started looking in the
/proc/*files as you said:
/proc/mounts:
rootfs / rootfs rw 0 0
none /sys sysfs rw,nosuid,nodev,noexec,relatime 0 0
none /proc proc rw,nosuid,nodev,noexec,relatime 0 0
udev /dev tmpfs rw,relatime,size=10240k,mode=755 0 0/dev/disk/by-uuid/56b77d5f-64e8-4392-be98-81a17a4c895d/ reiserfs rw,relatime,notail 0 0
tmpfs/lib/init/rwtmpfs rw,nosuid,relatime,mode=755 0 0
tmpfs/dev/shmtmpfs rw,nosuid,nodev,relatime 0 0
devpts/dev/ptsdevpts rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000 0 0/dev/mapper/Dreamhack-dreamhacklv/home reiserfs rw,relatime 0 0and in
/proc/swap
Filename Type Size Used Priority/dev/sdb3partition 1951888 0 -1Which did not give much, but i looked in
/proc/mdstatas well Personalities :
md127 : inactive sdc[1](S) sda[0](S)
4514 blocks super external:imsm
Quoted 8 lines
unused devices: <none>
Doesn't that mean the PVs are mapped to the md127 device? (the
/dev/md127device exists as well)
I googled some and found that mdadm --remove/dev/md127/dev/sdcand the same for the other device should remove the devices from the raid, but i just want to check with you so that i don't toast my data.. :P Could this be the issue?
That is the most likely issue. You need to figure out why MD has taken them (someone must have created MD labels on them???). If you are not interested in what is stored there, you can certainly remove them from mdadm configuration and put them under LVM control but don't expect to get your data back. If you have stored something on them, you better use MD and restore the data before you remove them from MD and place them under LVM.
Thanks, Malahal.