frank | 2 Nov 2009 09:13

more filesystems inside a VE

Hi,
recently we have had problems because a log file has filled all disk 
space inside a VE. To prevent this, it would be good to have a separate 
filesystem for log files. We have read the OpenVZ docs and we have only 
found how to add NFS,FUSER or bind mounts, all of them externals to VE. 
Is there another way to add more filesystems inside a VE ?

Thanks for your help.

Frank

--

-- 
Aquest missatge ha estat analitzat per MailScanner
a la cerca de virus i d'altres continguts perillosos,
i es considera que està net.
For all your IT requirements visit: http://www.transtec.co.uk
Scott Dowdle | 2 Nov 2009 17:09
Favicon

Re: more filesystems inside a VE

Frank,

----- "frank" <frank@...> wrote:
> recently we have had problems because a log file has filled all disk 
> space inside a VE. To prevent this, it would be good to have a
> separate filesystem for log files. We have read the OpenVZ docs and we have
> only found how to add NFS,FUSER or bind mounts, all of them externals to
> VE. Is there another way to add more filesystems inside a VE ?

You can bind mount from the host node into the container if desired.

Another way would be to configure your log rotation app to be aware of space taken up.  Most are traditionally
time-based but can also be told if a log file gets to a certain size, to rotate it.

TYL,
--

-- 
Scott Dowdle
704 Church Street
Belgrade, MT 59714
(406)388-0827 [home]
(406)994-3931 [work]
Robert Heinzmann | 2 Nov 2009 17:38
Picon
Favicon

AW: more filesystems inside a VE

Hello Frank, 

you can create /etc/vz/conf/vps.[mount|umount]. This can then mount some
additional filesystem. The Script has at least "$VEID" available.

The mount script is executed AFTER the machine has been mounted. 
The umount script is executed BEFORE the machine will be umounted. 

See (German)
http://www.atombot.de/blog/2008/12/09/openvz-premount-und-postmount-unte
r-linux/

Regards, 
Robert
Thorsten Schifferdecker | 2 Nov 2009 18:15
Favicon

Re: more filesystems inside a VE

Hi,

frank wrote:
> Hi,
> recently we have had problems because a log file has filled all disk
> space inside a VE. To prevent this, it would be good to have a separate
> filesystem for log files. We have read the OpenVZ docs and we have only
> found how to add NFS,FUSER or bind mounts, all of them externals to VE.
> Is there another way to add more filesystems inside a VE ?
> 
You can use the "--devnodes" option of vzctl, give a ct access to an
hwdwarenode device

#
# here example with a logical_volume on lvm2 or use a "free" partion
#

create lv
# lvcreate -L <SIZE> -n <name_of_lv> <pv_group>

examine the major minor numbers
# ls -la /dev/mapper/≤pv_group>-<name_of_lv>
brw-rw---- 1 root disk 253, 4 Nov  2 17:42
/dev/mapper/≤pv_group>-<name_of_lv>

now let access "devnodes" of your hardwarenode to container
# vzctl set <ctid> --device b:253:4:rw --save

create a device, i use "hwdisk-00" as a example
# vzctl exec <ctid> 'mknod -m 660 /dev/hwdisk-00 b 253 4'
(Continue reading)

Hans Zaunere | 4 Nov 2009 03:47

(no subject)

Hello,

Recently one of our host systems had the following panic and had to be cold
rebooted.

Nov  3 15:05:40 vzhn1 kernel: general protection fault: 0000 [1] SMP
Nov  3 15:05:40 vzhn1 kernel: last sysfs file:
Nov  3 15:05:40 vzhn1 kernel: CPU: 0
Nov  3 15:05:40 vzhn1 kernel: Modules linked in: vzethdev(U) simfs(U)
vzrst(U) ip_nat(U) vzcpt(U) ip_conntrack(U) nfnetlink(U) vzdquota(U)
xt_tcpudp(U) xt_length(U) ipt_ttl(U) x
t_tcpmss(U) ipt_TCPMSS(U) iptable_mangle(U) iptable_filter(U)
xt_multiport(U) xt_limit(U) ipt_tos(U) ipt_REJECT(U) ip_tables(U)
x_tables(U) vznetdev(U) vzmon(U) ipv6(U) xfrm_nal
go(U) crypto_api(U) vzdev(U) dm_mirror(U) dm_multipath(U) scsi_dh(U)
video(U) hwmon(U) backlight(U) sbs(U) i2c_ec(U) button(U) battery(U)
asus_acpi(U) acpi_memhotplug(U) ac(U) l
p(U) snd_hda_intel(U) snd_seq_dummy(U) snd_seq_oss(U) snd_seq_midi_event(U)
snd_seq(U) snd_seq_device(U) snd_pcm_oss(U) snd_mixer_oss(U) snd_pcm(U)
snd_timer(U) snd_page_alloc(U
) snd_hwdep(U) parport_pc(U) snd(U) r8169(U) i2c_i801(U) sg(U) e1000e(U)
i2c_core(U) soundcore(U) mii(U) parport(U) pcspkr(U) serio_raw(U)
dm_raid45(U) dm_message(U) dm_region_h
ash(U) dm_log(U) dm_mod(U) dm_mem_cache(U) ahci(U) libata(U) shpchp(U)
aacraid(U) sd_mod(U) scsi_mod(U) ext3(U) jbd(U) uhci_hcd(U) ohci_hcd(
Nov  3 15:05:40 vzhn1 kernel: ) ehci_hcd(U)
Nov  3 15:05:40 vzhn1 kernel: Pid: 309, comm: kswapd0 Tainted:  P
2.6.18-128.1.1.el5.028stab062.3 #1 028stab062
Nov  3 15:05:40 vzhn1 kernel: RIP: 0060:[<ffffffff800f0fb1>]
[<ffffffff800f0fb1>] d_free+0x10/0x48
(Continue reading)

Thorsten Schifferdecker | 4 Nov 2009 07:56
Favicon

kernel panic // stable OpenVZ kernel 028stab062.3 // Re: (no subject)

Hi Hans,

Hans Zaunere schrieb:
> Hello,
> 
> Recently one of our host systems had the following panic and had to be cold
> rebooted.
> 
> Nov  3 15:05:40 vzhn1 kernel: general protection fault: 0000 [1] SMP
> Nov  3 15:05:40 vzhn1 kernel: last sysfs file:
> Nov  3 15:05:40 vzhn1 kernel: CPU: 0
> Nov  3 15:05:40 vzhn1 kernel: Modules linked in: vzethdev(U) simfs(U)
> vzrst(U) ip_nat(U) vzcpt(U) ip_conntrack(U) nfnetlink(U) vzdquota(U)
> xt_tcpudp(U) xt_length(U) ipt_ttl(U) x
> t_tcpmss(U) ipt_TCPMSS(U) iptable_mangle(U) iptable_filter(U)
> xt_multiport(U) xt_limit(U) ipt_tos(U) ipt_REJECT(U) ip_tables(U)
> x_tables(U) vznetdev(U) vzmon(U) ipv6(U) xfrm_nal
> go(U) crypto_api(U) vzdev(U) dm_mirror(U) dm_multipath(U) scsi_dh(U)
> video(U) hwmon(U) backlight(U) sbs(U) i2c_ec(U) button(U) battery(U)
> asus_acpi(U) acpi_memhotplug(U) ac(U) l
> p(U) snd_hda_intel(U) snd_seq_dummy(U) snd_seq_oss(U) snd_seq_midi_event(U)
> snd_seq(U) snd_seq_device(U) snd_pcm_oss(U) snd_mixer_oss(U) snd_pcm(U)
> snd_timer(U) snd_page_alloc(U
> ) snd_hwdep(U) parport_pc(U) snd(U) r8169(U) i2c_i801(U) sg(U) e1000e(U)
> i2c_core(U) soundcore(U) mii(U) parport(U) pcspkr(U) serio_raw(U)
> dm_raid45(U) dm_message(U) dm_region_h
> ash(U) dm_log(U) dm_mod(U) dm_mem_cache(U) ahci(U) libata(U) shpchp(U)
> aacraid(U) sd_mod(U) scsi_mod(U) ext3(U) jbd(U) uhci_hcd(U) ohci_hcd(
> Nov  3 15:05:40 vzhn1 kernel: ) ehci_hcd(U)
> Nov  3 15:05:40 vzhn1 kernel: Pid: 309, comm: kswapd0 Tainted:  P
(Continue reading)

