Sponsored Content
Operating Systems Linux Red Hat Recover vg and lg after running fdisk Post 302925157 by ppchu99 on Friday 14th of November 2014 09:47:37 AM
Old 11-14-2014
yes, you can run fdisk and modify the partition while it is on a LVM, it is a bit scary..

vgscan and lvscan came up with nothing , after running fdisk

I am not Linux lvm expert, I know it could recover because the metadata is initialize from fdisk, there is more than 50% chance you could recover,
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

(c)fdisk and RedHat 7.2

I recently installed RedHat 7.2, and cannot find any tools to partition the disks other than during the install. I did a find from / for fdisk and cfdisk, neither turned up. I looked in the RPM directories on the CD's, again no good. What rpm contains a partition management tool? (1 Reply)
Discussion started by: 98_1LE
1 Replies

2. UNIX for Dummies Questions & Answers

Using fdisk in scripts

Hi ! I need to create large amount of portions for database in Linux. Untill now I've used fdisk for manual creation of chunks and changing thei? file system type. Now I want to write script for create them automatically. I think I'm not the first who deal with that problem! Thank you for... (1 Reply)
Discussion started by: Frank_a
1 Replies

3. Shell Programming and Scripting

Fdisk with grep problem

Hello! rescuecd:/var# fdisk -l | grep stupid Disk /dev/sda doesn't contain a valid partition table Disk /dev/sdb doesn't contain a valid partition table rescuecd:/var# It shows always this statement. Why? :( Raw fdisk -l shows rescuecd:/var# fdisk -l Disk /dev/sda: 750.1 GB,... (4 Replies)
Discussion started by: pug123
4 Replies

4. Solaris

using fdisk

how do i know my disk partion using fdisk (4 Replies)
Discussion started by: seyiisq
4 Replies

5. Red Hat

FDISK problems

