LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-27-2015, 01:15 AM   #1
vpp
Member
 
Registered: Apr 2015
Posts: 62

Rep: Reputation: Disabled
Exclamation LVM issue


Hello,
after so many years of happy hours with my Fedora 10, I decided to upgrade it with a bigger hard disk to accommodate more digitized music. I installed the disk and wanted to add it to LVM, because the old IDE disk was in LVM too. All went well during that session. Boldly I placed all bits into the LV and started to enjoy those terabytes. For some reason, I didn't quite have LVM idea in my head, so I moved all my music and videos to a directory I created on that big disk.

At some point I decided to reboot to check that everything still works after that! Well, it didn't!!
I was not able to boot as long as that big SATA disk was along in LVM!

Tried many times and still I cannot understand it. Probably initrd did not support SATA...?? So, as I was not fully aware of LVM altogether, I was not better aware of how to remove a disk from LVM. I had to do it using a rescue disk anyway.

Earlier I remember seeing text "LVM2 not supported" when viewing partition data of this disk in Gparted.

Now I am running the system with that old and small IDE disk and writing this message...

Currently, the big SATA disk is obviously without a file system. It seems to have a partition. I have already spent numerous hours studying alternatives, but all I would like to ask from you now is, is it possible that there is any data available in this disk? If yes, then how to get it out?

Cheers.
 
Old 04-27-2015, 02:13 AM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 20,944

Rep: Reputation: 4070Reputation: 4070Reputation: 4070Reputation: 4070Reputation: 4070Reputation: 4070Reputation: 4070Reputation: 4070Reputation: 4070Reputation: 4070Reputation: 4070
Before people start yelling at you for using F10, how about you get up to date ?. F21 is current and F22 will be out in a month or so ...

If you want real help you'll need to be (much) more specific than "I was not able to boot".
Where are you running gparted - on the F10 system, or using a liveCD ?. Try a current F21 DVD and see if it will recognise both disks in the vg.
 
Old 04-27-2015, 02:23 AM   #3
vpp
Member
 
Registered: Apr 2015
Posts: 62

Original Poster
Rep: Reputation: Disabled
Thanks for the hint!
I might consider installing a more recent OS once I get this most troublesome issue solved.

How to rescue the data (if anything available) from the SATA disk? I guess there is no way introducing the disk back to LVM without formatting and losing everything?!
 
Old 04-27-2015, 02:31 AM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 20,944

Rep: Reputation: 4070Reputation: 4070Reputation: 4070Reputation: 4070Reputation: 4070Reputation: 4070Reputation: 4070Reputation: 4070Reputation: 4070Reputation: 4070Reputation: 4070
If it was added already, it will have LVM metadata on it - a recent liveCD should have all the SATA and IDE support as well as LVM. It should recognise all the LVM entities for you, and mount it as well.
 
1 members found this post helpful.
Old 04-27-2015, 02:38 AM   #5
vpp
Member
 
Registered: Apr 2015
Posts: 62

Original Poster
Rep: Reputation: Disabled
I believe a newer release will do better in all respects!

However, as I explained in my first post, I had added the disk into LVM and removed (reduced) it, to make the system bootable. However, I had not removed it in a proper way. I believe there is very little on that disk reminding of LVM once you have removed it?! Am I right?
 
Old 04-27-2015, 02:44 AM   #6
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
Welcome to LQ!!!

We are specifically looking for information of your existing VG. As you said you made your new disk part of existing LVM setup we have to assume you added it to the same VG. It will be good if you can share the output of the following commands:

1.
Code:
vgs
2.
Code:
lvs
3.
Code:
pvs
4.
Code:
lvdisplay
5.
Code:
vgdisplay
6.
Code:
ls -al /dev/mapper
 
1 members found this post helpful.
Old 04-27-2015, 02:55 AM   #7
vpp
Member
 
Registered: Apr 2015
Posts: 62

Original Poster
Rep: Reputation: Disabled
Hello,
yes indeed I did, VolGroup00, if I remember correctly.

