Linux: Add a New HDD to a VM Without Rebooting

Add a New HDD to a VM Without Rebooting

This article describes how to add a new HDD to a VM without rebooting – handy if you need consistency of service and don’t have a redundant solution.

 

Solution:

Add a hard disk as usual through the VM settings. Check dmesg to see if the kernel has detected it automatically, if not:

echo "- - -" > /sys/class/scsi_host/host0/scan
fdisk -l

You should see something like:

Disk identifier: 0x00004fff

Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048    30076927    15037440   83  Linux
/dev/sda2        30078974    31455231      688129    5  Extended
/dev/sda5        30078976    31455231      688128   82  Linux swap / Solaris

Disk /dev/sdc: 429.5 GB, 429496729600 bytes
255 heads, 63 sectors/track, 52216 cylinders, total 838860800 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/sdc doesn't contain a valid partition table

/dev/sdc is the disk you just added, all you need to do is “fdisk /dev/sdc” to partition it and “mkfs.ext3 /dev/sdc1” to format the partition.

Job done.

13 Replies to “Linux: Add a New HDD to a VM Without Rebooting”

  1. [35]Betili Official Login | সেরা অনলাইন ক্যাসিনো ও দ্রুত বিকাশ পেমেন্ট,betili এর অফিশিয়াল লগইন করে সেরা স্লট গেমের নিয়ম জানুন এবং বিকাশ পেমেন্টের মাধ্যমে দ্রুত লেনদেন করুন। আজই অ্যাপটি ডাউনলোড করে খেলা শুরু করুন। visit: betili

  2. [3749]MPO1212 | Login Link Alternatif Resmi & Slot Gacor Hari Ini,mpo1212 menyediakan akses login resmi dan link alternatif terbaru. Nikmati judi casino online terpercaya dengan kemudahan deposit pulsa tanpa potongan. Daftar sekarang! visit: mpo1212

  3. [6779]bdkk Official Login | সেরা অনলাইন স্লট গেম এবং অ্যাপ ডাউনলোড,bdkk প্ল্যাটফর্মে সহজেই লগইন করে সেরা স্লট গেমগুলো খেলুন। বিকাশ দিয়ে দ্রুত ডিপোজিট করুন এবং অ্যাপ ডাউনলোড করে আজই খেলা শুরু করুন। visit: bdkk

Leave a Reply

Your email address will not be published. Required fields are marked *