OS= Fedora 10 I have a secondary 250GB disk of which I created a 50G partition on to try and set-up an LFS system. I finished with the LFS system and now I want to destroy the partition and reclaim all of the 250GB. So i simply ran fdisk /dev/sdb and deleted the 2 Linux partitions ( one 83 and... (2 Replies)
Discussion started by: woodson2
2 Replies

6. Shell Programming and Scripting

HEREDOC with fdisk

Hi folks What I'm trying is to build a partitioning script. I can pass a HEREDOC to fdisk just fine. Like this: fdisk /dev/sda << EOF p q EOF but I don't know how to put that HEREDOC into a varible to pass it to fdisk. This is what I have tried so far (no luck) #!/bin/bash ... (3 Replies)
Discussion started by: latenite
3 Replies

7. UNIX for Dummies Questions & Answers

Fdisk v/s parted

Just started understanding linux filesystem and partition utilities. I was going though some video tutorials by CBT nuggets and the author was cursing fdisk as fuzzy tool and recommending to use parted instead. In our job environment i have seen almost every one using fdisk utility for... (1 Reply)
Discussion started by: pinga123
1 Replies

8. Solaris

fdisk

Hi All, fdisk -l in linux equals in fdisk option in Solaris Thanks.......... (2 Replies)
Discussion started by: pvkarthykeyan
2 Replies

9. UNIX for Dummies Questions & Answers

Analyse this fdisk -l

Hi, Someone please analyse the following o/p of fdisk -l and tell me what it means for /dev/sda, /dev/sdb, /dev/sdc .... Disk /dev/sda: 53.6 GB, 53687091200 bytes 255 heads, 63 sectors/track, 6527 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start ... (5 Replies)
Discussion started by: stunn3r
5 Replies

10. BSD

OpenBSD fdisk - Linux fdisk compatibility ?

Hello, MBR partition table made by linux fdisk looks certainly not correct when printed by openbsd fdisk: Partition table created on linux (centos 6.3): # fdisk -l /dev/sdc Disk /dev/sdc: 10.7 GB, 10737418240 bytes 255 heads, 63 sectors/track, 1305 cylinders Units = cylinders of 16065 *... (2 Replies)
Discussion started by: vilius
2 Replies
PVCREATE(8)						      System Manager's Manual						       PVCREATE(8)

NAME
pvcreate - initialize a disk or partition for use by LVM SYNOPSIS
pvcreate [-d|--debug] [-f[f]|--force [--force]] [-y|--yes] [-h|--help] [-t|--test] [-v|--verbose] [--labelsector] [-M|--metadatatypetype] [--metadatacopies#copies] [--metadatasizesize] [--restorefilefile] [--setphysicalvolumesizesize] [-u|--uuiduuid] [--version] [-Z|--zeroy|n] PhysicalVolume [PhysicalVolume...] DESCRIPTION
pvcreate initializes PhysicalVolume for later use by the Logical Volume Manager (LVM). Each PhysicalVolume can be a disk partition, whole disk, meta device, or loopback file. For DOS disk partitions, the partition id should be set to 0x8e using fdisk(8), cfdisk(8), or a equivalent. For whole disk devices only the partition table must be erased, which will effectively destroy all data on that disk. This can be done by zeroing the first sector with: dd if=/dev/zero of=PhysicalVolume bs=512 count=1 Continue with vgcreate(8) to create a new volume group on PhysicalVolume, or vgextend(8) to add PhysicalVolume to an existing volume group. OPTIONS
See lvm(8) for common options. -f, --force Force the creation without any confirmation. You can not recreate (reinitialize) a physical volume belonging to an existing volume group. In an emergency you can override this behaviour with -ff. -u, --uuid uuid Specify the uuid for the device. Without this option, pvcreate generates a random uuid. All of your physical volumes must have unique uuids. You need to use this option before restoring a backup of LVM metadata onto a replacement device - see vgcfgre- store(8). -y, --yes Answer yes to all questions. -Z, --zero y|n Whether or not the first 4 sectors (2048 bytes) of the device should be wiped. If this option is not given, the default is to wipe these sectors unless either or both of the --restorefile or --uuid options were specified. NEW METADATA OPTIONS
LVM2 introduces a new format for storing metadata on disk. This new format is more efficient and resilient than the format the original version of LVM used and offers the advanced user greater flexibility and control. The new format may be selected on the command line with -M2 or by setting format = "lvm2" in the global section of lvm.conf. Each physical volume in the same volume group must use the same format, but different volume groups on a machine may use different formats simultane- ously: the tools can handle both formats. Additional formats can be added as shared libraries. Additional tools for manipulating the locations and sizes of metadata areas will be written in due course. Use the verbose/debug options on the tools to see where the metadata areas are placed. --metadatasize size The approximate amount of space to be set aside for each metadata area. (The size you specify may get rounded.) --metadatacopies copies The number of metadata areas to set aside on each PV. Currently this can be 0, 1 or 2. If set to 2, two copies of the volume group metadata are held on the PV, one at the front of the PV and one at the end. If set to 1 (the default), one copy is kept at the front of the PV (starting in the 5th sector). If set to 0, no copies are kept on this PV - you might wish to use this with VGs con- taining large numbers of PVs. But if you do this and then later use vgsplit you must ensure that each VG is still going to have a suitable number of copies of the metadata after the split! --restorefile file In conjunction with --uuid, this extracts the location and size of the data on the PV from the file (produced by vgcfgbackup) and ensures that the metadata that the program produces is consistent with the contents of the file i.e. the physical extents will be in the same place and not get overwritten by new metadata. This provides a mechanism to upgrade the metadata format or to add/remove metadata areas. Use with care. See also vgconvert(8). --labelsector sector By default the PV is labelled with an LVM2 identifier in its second sector (sector 1). This lets you use a different sector near the start of the disk (between 0 and 3 inclusive - see LABEL_SCAN_SECTORS in the source). Use with care. --setphysicalvolumesize size Overrides the automatically-detected size of the PV. Use with care. Example Initialize partition #4 on the third SCSI disk and the entire fifth SCSI disk for later use by LVM: pvcreate /dev/sdc4 /dev/sde SEE ALSO
lvm(8), vgcreate(8), vgextend(8), lvcreate(8), cfdisk(8), fdisk(8), losetup(8), mdadm(8), vgcfgrestore(8), vgconvert(8) Sistina Software UK LVM TOOLS 2.02.44-cvs (02-17-09) PVCREATE(8)
All times are GMT -4. The time now is 07:10 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy