Solved

lvm issue

Posted on 2014-02-18
10
407 Views
Last Modified: 2014-02-25
[root@rhel5 archive]# e2fsck -f /dev/myVG/myLV
e2fsck 1.39 (29-May-2006)
The filesystem size (according to the superblock) is 569344 blocks
The physical size of the device is 307200 blocks
Either the superblock or the partition table is likely to be corrupt!
Abort<y>? yes

how do i fix this
0
Comment
Question by:ittechlab
  • 6
  • 4
10 Comments
 
LVL 14

Expert Comment

by:comfortjeanius
ID: 39868759
What does the command produces?

dmesg

Open in new window


or
Plus did you try
 resize2fs -f /dev/myVG/myLV 307200

Open in new window



This comes from this link, " Size in superblock is different from the physical size of the partition"
0
 

Author Comment

by:ittechlab
ID: 39868765
vgcfgrestore[6786] general protection rip:44851f rsp:7fff509c1180 error:0
0
 

Author Comment

by:ittechlab
ID: 39868768
[root@rhel5 archive]# resize2fs -f /dev/myVG/myLV 307200
resize2fs 1.39 (29-May-2006)
Resizing the filesystem on /dev/myVG/myLV to 307200 (4k) blocks.
resize2fs: Can't read an block bitmap while trying to resize /dev/myVG/myLV
0
 

Author Comment

by:ittechlab
ID: 39868781
[root@rhel5 archive]# ll
total 80
-rw------- 1 root root  842 Feb 18 05:55 myVG_00000-913743800.vg
-rw------- 1 root root  847 Feb 18 05:56 myVG_00001-490127411.vg
-rw------- 1 root root 1180 Feb 18 06:44 myVG_00002-1799914869.vg
-rw------- 1 root root 1183 Feb 18 09:17 myVG_00003-1282895976.vg
-rw------- 1 root root 1157 Feb 18 11:17 myVG_00004-508832436.vg
-rw------- 1 root root 1157 Feb 18 11:17 myVG_00005-1913399351.vg
-rw------- 1 root root 1186 Feb 18 11:32 myVG_00006-503181047.vg
-rw------- 1 root root 1186 Feb 18 11:34 myVG_00007-2029148209.vg
-rw------- 1 root root 1183 Feb 18 11:59 myVG_00008-2110559607.vg


I tried to restore previous archive. still i am getting the same issue.
0
 

Author Comment

by:ittechlab
ID: 39870451
[root@rhel5 /]# vgremove myVG
Do you really want to remove volume group "myVG" containing 1 logical volumes? [y/n]: y
Do you really want to remove active logical volume myLV? [y/n]: y
  Unable to deactivate open myVG-myLV-real (253:2)
  Unable to deactivate logical volume "myLV"

why i am unable to remove the VG.
0
Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

 
LVL 14

Expert Comment

by:comfortjeanius
ID: 39870507
Can you check the volume status:

lvs

Open in new window


Plus make sure......
There is no other indication that the LV or VG is open or in use. The 'df ' command reports no mounted filesystems. Neither 'fuser ' nor 'lsof ' report any open files related to this LV.

Check this link, "Why can’t I remove a Linux logical volume? and Cannot Deactivate LVM Logical volume
0
 

Author Comment

by:ittechlab
ID: 39870515
[root@rhel5 src]# lvs
  LV       VG         Attr   LSize   Origin   Snap%  Move Log Copy%  Convert
  LogVol00 VolGroup00 owi-ao  27.91G
  LogVol01 VolGroup00 -wi-ao   1.97G
  rootsnap VolGroup00 swi-a- 512.00M LogVol00  95.50
0
 

Author Comment

by:ittechlab
ID: 39870536
I am trying remove disk

[root@rhel5 src]# dmsetup ls
myVG-myLV-real  (253, 2)
VolGroup00-LogVol00-real        (253, 7)
VolGroup00-rootsnap-cow (253, 8)
myVG-mylvbackup (253, 5)
VolGroup00-LogVol01     (253, 1)
VolGroup00-LogVol00     (253, 0)
myVG-mylvbackup-cow     (253, 4)
VolGroup00-rootsnap     (253, 6)



[root@rhel5 src]# pvremove /dev/sdb
  Can't open /dev/sdb exclusively - not removing. Mounted filesystem?
0
 
LVL 14

Expert Comment

by:comfortjeanius
ID: 39870574
To remove an inactive logical volume, use the lvremove command. You must close a logical volume with the umount command before it can be removed. In addition, in a clustered environment you must deactivate a logical volume before it can be removed.
0
 
LVL 14

Accepted Solution

by:
comfortjeanius earned 500 total points
ID: 39870613
If you are trying to remove a disk from the logical volume.....
either to replace the disk or to use the disk as part of a different volume. In order to remove a disk, you must first move the extents on the LVM physical volume to a different disk or set of disks.

Check this link out, "Removing a Disk from a Logical Volume"
0

Featured Post

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is the error message I got (CODE) Error caused by incompatible libmp3lame 3.98-2 with ffmpeg I've googled this error message and found out sometimes it attaches this note "can be treated with downgrade libmp3lame to version 3.97 or 3.98" …
rdate is a Linux command and the network time protocol for immediate date and time setup from another machine. The clocks are synchronized by entering rdate with the -s switch (command without switch just checks the time but does not set anything). …
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

929 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now