I had also another SATA disk there too. I left it out of the description to make it look maybe less complex.

I will provide the output of those commands in the evening when I am at home. My time is now 10:50.

All I can say at this point regarding those commands is that they will most probably only tell about current configuration, which includes just one small IDE disk. I suppose all information about the interesting configuration involving that big SATA disk is in one LVM archive file.
 
Old 04-27-2015, 03:04 AM   #8
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
Yes, vgs, lvs and pvs will display stats about the current stuff, we haven't seen your system so it is always good to have that information handy when assisting with such issues. vgdisplay and lvdisplay should report discrepancy incase you haven't removed lv properly, let's see. Last command is to make sure that there is nothing showing up under /dev/mapper related to the lv you deleted.
 
Old 04-27-2015, 03:38 AM   #9
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 20,944

Rep: Reputation: 4070Reputation: 4070Reputation: 4070Reputation: 4070Reputation: 4070Reputation: 4070Reputation: 4070Reputation: 4070Reputation: 4070Reputation: 4070Reputation: 4070
Personally, I'd like those commands run from the F21 liveCD. Preferably after a vgchange had been run.
 
Old 04-27-2015, 09:44 AM   #10
vpp
Member
 
Registered: Apr 2015
Posts: 62

Original Poster
Rep: Reputation: Disabled
Hello,
I can download F21 CD later and repeat the commands. Anyway, here are the results obtained in this old environment:

vgs
===
VG #PV #LV #SN Attr VSize VFree
VolGroup00 1 2 0 wz--n- 232.69G 32.00M

lvs
===
LV VG Attr LSize Origin Snap% Move Log Copy% Convert
LogVol00 VolGroup00 -wi-ao 229.69G
LogVol01 VolGroup00 -wi-ao 2.97G

pvs
===
PV VG Fmt Attr PSize PFree
/dev/sdb2 VolGroup00 lvm2 a- 232.69G 32.00M

lvdisplay
=========
--- Logical volume ---
LV Name /dev/VolGroup00/LogVol00
VG Name VolGroup00
LV UUID OiJx9U-oSOX-vKVo-hTTM-BmMR-E4oi-7aPAMW
LV Write Access read/write
LV Status available
# open 1
LV Size 229.69 GB
Current LE 7350
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:0

--- Logical volume ---
LV Name /dev/VolGroup00/LogVol01
VG Name VolGroup00
LV UUID psguY9-0QmF-S58p-Iowo-Sz1c-iQja-lW4pxj
LV Write Access read/write
LV Status available
# open 1
LV Size 2.97 GB
Current LE 95
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:1

vgdisplay
=========
--- Volume group ---
VG Name VolGroup00
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 32
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 2
Open LV 2
Max PV 0
Cur PV 1
Act PV 1
VG Size 232.69 GB
PE Size 32.00 MB
Total PE 7446
Alloc PE / Size 7445 / 232.66 GB
Free PE / Size 1 / 32.00 MB
VG UUID Yc5AQm-23OO-0Rs5-tw7R-HzdR-iOcy-K2e0Ev

ls -al /dev/mapper
==================
total 0
drwxr-xr-x 2 root root 100 2015-04-27 17:12 .
drwxr-xr-x 15 root root 4800 2015-04-27 17:13 ..
crw-rw---- 1 root root 10, 63 2015-04-27 17:12 control
brw-rw---- 1 root disk 253, 0 2015-04-27 17:13 VolGroup00-LogVol00
brw-rw---- 1 root disk 253, 1 2015-04-27 17:12 VolGroup00-LogVol01

Here is also that archived VolGroup00 metadata with that problematic SATA disk:
===============================================================================
# Generated by LVM2 version 2.02.39 (2008-06-27): Tue Apr 7 22:43:25 2015

contents = "Text Format Volume Group"
version = 1

description = "Created *before* executing '/sbin/lvremove --config log{command_names=0} --force /dev/VolGroup00/LogVol02'"

