Difference between revisions of "Add a new disk using LVM"

From wikieduonline
Jump to navigation Jump to search
Tags: Mobile web edit, Mobile edit
m (Welcome moved page Add a new disk to Add a new disk using LVM)
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
  
* 1) <code>[[rescan-scsi-bus.sh]] -a</code>
+
:1) <code>[[rescan-scsi-bus.sh]] -a</code>
* 2) <code>[[pvcreate]]</code>: <code>[[pvcreate]] [[/dev/]]sdXXXX</code>
+
: 2) <code>[[pvcreate]]</code>: <code>[[pvcreate]] [[/dev/]]sdXXXX</code>
* 3) <code>[[vgcreate]]</code>: <code>[[vgcreate]] VG_NAME_1 [[/dev/]]sdXXXX</code>
+
: 3) <code>[[vgcreate]]</code>: <code>[[vgcreate]] VG_NAME_1 [[/dev/]]sdXXXX</code>
* 4) <code>[[lvcreate]]</code>: <code>[[lvcreate]] -l 100%FREE -n LV_NAME_1 VG_NAME_1</code>
+
: 4) <code>[[lvcreate]]</code>: <code>[[lvcreate]] -l 100%FREE -n LV_NAME_1 VG_NAME_1</code>
* 5) <code>[[mkfs.ext4]]</code> <code>[[mkfs.ext4]] /dev/VG_NAME_1/LV_NAME_1</code>
+
: 5) <code>[[mkfs.ext4]]</code> <code>[[mkfs.ext4]] /dev/VG_NAME_1/LV_NAME_1</code>
* 6) <code>[[mkdir]] /path/to/your/new/fs</code>
+
: 6) <code>[[mkdir]] /path/to/your/new/fs</code>
* 7) Edit <code>[[/etc/fstab]]</code>
+
: 7) Edit <code>[[/etc/fstab]]</code>
* 8) <code>[[mount -a]]</code>
+
: 8) <code>[[mount -a]]</code>
 
 
  
 
== Related terms ==
 
== Related terms ==
* <code>echo 1 > [[/sys/block/]]sda/device/rescan</code>
+
* <code>echo 1 > [[/sys/block/]]sda/device/[[rescan]]</code>
 
+
* <code>[[pvresize]]</code>
 +
* [[Add a swap disk]]
  
 
== See also ==
 
== See also ==

Latest revision as of 15:34, 24 August 2023

1) rescan-scsi-bus.sh -a
2) pvcreate: pvcreate /dev/sdXXXX
3) vgcreate: vgcreate VG_NAME_1 /dev/sdXXXX
4) lvcreate: lvcreate -l 100%FREE -n LV_NAME_1 VG_NAME_1
5) mkfs.ext4 mkfs.ext4 /dev/VG_NAME_1/LV_NAME_1
6) mkdir /path/to/your/new/fs
7) Edit /etc/fstab
8) mount -a

Related terms[edit]

See also[edit]

Advertising: