Best partition strategy with 1xSSD and 1x2TB disks for 5-10 VBox appliances
Linux - Virtualization and CloudThis forum is for the discussion of all topics relating to Linux Virtualization and Linux Cloud platforms. Xen, KVM, OpenVZ, VirtualBox, VMware, Linux-VServer and all other Linux Virtualization platforms are welcome. OpenStack, CloudStack, ownCloud, Cloud Foundry, Eucalyptus, Nimbus, OpenNebula and all other Linux Cloud platforms are welcome. Note that questions relating solely to non-Linux OS's should be asked in the General forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
1 x OCZ Technology 256GB Vector Series SATA 6.0 GB/s 2.5"
1 x Seagate Barracuda 2TB 7200 RPM 64MB Cache SATA 6.0Gb/s 3.5"
The 4 most important concerns I have are:
My intention is not to build an enterprise virtualized server, I just want to have some VMs for information security testing, meaning that I want an environment in which I could simulate attacks and pentesting techniques against Windows/Linux boxes, etc.
The motherboard supports UEFI so whatever systems I want to install should be able to support it;
I will install 5-10 Virtual Machines on Linux (Oracle's VirtualBox), and for that I plan to use the /usr partition
I'd be using Windows solely for gaming purposes, that's why I left more space for it, as we know Linux doesn't need that much to be superb.
That's the initial scheme I came up with:
SSD (256 GB)
OS1: Win7 - ntfs (200 GB)
OS2: Ubuntu Server 12.04 LTS (or another TBD) - ext4 (56 GB)
ntfs (1.0 TB) - Windows repository (Movies/Music/etc)
ext4 (1.0 TB) - Linux variable partitions and VM's
Partitions:
/home (500 GB)
/usr (400 GB)
/var (50 GB)
/tmp (20 GB)
/swap (30 GB)
I don't really know if that's the optimal strategy for partitioning the system in terms of disk space allocation for each of the partitions, so I'd love to get some insights from the expert community.
Most importantly, I'm not sure if the fact of installing the VMs on a separate disk (/usr partition) will slow down the overall access to the VMs, for instance, when I open-up 8 VMs simultaneously.
Home on a partition may be more useful for crash and reload.
I'd think way too much swap. Each vm can have a virtual hard drive that you load swap on to each vm. The amount you have isn't easily available to vm's unless you need to hibernate it all.
Locking into partitions on test systems just caused issues later on changes.
Just my humble opinion and I'd sure others have opposing and equally logical ideas and reasons.
Maybe if you had lots of drives and nfs and iscsi then you could consume many mount points.
Thanks for the insight about the /swap partition. I will follow your advice.
Regarding the /home partition, my intention is to store documents (Pdf's, videos, etc), that will probably be accessed/replaced on a frequent basis. So, as the SSD's have limited number of I/O writes, I decided to create /home as a separate partition on the mechanical disk.
Hi,
I have a somewhat similar setup, except that I have a (much) smaller SSD and I have 2 spinning disks.
I put the OS (Slackware) on the SSD. On the smaller harddrive (500G) I put a swap partition (64G since I have 32G of RAM and I use the 2* algorithm!) and make the remainder a single partition which forms a volume group (vg0).
Within this volume group I have created logical volumes for /tmp, /var, /etc, /home, /opt and /VMs. This makes the SSD drive virtually read-only. By using LV's I can start with minimal size and expand as needed.
I have the second harddrive set up as a single volume group (vg1). I use the /VMs directory (mounted LV) to hold the virtual machine definitions. This directory looks like:-
/VMs ---> images
vm1
vm2
...
images holds any iso images or other stuff that the virtual machines might need (this is a convenience to me).
Each virtual machine definition is in it's own directory (vm1 etc). Each virtual machine has one or more logical volumes in vg1.
Virtualbox will allow you to use a disk partition (logical volume) directly as a virtual harddrive. This involves using the command-line tools (see virtualbox docs).
Or you can mount the LV and create virtual harddrives as files under this mount point. Using the second route, you can define the LV just big enough to hold your initial harddrives, and then expand it if (when) you want to add more virtual harddrives.
This is the theory!!! ....
The practice ....
Tell virtualbox that you want your machine defs to be in /VMs (or wherever)
Create virtual machine vm1 (using the virtualbox wizard) but do NOT create a virtual harddrive.
This will create the directory vm1 under /VMs which will contain the virtual machine definition.
Using route 2 above, define your LV, format it with your favourite file system, mount it on (say) /mnt and copy all the files in /VMs/vm1 onto it.
Unmount /mnt.
Erase all the files in /VMs/vm1, and mount your LV onto /VMs/vm1.
Now go back into virtualbox and edit the settings to add your virtual harddrives.
Thus you get all your virtual machine definition onto the one LV. NOTE if you define vm1 (and mount the LV onto it) BEFORE the initial creation of vm1, the wizard will barff because it needs to create the vm1
directory itself ... silly wizard but what can you do!
Repeat as needed.
This is how I do it. Others may (will almost certainly) have better ways and ....
.... as always, remember YMMV :-)
Hey there good people.
I too would like some help on this. I have a simialr setup to sl33p, 1 x 240Gb SSD, 2 x 2Tb HDD, 8Gb RAM.
Okay, this is on a brand new system with Windows 7 64Bit installed on the SSD. The system works with UEFI not BIOS. The 2Tb disks are MBR.
I want to have a huge /home as I have lots of photos, media files etc. which I currently store on a 3Tb external HDD (~1.4Tb worth) . I want to bring them onto the internal HDD and go through all my collections and clean them up. Only using the external HDD for backups. So I would allocate my /home on 1 of the 2Tb drives. I will allocate the other to some storage for Windows and holding other Linux installations (with relevant partitions on the SSD)
I read that you shouldn't have too much write activity to an SSD or it wears out faster. But I suppose I could just replace that in a few years time. I have also read somewhere that the SSD (even with lots of writes) should last about 5 years.
he says NOT to allocate swap on the SSD, but to put it on a HDD. So what if I do this:
SSD Windows 100Gb
Linux / 20.6Gb
HDD 1 /swap 3.8Gb (I presumed that I had to make it as large as my RAM, but reading a few threads/articles - quickly - it seems that I can get away with a lot less).
Windows data 50Gb
The rest I will divide into various Linux installs (1 being a Linux testing environment for my main Linux install).
pan64. sorry I'm pretty much a Linux newbie - even though I have dabbled with it since the early 90's - I only switched full-time in 2009 but still don't understand a lot about it, just use it. In my current setup I just installed the system in a single partition. Now with my new system and an SSD (and writes to it wearing it out) it's whole different ballgame! So I don't know anything about tmpfs (although I was just reading some threads about it and it's uses - still not really any wiser!)
So if I install / onto SSD, /swap, /home etc. onto the HDD will that be okay - even though the journals are in / (lots of writes???)?
Specially Pete, that was the answer I was looking for. I will use LVM due to its flexibility, but honestly, I will go through the documentation of VirtualBox to learn how to make it use the LV directly via command line, 'cause I think this might be slightly easier than the proposed "route 2". )
I guess there was some good advise in this already and I don't want to stress it too much, but let me add one more thing:
Use LVM for your 2TB HDDs.
You can add both to the same volume group and then adjust LVM partition sizes as you need, e.g. 3,5TB for /home and all the rest for your Windows stuff. Choose initial partition sizes you feel comfortable with and expand them if they fill up. In case you need more that 4TG in the VG just add yet another HDD and you are done.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.