creation_host = "localhost.localdomain" # Linux localhost.localdomain 2.6.27.41-170.2.117.fc10.x86_64 #1 SMP Thu Dec 10 10:36:29 EST 2009 x86_64
creation_time = 1428435805 # Tue Apr 7 22:43:25 2015

VolGroup00 {
id = "Yc5AQm-23OO-0Rs5-tw7R-HzdR-iOcy-K2e0Ev"
seqno = 9
status = ["RESIZEABLE", "READ", "WRITE"]
extent_size = 65536 # 32 Megabytes
max_lv = 0
max_pv = 0

physical_volumes {

pv0 {
id = "Husf13-G5Ed-wuuD-UBcI-6EjZ-zQnW-1EHdkm"
device = "/dev/sdb2" # Hint only

status = ["ALLOCATABLE"]
dev_size = 487990440 # 232.692 Gigabytes
pe_start = 384
pe_count = 7446 # 232.688 Gigabytes
}

pv1 {
id = "sb4SLy-laOq-JGaX-zctr-mtkJ-9Zfb-23gPUB"
device = "/dev/sda1" # Hint only

status = ["ALLOCATABLE"]
dev_size = 3907024002 # 1.81935 Terabytes
pe_start = 384
pe_count = 59616 # 1.81934 Terabytes
}
}

logical_volumes {

LogVol00 {
id = "OiJx9U-oSOX-vKVo-hTTM-BmMR-E4oi-7aPAMW"
status = ["READ", "WRITE", "VISIBLE"]
segment_count = 1

segment1 {
start_extent = 0
extent_count = 7350 # 229.688 Gigabytes

type = "striped"
stripe_count = 1 # linear

stripes = [
"pv0", 0
]
}
}

LogVol01 {
id = "psguY9-0QmF-S58p-Iowo-Sz1c-iQja-lW4pxj"
status = ["READ", "WRITE", "VISIBLE"]
segment_count = 1

segment1 {
start_extent = 0
extent_count = 95 # 2.96875 Gigabytes

type = "striped"
stripe_count = 1 # linear

stripes = [
"pv0", 7350
]
}
}

LogVol02 {
id = "apdg4m-EqzS-JNrz-4h9g-Yoc3-92S3-MdPzu3"
status = ["READ", "WRITE", "VISIBLE"]
segment_count = 2

segment1 {
start_extent = 0
extent_count = 1 # 32 Megabytes

type = "striped"
stripe_count = 1 # linear

stripes = [
"pv0", 7445
]
}
segment2 {
start_extent = 1
extent_count = 59616 # 1.81934 Terabytes

type = "striped"
stripe_count = 1 # linear

stripes = [
"pv1", 0
]
}
}
}
}

And here's the current one:
===========================
# Generated by LVM2 version 2.02.39 (2008-06-27): Sun Apr 12 22:30:27 2015

contents = "Text Format Volume Group"
version = 1

description = "Created *after* executing '/sbin/vgreduce --config log{command_names=0} VolGroup00 /dev/sdc1'"

creation_host = "localhost.localdomain" # Linux localhost.localdomain 2.6.27.41-170.2.117.fc10.x86_64 #1 SMP Thu Dec 10 10:36:29 EST 2009 x86_64
creation_time = 1428867027 # Sun Apr 12 22:30:27 2015

