Created
September 6, 2024 03:12
-
-
Save csghone/04ab35b00545a2859b9780105d204364 to your computer and use it in GitHub Desktop.
New LVM
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fdisk -l # To get diskname - '/dev/nvme1n1' in example below and mount at /local/mnt2/ | |
# DISK_NAME=/dev/nvme1n1 | |
# VG_NAME=vg10 | |
# LV_NAME=lv_local_mnt2 | |
# MOUNT_TARGET=/local/mnt2 | |
pvcreate /dev/nvme1n1 # You might have to wipe GPT signatures if this was partitioned by Windows | |
vgcreate vg10 /dev/nvme1n1 | |
lvcreate -n lv_local_mnt2 -l +100%FREE vg10 | |
mkfs.ext4 /dev/vg10/lv_local_mnt2 | |
mkdir /local/mnt2 | |
echo '/dev/vg10/lv_local_mnt2 /local/mnt2 ext4 defaults 1 2' >> /etc/fstab | |
mount -a | |
mkdir /local/mnt2/workspace/ | |
chmod og+rwx /local/mnt2/workspace/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment