From 341ad2fed2b30d95f06ce141255fa02d26098632 Mon Sep 17 00:00:00 2001 From: Randy Bush Date: Sat, 4 Jul 2020 14:37:56 -0700 Subject: [PATCH] from wiki --- pages/AddDiskDrive.md | 37 ++++++++++++++++++++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) diff --git a/pages/AddDiskDrive.md b/pages/AddDiskDrive.md index 0f5d4cc..4c4a89e 100644 --- a/pages/AddDiskDrive.md +++ b/pages/AddDiskDrive.md @@ -1 +1,36 @@ -pages/AddDiskDrive.md \ No newline at end of file +# Creating an Nth disk drive for a VM + +``` +fallocate -l 500G /store/images/ran.psg.com.sdb +ls -lh /store/images/ran.psg.com.sdb +chown libvirt-qemu:mlocate /store/images/ran.psg.com.sdb +l -lh /store/images/ran.psg.com.sdb +chmod 600 /store/images/ran.psg.com.sdb +``` + +Create an xml file describing the disk + +``` +cat > ran.sdb.xml + + + + + +``` + +Attach the new store to the VM + +``` +virsh attach-device ran.psg.com ran.sdb.xml +``` + +You will have to reboot the VM to see the device. + +Then you can + +``` +mkfs.ext4 /dev/vda +``` + +Edit /etc/fstab and mount the new volumey \ No newline at end of file