Editing Pvcreate

Jump to navigation Jump to search

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.

Latest revision Your text
Line 1: Line 1:
<code>pvcreate</code><ref>http://man7.org/linux/man-pages/man8/pvcreate.8.html</ref> initialize a [[disk]] for use by LVM. Also partition, meta device, or loopback file are supported.
+
<code>pvcreate</code><ref>http://man7.org/linux/man-pages/man8/pvcreate.8.html</ref> initialize a disk for use by LVM. Also partition, meta device, or loopback file are supported.
  
{{add disk}}
 
 
 
[[lsblk]]
 
<pre>
 
pvcreate /dev/sdt
 
  Physical volume "/dev/sdt" successfully created.
 
 
Check:
 
  blkid | grep sdt
 
</pre>
 
  
 +
pvcreate
 
<pre>pvcreate /dev/sdb
 
<pre>pvcreate /dev/sdb
 
WARNING: ext4 signature detected on /dev/sdb at offset 1080. Wipe it? [y/n]:
 
WARNING: ext4 signature detected on /dev/sdb at offset 1080. Wipe it? [y/n]:
</pre>
 
 
<pre>
 
pvcreate /dev/sdc
 
  Device /dev/sdc excluded by a filter.
 
 
Use gdisk to check if GPT partition information is on device and delete it. https://serverfault.com/a/951589
 
</pre>
 
 
 
<pre>
 
pvcreate /dev/mapper/3600a09803831417a5a244f5665797a47
 
  Can't open /dev/mapper/3600a09803831417a5a244f5665797a47 exclusively.  Mounted filesystem?
 
</pre>
 
 
 
 
<pre>
 
pvcreate /dev/mapper/3600a09803831417a5a244f5665797a47
 
  Physical volume "/dev/mapper/3600a09803831417a5a244f5665797a47" successfully created.
 
 
</pre>
 
</pre>
  
  
 +
== Activities ==
 +
# Initialize a new disk to be used by Linux LVM with <code>pvcreate</code> command.
  
pvcreate /dev/sda234
 
  Can't open /dev/sda234 exclusively.  Mounted filesystem?
 
  Can't open /dev/sda234 exclusively.  Mounted filesystem?
 
  
== Successful ==
 
pvcreate /dev/[[dm]]-24
 
  Physical volume "/dev/dm-24" successfully created.
 
 
pvcreate /dev/sdb
 
  Physical volume "/dev/sdb" successfully created.
 
 
pvcreate --uuid "FmGRh3-zhok-iVI8-7qTD-S5BI-MAEN-NYM5Sk" --restorefile /etc/lvm/archive/VG_00050.vg /dev/sdh1
 
  Physical volume "/dev/sdh1" successfully created
 
  --uuid requires use of --restorefile is compulsory unless the --norestorefile is used
 
https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/6/html/logical_volume_manager_administration/mdatarecover<br>
 
See also: [[UUID]] and <code>[[vgcfgrestore]]</code>
 
 
== Related commands ==
 
* <code>[[blkid]]</code>
 
* <code>[[pvremove]]</code>
 
* <code>[[vgcreate]]</code>
 
* <code>[[pvresize]]</code>
 
 
== Activities ==
 
Basic:
 
# Initialize a new disk to be used by Linux [[LVM]] with <code>pvcreate</code> command.
 
# Initialize a new [[multipath]] disk and make user [[lvm.conf]] if properly configured.<ref>https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/4/html/DM_Multipath/multipath_logical_volumes.html</ref>
 
 
Related:
 
# [[Multipath: remove multipath device unpresented to host]]
 
  
 
== See also ==
 
== See also ==
* {{pvcreate}}
+
* [[linux Administration/Devices and Filesystems/LVM/vgcreate|vgcreate]]
* {{lvm commands}}
 
* {{Linux block devices}}
 
* {{Fibre Channel}}
 
 
 
[[Category:Linux]]
 
[[Category:LVM]]
 

Please note that all contributions to wikieduonline may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see Wikieduonline:Copyrights for details). Do not submit copyrighted work without permission!

Cancel Editing help (opens in new window)

Advertising: