On Sat, Oct 19, 2013 at 11:01:30PM +0200, Reindl Harald wrote:
>
> > root:disk, and seems to be working fine..
>
> if your ATS is in the group disk or by stupidity running as root, yes
[root@webedge3 ~]# lvcreate --name trafficlv --size 2G rootvg
Logical volume "trafficlv" created
[root@webedge3 ~]# ls -l /dev/rootvg/trafficlv
lrwxrwxrwx. 1 root root 7 2013-10-19 23:18 /dev/rootvg/trafficlv ->
../dm-5
[root@webedge3 ~]# ls -l /dev/dm-5
brw-rw----. 1 root disk 253, 5 2013-10-19 23:18 /dev/dm-5
[root@webedge3 ~]# grep -v ^# /etc/trafficserver/storage.config
/dev/rootvg/trafficlv
[root@webedge3 ~]# service trafficserver start
Starting Apache Traffic Server: [ OK ]
/var/log/trafficserver/traffic.out logs:
[Oct 19 23:20:35.090] Server {0x2b1bbb30c700} WARNING: disk header
different for disk /dev/rootvg/trafficlv: clearing the disk
[Oct 19 23:20:35.092] Server {0x2b1bbb20b700} NOTE: Clearing Disk:
/dev/rootvg/trafficlv
[Oct 19 23:20:35.093] Server {0x2b1bbb20b700} NOTE: clearing cache
directory '/dev/rootvg/trafficlv 16384:253951'
[Oct 19 23:20:35.153] Server {0x2b1bbaa9a940} NOTE: logging
initialized[15], logging_mode = 3
[Oct 19 23:20:35.493] Server {0x2b1bbaa9a940} NOTE: traffic server
running
[Oct 19 23:20:35.535] Server {0x2b1bbaa9a940} NOTE: cache enabled
Only the traffic_cop is running as root:
[root@webedge3 ~]# ps -ef|grep traffic_
root 5286 1 0 23:20 ? 00:00:00 /usr/bin/traffic_cop
ats 5288 5286 0 23:20 ? 00:00:00 /usr/bin/traffic_manager
ats 5326 5288 1 23:20 ? 00:00:01 /usr/bin/traffic_server
-M --httpport 80:fd=7,80:fd=8:ipv6,443:fd=10:ssl,443:fd=9:ipv6:ssl
And user "ats" is only a member of group "ats", not "disk".
And "lsof" confirms that pid 5326 has /dev/dm-5 open:
[root@webedge3 ~]# lsof|grep /dev/dm-5
[ET_NET 5326 ats 22u BLK 253,5 0t0
117418352 /dev/dm-5
So it must be opening the storage before switching to user "ats".
> otherwise:
> http://trafficserver.apache.org/docs/trunk/admin/configuration-files/storage.config.en.html
It can look like this documentation is wrong..
-jf