Sponsored Content
Full Discussion: Pvcreate vs disk partioning
Operating Systems Linux Red Hat Pvcreate vs disk partioning Post 302892478 by saurabh84g on Wednesday 12th of March 2014 10:04:13 PM
Old 03-12-2014
Thanks for the link...When i started looking for answer i came across this link and the below one as well

https://access.redhat.com/site/docum...vol_admin.html

Code:
4.2.1.1. Setting the Partition Type
If you are using a whole disk device for your physical volume, the  disk must have no partition table. 
For DOS disk partitions, the  partition id should be set to 0x8e using the fdisk or cfdisk  command or 
an equivalent. For whole disk devices only the partition  table must be erased, which will effectively 
destroy all data on that  disk. You can remove an existing partition table by zeroing the first  sector 
with the following command: 				
# dd if=/dev/zero of=PhysicalVolume bs=512 count=1

4.2.1.2. Initializing Physical Volumes

Use the pvcreate command to initialize a block device to be used as a physical volume. Initialization
 is analogous to formatting a file system.

Still not much information to draw a conclusion....

Last edited by fpmurphy; 03-21-2014 at 06:00 AM..
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Partioning Drives

I have this 36 GB harddisk which houses the root partition along with a 28 GB partion for the rest of the data. The thing I wish to do is that partition this 28 GB into two partions. I have never partitioned the root disk. I just wanted to know whether is it possible to do when the disk is online... (1 Reply)
Discussion started by: DPAI
1 Replies

2. UNIX for Dummies Questions & Answers

Help with installing/partioning/Sol8

I have search the archives with no luck. Looking for help with my specific system. I have an SUN ULTRA 2 with dual 4.3GB HD's. I installed Solaris 8 with default settings (auto configure)and 2nd drive was partioned /export/home/extra as the only mount(4.3 G's). I then reinstalled the OS... (7 Replies)
Discussion started by: finster
7 Replies

3. Solaris

Solaris Partioning scheme

Hi I have a sun server. Recently I have attached a new 80 GB disk. I would like to install the Solaris OS on this disk. Now I would be installing some database on this disk. I have decided to allocate a slice of 20GB or DB2 and one more slice of 20GB for Sybase. The / partition would... (4 Replies)
Discussion started by: RajaRC
4 Replies

4. Solaris

Partioning HDD

Hi theres I am quite new to solaris, I have 40GB HDD in which I have created only 10 GB partition & installed solaris 10. Now I want to add another 10GB from remaining 30GB space. I tried this with format utility but I get stuck after I create fdsik partition. After creating this I cant... (1 Reply)
Discussion started by: i_mroy
1 Replies

5. Linux

Partioning Disks In Linux

Hi, group Just wondering suppose you have linux already installed & now you get a new disk so that your computer has two disks. How do you go about partitioning/slicing the new disk in linux ? which utility do you use ? Regards (4 Replies)
Discussion started by: Msororaji
4 Replies

6. Red Hat

Partioning of Disks on Red Hat Linux

Hello I have two disks on Red Hat Linux box. Disk one has been installed Linux Operating system. The disk two has been partitioned as one disk with 100 GB on the partition /dev/hda1. Right now, I want to modify it as 5 partitions. I like to partition disk 2 into 5 partitions. One... (2 Replies)
Discussion started by: lukas_pise
2 Replies

7. Red Hat

pvcreate not working

I have few new EMC disks assigned from Stroage. I can pvcreate small disks (8.7GB), but bigger disks (71GB) are giving problem. -f also doesn't help. root@tlcqr201:/> pvcreate /dev/emcpowerge /dev/emcpowerge: read failed after 0 of 4096 at 0: Input/output error /dev/emcpowerge: read failed... (2 Replies)
Discussion started by: solaris_1977
2 Replies

8. UNIX for Advanced & Expert Users

Pvcreate can't open /dev/xvda2 exclusively mounted filesystem

I downloaded the oracle linux 6.7 from RHEL, I wanted to extend the storage for "/" from default 16GB to say 200GB. Here's the steps I tried is : 1. Init 1 2. Using “fdisk /dev/xvda” , delete the swap /dev/xvda3 as well as /dev/xvda2 3. Re-create /dev/xvda2 with linux LVM using new end blocks ... (1 Reply)
Discussion started by: alnhk
1 Replies

9. Red Hat

Pvcreate can't open /dev/xvda2 exclusively mounted filesystem

I downloaded the RH Linux 6.7 from RHEL, I wanted to extend the storage for "/" from default 16GB to say 200GB. Here’s the steps I tried is : 1. Init 1 2. Using “fdisk /dev/xvda” , delete the swap /dev/xvda3 as well as /dev/xvda2 3. Re-create /dev/xvda2 with linux LVM using new end... (7 Replies)
Discussion started by: alnhk
7 Replies
PVCREATE(8)                                                   System Manager's Manual                                                  PVCREATE(8)

NAME
pvcreate - initialize a disk or partition for use by LVM SYNOPSIS
pvcreate [-d|--debug] [-h|--help] [-t|--test] [-v|--verbose] [--version] [-f[f]|--force [--force]] [-y|--yes] [--labelsector] [-M|--meta- datatype type] [--[pv]metadatacopies #copies] [--metadatasize size] [--metadataignore {y|n}] [--dataalignment alignment] [--dataalign- mentoffset alignment_offset] [--restorefile file] [--norestorefile] [--setphysicalvolumesize size] [-u|--uuid uuid] [-Z|--zero {y|n}] Phys- icalVolume [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). As such, use of --restorefile is compulsory unless the --norestorefile is used. -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.) --dataalignment alignment Align the start of the data to a multiple of this number. You should also specify an appropriate PhysicalExtentSize when creating the Volume Group with vgcreate. To see the location of the first Physical Extent of an existing Physical Volume use pvs -o +pe_start . It will be a multiple of the requested alignment. In addition it may be shifted by alignment_offset from data_alignment_offset_detection (if enabled in lvm.conf) or --dataalignmentoffset. --dataalignmentoffset alignment_offset Shift the start of the data area by this additional alignment_offset. --[pv]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! --metadataignore y|n Ignore or un-ignore metadata areas on this physical volume. The default is "n". This setting can be changed with pvchange. If metadata areas on a physical volume are ignored, LVM will not store metadata in the metadata areas present on this Physical Volume. Metadata areas cannot be created or extended after Logical Volumes have been allocated on the device. If you do not want to store metadata on this device, it is still wise always to allocate a metadata area in case you need it in the future and to use this option to instruct LVM2 to ignore it. --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). --norestorefile In conjunction with --uuid, this allows a uuid to be specified without also requiring that a backup of the metadata be provided. --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. EXAMPLES
Initialize partition #4 on the third SCSI disk and the entire fifth SCSI disk for later use by LVM: pvcreate /dev/sdc4 /dev/sde If the 2nd SCSI disk is a 4KB sector drive that compensates for windows partitioning (sector 7 is the lowest aligned logical block, the 4KB sectors start at LBA -1, and consequently sector 63 is aligned on a 4KB boundary) manually account for this when initializing for use by LVM: pvcreate --dataalignmentoffset 7s /dev/sdb SEE ALSO
lvm.conf(5), 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.95(2) (2012-03-06) PVCREATE(8)
All times are GMT -4. The time now is 08:45 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy