Moving VM Server to different drive?

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read this

Moving VM Server to different drive?

Postby lger on Wed Jun 27, 2007 10:31 am

OK.... I believe that Linux is finally ready for prime time - been putzing with it for years off and on and I've learned to genuinely dislike Vista so I deleted my Vista partition today. I have two drives in my system - 250 GB each - with Vista dedicated to one and the other is dedicated to your OS. My problem is that I somehow filled the Mint drive - believe I have too much tied up in VMWare Server. With Vista gone I now have an empty drive sitting there waiting to be filled. What would be the best way to utilize the other drive? Should I move my home folder there? Can I? How? Or should I move VMWare there? Can I? How? Or should I do something entirely different? I've been using your OS for a few weeks now and have it pretty well set up so I'd hate to do a re-install. Thanks in advance for the suggestions.

BTW... I don't care about room for other distros or Windows. I have VMWare Server to play with those....

Leon
lger
Level 1
Level 1
 
Posts: 8
Joined: Wed Jun 27, 2007 9:51 am

Linux Mint is funded by ads and donations.
 

Postby gcc on Wed Jun 27, 2007 2:13 pm

Well, you're asking a lot of questions, but lets see if I can help.

If you want to shrink the amount allocated to VMWare, your best bet will be to either delete or shrink some of the virtual machine files you have. There are a number of handy ways to do this, but since you have Server, you'll probably want to use their built in tools.

If you just want to be able to use the newly-freed disk space, probably the best way to do that would simply be gparted. It is a very easy way to manipulate your available drive space, and doesn't require much in the way of techiness.

If you're asking what you should use your new space for, I like to allocate a separate partition to /home, /var, and /tmp, and just set an inotify watch on /root, /bin, /sbin, and /usr- seems to satisfy some of the requirements for security w/o a lot of the hassle of more exotic systems.

To move files, use the "mv" command. To copy them, use cp -r, or cp -dpr for a more thorough job.

Hit the submit button by accident there, I guess, but about all I had left to say was that you could also simply format the other drive, copy all the files from wherever you have your VM's stashed, and then set the new partition's mount point as wherever they were supposed to go.

Also, I don't know if you are obligated to use VMware, or if you need proc migration, but you might want to try VirtualBox or, for the more techie, kvm. Both are very solid programs, and are open source.
Last edited by gcc on Wed Jun 27, 2007 2:24 pm, edited 1 time in total.
gcc
Level 1
Level 1
 
Posts: 40
Joined: Thu Jun 14, 2007 9:45 pm

Postby scorp123 on Wed Jun 27, 2007 2:59 pm

gcc wrote:use cp -r, or cp -dpr for a more thorough job..
cp -a -v -u ... takes care of everything (permissions and all that ...)

Other than that I'd second your suggestions.
User avatar
scorp123
Level 8
Level 8
 
Posts: 2287
Joined: Sat Dec 02, 2006 4:19 pm
Location: Switzerland

Postby lger on Wed Jun 27, 2007 4:57 pm

Thank you for the vary complete answer. I am constantly amazed at how helpful some of you can be at times. I DO tend to ramble on... sorry so I'll limit myself to one thing.

For now I have created an 40GB fat32 primary partition on the empty drive- just in case - and the rest is an extended logical partition formated as ext3. For now I will try to just move my home directory to this new partition. How do I move it and let the system know that I've moved it? Hope I'm not confusing you. One of us is enough...

Thanx!
lger
Level 1
Level 1
 
Posts: 8
Joined: Wed Jun 27, 2007 9:51 am

Postby scorp123 on Wed Jun 27, 2007 5:31 pm

lger wrote:For now I will try to just move my home directory to this new partition. How do I move it and let the system know that I've moved it?
http://www.linuxmint.com/wiki/index.php/Move_home_to_its_own_partition
User avatar
scorp123
Level 8
Level 8
 
Posts: 2287
Joined: Sat Dec 02, 2006 4:19 pm
Location: Switzerland

Postby gcc on Wed Jun 27, 2007 5:46 pm

Conceptually, all you have to do is copy your home directory over to the new space, then tell the system that that area.

To do this you will just need to get the name of the device that your new hard drive is mounted on, copy your home folder there, and then rename the drive in your /etc/fstab to /home.

For example:

say I have just installed, partitioned, etc, a new hard disk- my second one on this system- and want to copy my home folder over onto it. All I have to do is type:

Code: Select all
 mount


at the console. It will provide me with a long list of all the mounted partitions on my system. Since this is my second hard disk on this machine, it will most likely be /dev/sdb. The first partition on that device will be /dev/sdb1, the second /dev/sdb2, and so on.

sidenote:
This naming system may seem obtuse, but it actually does make sense.
/dev is the folder for devices; sd means "scsi device" since scsi emulation is used for most drives now; and the b represents the fact that it is my second drive. my first one would be /dev/sda.

So, now that I have my list of mounted partitions, I look for one that makes sense under the above naming system, and find the mount point (the directory name) associated with it. It will probably be /media/something-or-other. Move your home folder over to that location using the previously mentioned methods. A smart person would make sure they had a backup before they did this.

Next, you'll want to change the place that it mounts at. At your terminal, type :

Code: Select all
sudo nano /etc/fstab


and add something along these lines:

Code: Select all
/dev/sdb1     /home     <fstype>     defaults     1    2


to the bottom of it. Save it, and the next time the system reads fstab, your new hard disk will be automatically mounted to /home. For more information about fstab and its structure, type
Code: Select all
man fstab
at your terminal.

cp -a -v -u ... takes care of everything (permissions and all that ...)


yeah, I shouldve included the -v option, and -a is just an alias for -dpR.
gcc
Level 1
Level 1
 
Posts: 40
Joined: Thu Jun 14, 2007 9:45 pm

Postby lger on Wed Jun 27, 2007 7:43 pm

Thanks guys! Worked like a charm. Now off to my next Mint Linux adventure....

BTW: scorp. I know that you have a thing about people searching for answers before posting. I usually don't post because I agree with you. Most questions have already been answered. Thank you for the link. I just wasn't sure what to do.

gcc: You are a gentleman and a scholar... Thank you very much for your help. I appreciate the very well thought out and detailed answers. Someday I may be able to help others because with responses like this I learn.
lger
Level 1
Level 1
 
Posts: 8
Joined: Wed Jun 27, 2007 9:51 am

Postby scorp123 on Thu Jun 28, 2007 4:30 am

lger wrote: I just wasn't sure what to do.
We shall forgive you :wink:

Serious now: Did it work? Everything OK? If not please keep posting and someone here will try to help 8)
User avatar
scorp123
Level 8
Level 8
 
Posts: 2287
Joined: Sat Dec 02, 2006 4:19 pm
Location: Switzerland

Postby lger on Thu Jun 28, 2007 7:17 am

:D Worked like a charm. Freed up half of my full drive and that was exactly what I wanted to do. Wasn't sure what would be the right choice - moving /home or vmware - but with your help ended up making the right choice. Thanks again my friend!

Leon
lger
Level 1
Level 1
 
Posts: 8
Joined: Wed Jun 27, 2007 9:51 am

Linux Mint is funded by ads and donations.
 

Return to Newbie Questions

Who is online

Users browsing this forum: ShadowArt and 23 guests