Philipp Wehrheim | 4 Nov 2009 08:54
Picon

[PATCH] vzctl - vps_save_config

Hey,

the attached patch fixes an issue where vzctl overwrites the symlink
to CTs config.

In my setup the CT config is stored in /vz/ve/≤CTID>/<CTID>.conf
and linked back to /etc/vz/conf/≤CTID>.conf .If I make changes to the
CTs config via "vzctl set ..." the link is overwritten by vzctl on writeback.

Please consider applying.

cheers
flip

--- a/src/lib/config.c  2009-11-04 08:39:18.000000000 +0100
+++ b/src/lib/config.c  2009-11-04 08:39:18.000000000 +0100
 <at>  <at>  -2351,6 +2351,8  <at>  <at> 
        vps_param *tmp_old_p = NULL;
        list_head_t conf, new_conf;
        int ret, n;
+       char buf[4096];
+       ssize_t llen;

        list_head_init(&conf);
        list_head_init(&new_conf);
 <at>  <at>  -2359,6 +2361,13  <at>  <at> 
                vps_parse_config(veid, path, tmp_old_p, action);
                old_p = tmp_old_p;
        }
+
(Continue reading)

Robert Heinzmann | 4 Nov 2009 09:43
Picon
Favicon

AW: [PATCH] vzctl - vps_save_config

Thank you, 

same issue here :) Just wanted to file a BUG Report, bot now the patch is there - great. 

Will this be added to UPSTREAM ?

Robert

> -----Ursprüngliche Nachricht-----
> Von: users-bounces@... 
> [mailto:users-bounces@...] Im Auftrag von Philipp Wehrheim
> Gesendet: Mittwoch, 4. November 2009 08:55
> An: users@...
> Betreff: [Users] [PATCH] vzctl - vps_save_config
> 
> Hey,
> 
> the attached patch fixes an issue where vzctl overwrites the 
> symlink to CTs config.
> 
> In my setup the CT config is stored in 
> /vz/ve/≤CTID>/<CTID>.conf and linked back to 
> /etc/vz/conf/≤CTID>.conf .If I make changes to the CTs config 
> via "vzctl set ..." the link is overwritten by vzctl on writeback.
> 
> Please consider applying.
> 
> cheers
> flip
(Continue reading)

Robert Heinzmann | 4 Nov 2009 10:01
Picon
Favicon

AW: [PATCH] vzctl - vps_save_config

Aehm, 

and what about multiple symlinks ? 

a --> b ---> c 

>From my reading the code just handles 1 Symlink. 

Once fixing this, a while (readlink) ... with maxdepth or test for existance would be great.

Robert

> -----Ursprüngliche Nachricht-----
> Von: users-bounces@... 
> [mailto:users-bounces@...] Im Auftrag von Philipp Wehrheim
> Gesendet: Mittwoch, 4. November 2009 08:55
> An: users@...
> Betreff: [Users] [PATCH] vzctl - vps_save_config
> 
> Hey,
> 
> the attached patch fixes an issue where vzctl overwrites the 
> symlink to CTs config.
> 
> In my setup the CT config is stored in 
> /vz/ve/≤CTID>/<CTID>.conf and linked back to 
> /etc/vz/conf/≤CTID>.conf .If I make changes to the CTs config 
> via "vzctl set ..." the link is overwritten by vzctl on writeback.
> 
> Please consider applying.
(Continue reading)

Philipp Wehrheim | 4 Nov 2009 12:01
Picon

Re: AW: [PATCH] vzctl - vps_save_config

Robert Heinzmann schrieb:
> Aehm, 
> Once fixing this, a while (readlink) ... with maxdepth or test for existance would be great.

ACK - will add a while-loop and open a bug at bugzilla.openvz.org

thanks for your hands up!

--
flip

Gmane