VolGroup00 {
id = "Yc5AQm-23OO-0Rs5-tw7R-HzdR-iOcy-K2e0Ev"
seqno = 32
status = ["RESIZEABLE", "READ", "WRITE"]
extent_size = 65536 # 32 Megabytes
max_lv = 0
max_pv = 0

physical_volumes {

pv0 {
id = "Husf13-G5Ed-wuuD-UBcI-6EjZ-zQnW-1EHdkm"
device = "/dev/sdb2" # Hint only

status = ["ALLOCATABLE"]
dev_size = 487990440 # 232.692 Gigabytes
pe_start = 384
pe_count = 7446 # 232.688 Gigabytes
}
}

logical_volumes {

LogVol00 {
id = "OiJx9U-oSOX-vKVo-hTTM-BmMR-E4oi-7aPAMW"
status = ["READ", "WRITE", "VISIBLE"]
segment_count = 1

segment1 {
start_extent = 0
extent_count = 7350 # 229.688 Gigabytes

type = "striped"
stripe_count = 1 # linear

stripes = [
"pv0", 0
]
}
}

LogVol01 {
id = "psguY9-0QmF-S58p-Iowo-Sz1c-iQja-lW4pxj"
status = ["READ", "WRITE", "VISIBLE"]
segment_count = 1

segment1 {
start_extent = 0
extent_count = 95 # 2.96875 Gigabytes

type = "striped"
stripe_count = 1 # linear

stripes = [
"pv0", 7350
]
}
}
}
}

Thank you for extremely valuable help!
 
Old 04-27-2015, 10:00 AM   #11
vpp
Member
 
Registered: Apr 2015
Posts: 62

Original Poster
Rep: Reputation: Disabled
BTW, to create a F21 LiveCD, do I need a more modern system? I don't seem to find any site offering an iso and creating one does not succeed so far.
 
Old 04-27-2015, 10:04 AM   #12
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
Looking at the output it appears that the new disk has been removed from LV properly. If it wouldn't we would have got some error related to LV in vgdisplay or lvdisplay, however, those are clean so it is good.

From the output you shared it appears that your first disk is connected to IDE port 1 on motherboard but is on second bus as I can see it is denoted by sdb instead of sda. Not sure if that is causing the problem in booting. Here is what you can try:

1. Connect new hdd the way you connected before, boot using live CD and try to mount the partition from new HDD on /mnt or any other newly created directory (make sure the directory is empty on which you are mounting the partition).

2. If 1st doesn't work then try to put your old hdd on port where you are connecting new hdd and connect new hdd on the port where you had old hdd connected earlier. Go with normal boot and see if it works.

3. If point 1 and 2 fails try booting with live CD without changing anything (without changing disk position) and see if you are able to mount the partition from new HDD and can get data off it.

4. If above all fails, if possible, get a databus put it on secondary IDE port on motherboard. Connect old hdd to where it was connected before. Connect new hdd via new data bus.
 
Old 04-27-2015, 10:08 AM   #13
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
Quote:
Originally Posted by vpp View Post
BTW, to create a F21 LiveCD, do I need a more modern system? I don't seem to find any site offering an iso and creating one does not succeed so far.
You can download Fedora 21 live CD / DVD from official Fedora site, you can burn it onto DVD using PowerISO. If your system is capable of booting via USB then you can use live DVD to build liveUSB using unetbootin. Here is the link to get UNetbootin: http://unetbootin.sourceforge.net/
 
Old 04-27-2015, 10:20 AM   #14
vpp
Member
 
Registered: Apr 2015
Posts: 62

Original Poster
Rep: Reputation: Disabled
Thanks for all the hints!

However, I wonder if the disks are wrongly connected, but who knows. I have been wondering why the system changes the names of partitions...

In that sense I removed the hard disk in a wrong way that I did not move the data away from that disk. I did not quite keep in my mind what LVM means.

I will try to follow these instructions. So when I use live disk, I should use F21 one, not that old one I have? Maybe F10?
 
Old 04-27-2015, 10:27 AM   #15
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
You can use F10 live CD but ultimately you should move to F21 so it is good you download that liveCD and use the same.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LVM issue circus78 Linux - Server 5 12-12-2014 01:32 AM
LVM issue call_krushna Linux - Virtualization and Cloud 0 10-30-2012 10:58 AM
LVM issue AndyD236 Linux - General 2 11-24-2009 07:26 AM
LVM Issue bondoq Linux - General 8 05-12-2009 09:35 AM
LVM issue pauloco Linux - Hardware 1 11-14-2006 11:13 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:51 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration