Read my story below.
I'm using LVM2 with following information:
Scan for VG:
# vgs
VG #PV #LV #SN Attr VSize VFree
unix 1 1 0 wz--n- 115.00g 45.00g
Scan for LV
# lvs
LV VG Attr LSize Origin Snap% Move Log Copy% Convert
work unix -wi-s- 70.00g
Attempt to activate VG, LV
# vgchange -ay
device-mapper: resume ioctl failed: Invalid argument
Unable to resume unix-work (254:1)
1 logical volume(s) in volume group "unix" now active
Check LV activated or not
# lvdisplay
/dev/mapper/unix-work: open failed: No such file or directory
--- Logical volume ---
LV Name /dev/unix/work
VG Name unix
LV UUID HzzTTr-rX2d-w1dP-NEQL-QksJ-rmHW-jMTxO7
LV Write Access read/write
LV Status NOT available
LV Size 70.00 GiB
Current LE 17920
Segments 2
Allocation inherit
Read ahead sectors auto
Because of last command end with error: "/dev/mapper/unix-work: open failed: No such file or directory" Then I have to run vgmknodes to manual create /dev/ nodes as below
# vgmknodes
The link /dev/unix/work should had been created by udev but it was not found. Falling back to direct link creation.
Now it look like better with status "suspended"
# lvdisplay
--- Logical volume ---
LV Name /dev/unix/work
VG Name unix
LV UUID HzzTTr-rX2d-w1dP-NEQL-QksJ-rmHW-jMTxO7
LV Write Access read/write
LV Status suspended
# open 0
LV Size 70.00 GiB
Current LE 17920
Segments 2
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 254:1
Attempt to mount LV:
# mount /dev/unix/work /mnt/
mount: /dev/mapper/unix-work already mounted or /mnt/ busy
Message from dmesg:
[ 1527.566964] device-mapper: table: 254:1: sda3 too small for target: start=94372224, len=136306688, dev_size=224606491
So, my question is: how can I wake up LV to mount it or use dd
command to get data from LVM partition?
Thanks in advanced!
kernel
,device-mapper
,lvm2
. 2. deactivate withvgchange -an
, then activate withvgchange -ay
.uname -a
Linux archbang 3.0-ARCH #1 SMP PREEMPT Wed Oct 19 10:27:51 CEST 2011 x86_64 Intel(R) Core(TM) i5-2410M CPU @ 2.30GHz GenuineIntel GNU/Linux
pvdisplay
andfdisk -lu /dev/sda
would be helpful. This part makes it sound like your partition holding the PV has shrunk, which is a big problem: sda3 too small for target: start=94372224, len=136306688, dev_size=224606491Linux hydrogen 3.1.2-1-ARCH #1 SMP PREEMPT Tue Nov 22 09:17:56 CET 2011 x86_64 Intel(R) Core(TM) i5-2410M CPU @ 2.30GHz GenuineIntel GNU/Linux
but still get the same result as last time I did. @psusi: My hdd is in GPT, so fdisk will not work. I use gdisk (AKA gpt fdisk).