OpenVZ Forum


Home » General » Support » 2 Harddisks
2 Harddisks [message #34732] Thu, 29 January 2009 11:40 Go to next message
dragon001 is currently offline  dragon001
Messages: 16
Registered: February 2007
Junior Member
Hi,
Here is my System Setup

Pentium III 900 MHZ
512 MB Ram
HDD1: 160GB
HDD2: 10GB
HDD3: 80GB

Partitions:
HDD1: 150GB /srv ext3 10GB Swap
HDD2: 10GB / ext3
HDD3: 80 GB /mount xfs

I've got all vServers Running in the 150Gig Partition.
I want to add the 80Gig Drive too an VPS 250 which shall be an fileserver containing samba etc.
The Problem is, how do i add it?

Thanks for your help.

Chris
Re: 2 Harddisks [message #34733 is a reply to message #34732] Thu, 29 January 2009 12:14 Go to previous messageGo to next message
khorenko is currently offline  khorenko
Messages: 533
Registered: January 2006
Location: Moscow, Russia
Senior Member
Hi Chris,

please, correct me if i understood your idea wrong: you want to add an additional drive and create a Container that will reside on this drive, right?

If yes, then just mount additional drive to some directory on the Hardware Node, for example /mnt/driveX, then create a Container using additional options to vzctl: "--private" and "--root".
Check "man vzctl" for details.

Hope this helps.

--
Konstantin


If your problem is solved - please, report it!
It's even more important than reporting the problem itself...
Re: 2 Harddisks [message #34734 is a reply to message #34733] Thu, 29 January 2009 12:20 Go to previous messageGo to next message
dragon001 is currently offline  dragon001
Messages: 16
Registered: February 2007
Junior Member
Ok,
maybe I stated my Problem not good enough.

I don't want to create an VPS on an harddisk,
i wan't to add an Harddisk Partition to an existing Virtual Enviroment.

Example:

VPS 250: Fileserver

/boot
...
/home
/home/iso ==> Partition 2 HDD 3
/home/audio ==> Partition 3 HDD 3
.....


This is what I would need.
The Harddisk was part of an older Server.
I thought of just putting an VE on the HDD, but theres not enough place left and i don't want to delete anything on the harddisk.

Wink
chris

P.S.: I hope this was clearly enough.
Sorry if I sound a little ruf, but the openvz is killing my last nerv.
(By the way, hope my english isn't to bad, I am German Wink )
Re: 2 Harddisks [message #34735 is a reply to message #34734] Thu, 29 January 2009 12:49 Go to previous messageGo to next message
khorenko is currently offline  khorenko
Messages: 533
Registered: January 2006
Location: Moscow, Russia
Senior Member
Well,

the simplest way is to mount that disk on Hardware node to a directory (e.g. /data/tmp) and then bindmount /mnt to the Container.
You can automate this by per-container "mount" script:

# cat /etc/vz/conf/101.mount
#!/bin/bash

. /etc/vz/vz.conf

mount -n -o bind /data/tmp $VE_ROOT/data/tmp


You can also read about --devices / --devnodes vzctl options, they allow you to get access to /dev/XXX device from inside a Container, and then just mount the device inside a Container as usual. But in this case please, first play with ext3 partitions, for xfs partition you might face some additional issues.

--
Konstantin

> (By the way, hope my english isn't to bad, I am German Wink )
i'm also not native so i bet your english is better than mine. Smile


If your problem is solved - please, report it!
It's even more important than reporting the problem itself...
Re: 2 Harddisks [message #34736 is a reply to message #34735] Thu, 29 January 2009 15:41 Go to previous messageGo to next message
dragon001 is currently offline  dragon001
Messages: 16
Registered: February 2007
Junior Member
I already tried to play arround with the

--devices / --devnodes

options, but the problem I encoutered was, that due to a lack, that the modul directory of the kernel wasn't available in side each VPS, he couldn't handle the XFS filesystem.

To Copy the Content from one disk to another is quite a little bit nasty.
Its almost 80 Gigs and takes a while (IDE)

Well gona try the other solution sone

Wink
Re: 2 Harddisks [message #34952 is a reply to message #34736] Fri, 13 February 2009 12:21 Go to previous message
pmc2000 is currently offline  pmc2000
Messages: 1
Registered: September 2008
Junior Member
I've just added a new disk and wanted to make it available to a container to use as additional storage. This worked for me on ext3.

vzctl set 1000 --devnodes sdb1:rw -save


Previous Topic: Vlans on HN, how to disable routing between them
Next Topic: OpenVZ, vzrpm, vzyum?
Goto Forum:
  


Current Time: Thu Jul 11 10:28:51 GMT 2024

Total time taken to generate the page: 0.02738 seconds