LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Solaris / OpenSolaris (https://www.linuxquestions.org/questions/solaris-opensolaris-20/)
-   -   Cannot write more than 2GB to file in non-global zone - in global zone I can (https://www.linuxquestions.org/questions/solaris-opensolaris-20/cannot-write-more-than-2gb-to-file-in-non-global-zone-in-global-zone-i-can-4175520790/)

newbie_123 10-01-2014 10:24 PM

Cannot write more than 2GB to file in non-global zone - in global zone I can
 
Hi,

I look after an exim installation on a Solaris 10 zone. A short time ago the exim mainlog size on the Solaris 10 zone reached 2GB before log rotation due to more activity. It turns out 2GB is the maximum size at the moment and exim stops.

The workaround has been to increase the log rotation frequency so the logs are smaller. But the goal is to have daily log files again.

I just cannot figure out where the file size limit comes from.

Tests done:
in the (non-global) zone I cannot append to a file that is already 2GB. E.g.
cat anotherfile >> my2GBfile
as root returns immediately (no error) and my2GBfile is unchanged.
This operation is done as root in the root fs, which is UFS, in /var/log/exim in this case.

When doing the same test in the global zone, the cat command will append and create e.g. a 3GB file without problem in the exact same directory.

Some more info:

uname -a
SunOS machine1 5.10 Generic_127128-11 i86pc i386 i86pc

I did not see any file size limit attributes anywhere I looked so far. E.g. the zone config xml files don't seem to have it. I also ran "prctl -i zone myzonename" but none of the values relate to file size.

jlliagre 10-02-2014 02:57 PM

Your kernel patch level looks to be 6 years old.

What says
Code:

df -k .
truss -f cat anotherfile >> my2GBfile

?

newbie_123 10-02-2014 07:24 PM

Hi jlliagre,

Here is the output.

Code:

[12:09 AM] server123:/var/log/exim$ df -k .
Filesystem            kbytes    used  avail capacity  Mounted on
/                    401288689 50495712 346780091    13%    /


and

Code:

[12:09 AM] server123:/var/log/exim$ truss -f cat anotherfile >> my2GBfile
16620:  execve("/usr/bin/cat", 0x08047D5C, 0x08047D68)  argc = 2
16620:  resolvepath("/usr/lib/ld.so.1", "/lib/ld.so.1", 1023) = 12
16620:  mmap(0x00000000, 4096, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANON, -1, 0) = 0xFEFF0000
16620:  resolvepath("/usr/bin/cat", "/usr/bin/cat", 1023) = 12
16620:  sysconfig(_CONFIG_PAGESIZE)                    = 4096
16620:  xstat(2, "/usr/bin/cat", 0x08047B38)            = 0
16620:  open("/var/ld/ld.config", O_RDONLY)            = 3
16620:  fxstat(2, 3, 0x08047A78)                        = 0
16620:  mmap(0x00000000, 120, PROT_READ, MAP_SHARED, 3, 0) = 0xFEFC0000
16620:  close(3)                                        = 0
16620:  xstat(2, "/lib/libc.so.1", 0x08047368)          = 0
16620:  resolvepath("/lib/libc.so.1", "/lib/libc.so.1", 1023) = 14
16620:  open("/lib/libc.so.1", O_RDONLY)                = 3
16620:  mmap(0x00010000, 32768, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_ALIGN, 3, 0) = 0xFEFB0000
16620:  mmap(0x00010000, 1204224, PROT_NONE, MAP_PRIVATE|MAP_NORESERVE|MAP_ANON|MAP_ALIGN, -1, 0) = 0xFEE80000
16620:  mmap(0xFEE80000, 1095677, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_TEXT, 3, 0) = 0xFEE80000
16620:  mmap(0xFEF9C000, 30375, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_INITDATA, 3, 1097728) = 0xFEF9C000
16620:  mmap(0xFEFA4000, 4432, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANON, -1, 0) = 0xFEFA4000
16620:  munmap(0xFEF8C000, 65536)                      = 0
16620:  memcntl(0xFEE80000, 123776, MC_ADVISE, MADV_WILLNEED, 0, 0) = 0
16620:  close(3)                                        = 0
16620:  mmap(0x00010000, 24576, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANON|MAP_ALIGN, -1, 0) = 0xFEF90000
16620:  munmap(0xFEFB0000, 32768)                      = 0
16620:  getcontext(0x080478F0)
16620:  getrlimit(RLIMIT_STACK, 0x080478E8)            = 0
16620:  getpid()                                        = 16620 [16615]
16620:  lwp_private(0, 1, 0xFEF92A00)                  = 0x000001C3
16620:  setustack(0xFEF92A60)
16620:  sysi86(SI86FPSTART, 0xFEFA4800, 0x0000133F, 0x00001F80) = 0x00000001
16620:  brk(0x0806A7A8)                                = 0
16620:  brk(0x0806C7A8)                                = 0
16620:  fstat64(1, 0x08047C00)                          = 0
16620:  open64("anotherfile", O_RDONLY)            = 3
16620:  fstat64(3, 0x08047C90)                          = 0
16620:  llseek(3, 0, SEEK_CUR)                          = 0
16620:  mmap64(0x00000000, 618056, PROT_READ, MAP_SHARED, 3, 0) = 0xFEDE8000
16620:  read(3, "1F", 1)                                = 1
16620:  write(1, "1F8B\b\b80ECD8 P\003 m a".., 618056)  = 618056
16620:  llseek(3, 618056, SEEK_SET)                    = 618056
16620:  munmap(0xFEDE8000, 618056)                      = 0
16620:  llseek(3, 0, SEEK_CUR)                          = 618056
16620:  close(3)                                        = 0
16620:  close(1)                                        = 0
16620:  _exit(0)

Thank you for the pointers. Can you tell if the old kernel is the reason? I did not expect that because the global zone has the same.


All times are GMT -5. The time now is 01:58 PM.