OpenVZ Forum


Home » Mailing lists » Users » creating partition for VE and networking
creating partition for VE and networking [message #12205] Fri, 20 April 2007 09:14 Go to next message
Markus Hardiyanto is currently offline  Markus Hardiyanto
Messages: 27
Registered: April 2007
Junior Member
Hello,

I'm new in openvz. yesterday I'm succeeded installing openvz on centos 4.4 and can make openvz run. my question is how to make partition inside the VE? when i execute this commands:

# vzctl enter 101
# entered into VE 101
# df -h
Filesystem Size Used Avail Use% Mounted on
simfs 1.0G 95M 930M 10% /

you see there is only one partition /, how can i make /boot, /, /home, /tmp partition separately inside the VE?

next question is how to make the VE accessible from the internet? while i already supply a public IP for the VE:
# vzctl set 101 --ipadd xxx.xxx.xxx.xxx --save

but when i try to ping it from my laptop, it can't be reached. i do can ping the physical node. what should i configure?
i saw in the wiki about creating NAT, but that is for private IP while in my case i want to use public IP for my VEs. please advise.

thanks


Best Regards,
Markus



Send instant messages to your online friends http://uk.messenger.yahoo.com
Re: creating partition for VE and networking [message #12207 is a reply to message #12205] Fri, 20 April 2007 10:44 Go to previous messageGo to next message
Vasily Tarasov is currently offline  Vasily Tarasov
Messages: 1345
Registered: January 2006
Senior Member
Hello,

Markus Hardiyanto wrote:
> Hello,
>
> I'm new in openvz. yesterday I'm succeeded installing openvz on centos 4.4 and can make openvz run. my question is how to make partition inside the VE? when i execute this commands:
>
> # vzctl enter 101
> # entered into VE 101
> # df -h
> Filesystem Size Used Avail Use% Mounted on
> simfs 1.0G 95M 930M 10% /
>
> you see there is only one partition /, how can i make /boot, /, /home, /tmp partition separately inside the VE?

I don't quite understand what do you want? =) In order to mount some
filesystem on any directory in VE just use usual mount. However the list
of filesystems, that you can use in VE is limited (look at
/proc/filesystems in VE, sysfs and nfs can be added via `vzctl set
<veid> --features` command).

Every real fs is deployed on some device. Usually VE doesn't use such
devices (like /dev/sda1, ...). But you can give VE an access to the
device via `vzctl set <veid> --devnodes`. Note, that this is the same
device, that is on your host node: some partion on your HN for example,
so deleting files from it will remove files from the host.

>
> next question is how to make the VE accessible from the internet? while i already supply a public IP for the VE:
> # vzctl set 101 --ipadd xxx.xxx.xxx.xxx --save
>
> but when i try to ping it from my laptop, it can't be reached. i do can ping the physical node. what should i configure?
> i saw in the wiki about creating NAT, but that is for private IP while in my case i want to use public IP for my VEs. please advise.

check, that /proc/sys/net/ipv4/ip_forwarding contents "1"

>
> thanks
>
>
> Best Regards,
> Markus
>
>
>
> Send instant messages to your online friends http://uk.messenger.yahoo.com
Re: creating partition for VE and networking [message #12209 is a reply to message #12205] Fri, 20 April 2007 11:05 Go to previous messageGo to next message
Markus Hardiyanto is currently offline  Markus Hardiyanto
Messages: 27
Registered: April 2007
Junior Member
i want to make separate partitions inside the VE, is that possible?

so instead of getting this:

> Filesystem Size Used Avail Use% Mounted on
> simfs 1.0G 95M 930M 10% /

i would like to see something like:

Filesystem Size Used Avail Use% Mounted on
simfs 1.0G 95M 930M 10% /
<something> 2.0G 20M 1.9G 1% /home
<something> 75M 8M 67M 1% /boot

virtual partition i say.. this is not the hardware node partition, but in the VE

> check, that /proc/sys/net/ipv4/ip_forwarding contents "1"

i check it and can't find it. but i found: /proc/sys/net/ipv4/ip_forward and it have contents "1"
but still the VE can't be pinged from other computer.

Best Regards,
Markus

----- Original Message ----
From: Vasily Tarasov <vtaras@openvz.org>
To: informatics2k1@yahoo.com
Cc: users@openvz.org
Sent: Friday, April 20, 2007 5:44:35 PM
Subject: Re: [Users] creating partition for VE and networking

Hello,

Markus Hardiyanto wrote:
> Hello,
>
> I'm new in openvz. yesterday I'm succeeded installing openvz on centos 4.4 and can make openvz run. my question is how to make partition inside the VE? when i execute this commands:
>
> # vzctl enter 101
> # entered into VE 101
> # df -h
> Filesystem Size Used Avail Use% Mounted on
> simfs 1.0G 95M 930M 10% /
>
> you see there is only one partition /, how can i make /boot, /, /home, /tmp partition separately inside the VE?

I don't quite understand what do you want? =) In order to mount some
filesystem on any directory in VE just use usual mount. However the list
of filesystems, that you can use in VE is limited (look at
/proc/filesystems in VE, sysfs and nfs can be added via `vzctl set
<veid> --features` command).

Every real fs is deployed on some device. Usually VE doesn't use such
devices (like /dev/sda1, ...). But you can give VE an access to the
device via `vzctl set <veid> --devnodes`. Note, that this is the same
device, that is on your host node: some partion on your HN for example,
so deleting files from it will remove files from the host.

>
> next question is how to make the VE accessible from the internet? while i already supply a public IP for the VE:
> # vzctl set 101 --ipadd xxx.xxx.xxx.xxx --save
>
> but when i try to ping it from my laptop, it can't be reached. i do can ping the physical node. what should i configure?
> i saw in the wiki about creating NAT, but that is for private IP while in my case i want to use public IP for my VEs. please advise.

check, that /proc/sys/net/ipv4/ip_forwarding contents "1"

>
> thanks
>
>
> Best Regards,
> Markus
>
>
>
> Send instant messages to your online friends http://uk.messenger.yahoo.com
Send instant messages to your online friends http://uk.messenger.yahoo.com
Re: creating partition for VE and networking [message #12224 is a reply to message #12205] Sat, 21 April 2007 06:20 Go to previous messageGo to next message
Markus Hardiyanto is currently offline  Markus Hardiyanto
Messages: 27
Registered: April 2007
Junior Member
the ability to make a vps can access devices on the HN seems can answer my requirement.
but to make it more complex, i want to use LVM for the partitioning.

is there any example on how to give a VE access to LVM partition?

Best Regards,
Markus

----- Original Message ----
From: Vasily Tarasov <vtaras@openvz.org>
To: informatics2k1@yahoo.com
Cc: users@openvz.org
Sent: Friday, April 20, 2007 5:44:35 PM
Subject: Re: [Users] creating partition for VE and networking

Every real fs is deployed on some device. Usually VE doesn't use such
devices (like /dev/sda1, ...). But you can give VE an access to the
device via `vzctl set <veid> --devnodes`. Note, that this is the same
device, that is on your host node: some partion on your HN for example,
so deleting files from it will remove files from the host.






Send instant messages to your online friends http://uk.messenger.yahoo.com
Re: creating partition for VE and networking [message #12225 is a reply to message #12224] Sat, 21 April 2007 08:16 Go to previous messageGo to next message
Daniel Pittman is currently offline  Daniel Pittman
Messages: 26
Registered: January 2007
Junior Member
Markus Hardiyanto <informatics2k1@yahoo.com> writes:

> the ability to make a vps can access devices on the HN seems can
> answer my requirement.

I really don't think your requirement is a good idea. Can you explain
why you want to do things that way?

> but to make it more complex, i want to use LVM for the partitioning.

That isn't any more complex: Linux treats LVM block devices in the same
fashion it treats any other block device, permissions included.

> is there any example on how to give a VE access to LVM partition?

vzctl set <veid> --devnodes 'mapper/mydevice:rw'

Again, though, I don't think you want to go down this path.

Why do you want to do things this way? There might be a better solution
to your problem.

Regards,
Daniel
--
Digital Infrastructure Solutions -- making IT simple, stable and secure
Phone: 0401 155 707 email: contact@digital-infrastructure.com.au
http://digital-infrastructure.com.au/
Re: creating partition for VE and networking [message #12229 is a reply to message #12205] Sat, 21 April 2007 10:50 Go to previous messageGo to next message
Markus Hardiyanto is currently offline  Markus Hardiyanto
Messages: 27
Registered: April 2007
Junior Member
because i plan to use cpanel control panel and need to secure /tmp (mount it with noexec)

Best Regards,
Markus


----- Original Message ----
From: Daniel Pittman <daniel@rimspace.net>
To: users@openvz.org
Sent: Saturday, April 21, 2007 3:16:17 PM
Subject: Re: [Users] creating partition for VE and networking

> is there any example on how to give a VE access to LVM partition?

vzctl set <veid> --devnodes 'mapper/mydevice:rw'

Again, though, I don't think you want to go down this path.

Why do you want to do things this way? There might be a better solution
to your problem.

Regards,
Daniel




Send instant messages to your online friends http://uk.messenger.yahoo.com
Re: creating partition for VE and networking [message #12231 is a reply to message #12229] Sat, 21 April 2007 17:17 Go to previous messageGo to next message
Rudy Setiawan is currently offline  Rudy Setiawan
Messages: 4
Registered: April 2007
Junior Member
Hi Markus,

There is a thread about this:
http://forum.openvz.org/index.php?t=msg&goto=1339

I hope this helps :)

Regards,
Rudy


Markus Hardiyanto wrote:
> because i plan to use cpanel control panel and need to secure /tmp (mount it with noexec)
>
> Best Regards,
> Markus
>
>
> ----- Original Message ----
> From: Daniel Pittman <daniel@rimspace.net>
> To: users@openvz.org
> Sent: Saturday, April 21, 2007 3:16:17 PM
> Subject: Re: [Users] creating partition for VE and networking
>
>
>> is there any example on how to give a VE access to LVM partition?
>>
>
> vzctl set <veid> --devnodes 'mapper/mydevice:rw'
>
> Again, though, I don't think you want to go down this path.
>
> Why do you want to do things this way? There might be a better solution
> to your problem.
>
> Regards,
> Daniel
>
>
>
>
> Send instant messages to your online friends http://uk.messenger.yahoo.com
Re: creating partition for VE and networking [message #12232 is a reply to message #12229] Sun, 22 April 2007 00:27 Go to previous messageGo to next message
Daniel Pittman is currently offline  Daniel Pittman
Messages: 26
Registered: January 2007
Junior Member
Markus Hardiyanto <informatics2k1@yahoo.com> writes:

> because i plan to use cpanel control panel and need to secure /tmp
> (mount it with noexec)

You might want to consider using a boring mount script for the VE that
puts a small, limited 'tmpfs' into /tmp on that system. That might
allow you to bypass the direct disk requirement -- and has the bonus
that whatever junk hosted sites dump into /tmp doesn't hang about
forever.

Also, I trust you are already aware that noexec doesn't actually prevent
storing and running any of the scripted exploits in /tmp:

/bin/sh /tmp/i-is-a-leet-haxer.sh

Regards,
Daniel
--
Digital Infrastructure Solutions -- making IT simple, stable and secure
Phone: 0401 155 707 email: contact@digital-infrastructure.com.au
http://digital-infrastructure.com.au/
Re: creating partition for VE and networking [message #12233 is a reply to message #12205] Sun, 22 April 2007 05:00 Go to previous messageGo to next message
Markus Hardiyanto is currently offline  Markus Hardiyanto
Messages: 27
Registered: April 2007
Junior Member
yes, i already know that. but still small addition on security is better than nothing :)

Best Regards,
Markus

----- Original Message ----
From: Daniel Pittman <daniel@rimspace.net>
To: users@openvz.org
Sent: Sunday, April 22, 2007 7:27:39 AM
Subject: Re: [Users] creating partition for VE and networking

Also, I trust you are already aware that noexec doesn't actually prevent
storing and running any of the scripted exploits in /tmp:

/bin/sh /tmp/i-is-a-leet-haxer.sh

Regards,
Daniel




Send instant messages to your online friends http://uk.messenger.yahoo.com
Re: creating partition for VE and networking [message #12234 is a reply to message #12205] Sun, 22 April 2007 05:01 Go to previous message
Markus Hardiyanto is currently offline  Markus Hardiyanto
Messages: 27
Registered: April 2007
Junior Member
Hi Rudy,

I already bookmark that page, thanks for pointing out.

Best Regards,
Markus

----- Original Message ----
From: Rudy Setiawan <rudy@rudal.com>
To: users@openvz.org
Sent: Sunday, April 22, 2007 12:17:38 AM
Subject: Re: [Users] creating partition for VE and networking

Hi Markus,

There is a thread about this:
http://forum.openvz.org/index.php?t=msg&goto=1339

I hope this helps :)





Send instant messages to your online friends http://uk.messenger.yahoo.com
Previous Topic: Using NAT for VE with private IPs
Next Topic: adding secondary IP
Goto Forum:
  


Current Time: Sun Aug 11 18:34:07 GMT 2024

Total time taken to generate the page: 0.02812 seconds