Visit The New, Modern Unix Linux Community


LVM - restore metadata on other disk


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users LVM - restore metadata on other disk
# 1  
LVM - restore metadata on other disk

Hi guys,
I would like to ask your opinion about my theory, how to fix my broken LVM without risking any data loss.
I use Archlinux at home. I just love this distro, even it gives me a lots of work (particularly after system updates).

Basic system spec:
AMD FX(tm)-6100 Six-Core Processor
2x8GB Corsair DDR3
ASRock 970 Extreme3
3 x Seagate Constellation ES (SATA 6Gb/s) in sw RAID5, LVM on the top of the array
1 x Western Digital Caviar Blue (SATA 6Gb/s) for System
1 x Western Digital Caviar Blue (SATA 6Gb/s) for media(music/films/etc.)
I use this machine for work and for fun. I run several VMs in Virtualbox 4.x and playing World of Warcraft sometimes.

My main storage is on the RAID5 array (/dev/md127p1). I have created one VolumeGroup here(vg00) which contains one LogicalVolume (storage). I have a lots of install media here. Also I have some rare Oracle install stuffs here too(9/10g DB/AS/Portal, patches,repca and other stuffs) which I don't want to lose. I need them to my work.

The problem:
After a full system update and reboot my little Archlinux was broken. I have fixed most of the problems, now I'm able to boot and my new Gnome3 is also working, however the system can't see the LogicalVolume.

Code:
[root@archmain ~]# lvscan 
  No volume groups found
[root@archmain ~]# pvscan 
  No matching physical volumes found

[root@archmain ~]# fdisk -l
.....
Disk /dev/md127: 1.8 TiB, 2000138797056 bytes, 3906521088 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 262144 bytes / 524288 bytes
Disklabel type: dos
Disk identifier: 0x9c780907

Device       Boot Start        End     Blocks  Id System
/dev/md127p1       2048 3906521087 1953259520  8e Linux LVM


The theory:
After installing one extra hdd ( 3TB WD ) I will be able to clone all the bits of the RAID5 array, which contains(?) the LVM metadata too using dd. Hacking a little the lvm backup file (change the pv device name and id from /dev/md127p1 to the new disk, /dev/sdf1 or something) I may will be able to restore the VolumeGroup's metadata on the 3TB WD hdd. So if I scr*w things up during the restore process, I wont purge all my datas on the original RAID/LVM.

Do you think, this can work?

Thanks,
Peter.-
# 2  
The short answer: yes, it worked Smilie

Previous Thread | Next Thread
Thread Tools Search this Thread
Search this Thread:
Advanced Search

Test Your Knowledge in Computers #448
Difficulty: Medium
Quirky Linux and Puppy Linux were both created by Barry Kauler.
True or False?

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

LVM, Troubles with adding another Disk

I am having trouble with LVM and one of my physical volumes. Using Ubuntu Desktop 14.04 I was trying to set up LVM across two disks (not containing the OS or Home). First I created the initial Physical Volume, the Volume Group, and the Logical volume, and everything seemed fine. The... (2 Replies)
Discussion started by: JR_ULFOR
2 Replies

2. HP-UX

LVM: is possible to replace a disk?

Scenario1: VG00 lvm,not mirrored,2 disk of 36GB vg size VG00 size is under 30G. Is possible to remove a disk of 36GB and replace "on fly" with a disk of 300GB on VG00? Thanks (6 Replies)
Discussion started by: Linusolaradm1
6 Replies

3. SuSE

Problem migrating disk attached to the same vg (lvm)

Hi, I'm trying to migrate the content of disk 'A' to disk 'B', that they belong to the same vg 'data'_vg'. Whe using pvmove, I get the following error: 'device-mapper: suspend ioctl failed: Interrupted system call'. I put down the whole trace: pvmove -v "source_disk" "sink_disk" ... (0 Replies)
Discussion started by: Begnux
0 Replies

4. Filesystems, Disks and Memory

LVM recovery, Hard disk broken

Hi I am new on your forum, because I need some help. I have a server with debian and proxmox 2. The HardDisk is broken. I am in rescue mode, and I can't mount LVM partition to recover my backups. What I've already done : # fdisk -l Disk /dev/sda: 2000.4 GB, 2000398934016 bytes 255... (0 Replies)
Discussion started by: pppplu
0 Replies

5. HP-UX

Remove Faulty disk from HP-UX LVM VG

Requirement to remove a faulty mirrored disk from hp-ux LVM <root@pdwp1s>/etc # vgdisplay -v /dev/vg00 vgdisplay: Warning: couldn't query physical volume "/dev/dsk/c2t0d0": The specified path does not correspond to physical volume attached to this volume group vgdisplay: Warning: couldn't... (9 Replies)
Discussion started by: Shirishlnx
9 Replies

6. AIX

Disk I/O Issue using LVM

We have a filesystem which contains 8 hard disks but i am facing disk I/O issue becuase data is not spreading across all the disks.Is there any way i can check how data is spreading and any parameter we need to change to spread ata across all disks. OS--AIX 5.3 (1 Reply)
Discussion started by: ukatru
1 Replies

7. AIX

disk space shortage, how to migrate to LVM?

Hello I'm working on AIX 6.1. I inherited something I do not know and now I need to bring it into the line. # df -m Filesystem MB blocks Free %Used Mounted on /dev/hd4 | 256.00 | 87.09 | 66% / /dev/hd2 | 4608.00 | 82.45 | 99%... (11 Replies)
Discussion started by: michalwu
11 Replies

8. Filesystems, Disks and Memory

LVM restore / recovery

Hello, I would really appreciate help on recovering some data. I have a RAID1 array under /dev/md0 composed of devices /dev/sdb and /dev/sdc. I had lvm on the raid with 3 lv, the last of which was a snapshot partition. My / is on /dev/sda. Recently, I reinstalled the system (Debian lenny)... (7 Replies)
Discussion started by: Zburatorul
7 Replies

9. HP-UX

disk adding through lvm

Hi dear(s) Can u explain how to add a disk through lvm with commands. I need to add a 9 gb scsi HS disk to a Hp D class 9000 server. (2 Replies)
Discussion started by: sreekumar.R
2 Replies

10. HP-UX

Size of LVM header in non bootable disk

hi, i have a query regarding the size of the LVM header. Since the LVM header of a bootable disk is always 2912KB. The header size of a non bootable disk is not fixed. In Bootable disk after the LVM header (2912 KB=5824 sectors)the user data starts or we can say LV extents starts. If i extend any... (0 Replies)
Discussion started by: gorayen
0 Replies

Featured Tech Videos