LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   How to hot add disk to a filesystem (https://www.linuxquestions.org/questions/linux-server-73/how-to-hot-add-disk-to-a-filesystem-943917/)

garydavis 05-08-2012 12:29 PM

How to hot add disk to a filesystem
 
Hey all, thanks for taking a moment to read and perhaps provide me some insight.

I have virtualized Linux machines that have base configurations on them, including disk size. I realize that over time one, or more, of those Linux VMs may experience a disk capacity issue. As such, I would like to identify a way to hot-add data disk to the VM without incurring an outage to the disk. Windows 2008 R2 can do this, so I have to believe Linux can also, after all, Microsoft surely steals the best ideas they have from the Linux community. (Note, I'm talking about extending data disk, not the root partition.)

I've Googled this to no end and every solution I've tried always causes an outage to the disk. I am going to attribute this to my inability to Google. ;-)

Thanks in advance.
Gary

frankbell 05-08-2012 08:32 PM

I think this would depend a lot on what virtualization engine you are using.

Here's an article on how to do it in VirtualBox:

http://www.dedoimedo.com/computers/v...-add-disk.html

zXi 05-10-2012 01:44 AM

A LVM configured Linux VM would be very easy to hot add a disk without downtime by vgextend /dev/sd<NewlyAddedDisk>

syg00 05-10-2012 03:45 AM

Short answer, probably not.
If you can extend the partition (disk) the filesystem is on, yes you can. If, as @xZi indicates, the filesystem is on LVM2, then it can be trivially extended - even onto additional "disks". This is not something you can convert to - it must be setup in advance - but only once.
If you happen to be using btrfs (unlikely) you can proceed as you are used to in Win2008 - just add the disk to the filesystem. Btrfs is still considered less than stable by some people.

em31amit 05-10-2012 04:22 AM

are you here asking a adding a new disk into linux without reboot it ? or adding a already visible disk in fdisk -l to lvm or somewhere else ?

but your scenario i unclear here. so explain it what exactly are you trying to doing?


All times are GMT -5. The time now is 08:34 AM.