TurnKey Linux Virtual Appliance Library

increase turnkey linux fileserver disk space from 20GB to 120GB

zeke's picture

Is there a way to take the default 20GB shared partition in VSphere 4.1 and make it say 120GB.

I know how to add the extra 100GB to the VM, but how do you then add it to the file server??

any advise on how to do it would be apprectiated.

Jeremy's picture

Easiest (and probably best) way...

Add the new disk to LVM. See this blog post here.

zeke's picture

thanx

works..

Here is the quicky way for others..

Add to excisting Drive
#Cfdisk
create partition
make it 8e
reboot
#pvcreate /dev/sda3
#vgextend turbnkey /dev/sda3
#lvextend -L+100G /dev/turnkey/root
#resize2fs /dev/turnkey/root
Reboot


vg tools no on zimbra vm?

trying to extend default / fs on zimbra appliance, but the lvg tools aren't installed?

Jeremy's picture

Unfortunately Zimbra is currently only legacy appliance

And as such doesn't have the relevant tools installed. You'll have to do it the other way and manually mount the new HDD to the current filesystem where all the data is. A little more mucking around, but still doable.

Woohooo!!!

 

I also needed to extend my TKL virtual appliance disk.

This worked like a charm.

 

Thanks

lvreduce

Is there any safe way to reduce the size?

I now copied the same wordpress alliance and am using nginx for load balancing. 

I tried using lvreduce on a dummy install but everything goes south. Cant even open webmin.

Maybe a defrag before reducing the size? To put the data at the front of the drive...

Jeremy's picture

You need to resize the filesystem before resizing the LV

Basically the opposite of enlarging the LV (when you make it bigger you need to increase the LV before you increase the filesystem size - when reducing you go the other way...). But be careful, because if you reduce the filesystem to smaller than the size of all the files you will have dramas. The commands won't error, you'll just lose random data (somewhat similar to what you've experienced already).

A quick google turned this up which at a glance seems reasonable (although I didn't test it, from memory it appears correct). Note that TKL uses LVM 2 (ie follow the caveat).

Thanks for sharing.

Worked like a champ.

Post new comment

The content of this field is kept private and will not be shown publicly. If you have a Gravatar account, used to display your avatar.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <p> <span> <div> <h1> <h2> <h3> <h4> <h5> <h6> <img> <map> <area> <hr> <br> <br /> <ul> <ol> <li> <dl> <dt> <dd> <table> <tr> <td> <em> <b> <u> <i> <strong> <font> <del> <ins> <sub> <sup> <quote> <blockquote> <pre> <address> <code> <cite> <strike> <caption>

More information about formatting options

Leave this field empty. It's part of a security mechanism.
(Dear spammers: moderators are notified of all new posts. Spam is deleted immediately)