'프로그램 사용'에 해당되는 글 2258건

  1. 2019.02.15 sparse file with cp
  2. 2019.02.14 qcow2 sparse file
  3. 2019.02.14 mrtf centos
  4. 2019.02.14 squid cache hit rate 올리기
  5. 2019.02.14 smb 와 selinux 설정
  6. 2019.02.13 squid 비디오 차단
  7. 2019.02.13 squid 윈도우 업데이트 캐싱
  8. 2019.02.13 squid cache 정책
  9. 2019.02.13 squid log format
  10. 2019.02.12 ldap with gitlab

tar가 되면 cp도 되지 않으려나?

[링크 : https://wiki.archlinux.org/index.php/sparse_file#Copying_with_%60cp']

[링크 : https://unix.stackexchange.com/questions/390109/are-there-any-disadvantages-of-cp-sparse-always]


       --sparse=WHEN

              control creation of sparse files. See below


        By default, sparse SOURCE files are detected by a crude heuristic and the corresponding DEST file is made sparse as well.  That is the behavior selected by --sparse=auto.  Specify --sparse=always to create a sparse DEST file whenever the SOURCE file contains a long enough sequence of zero bytes.  Use --sparse=never to inhibit creation of sparse files.


--sparse=auto 기본값

--sparse=always SOURCE에 0x00으로 쓰여진 충분히 긴 데이터를 포함하더라도 DEST 를 항상 sparse 파일로 생성

--sparse=never sparse 파일 생성을 금지


[링크 : http://man7.org/linux/man-pages/man1/cp.1.html]




+

DBMS에서도 이런류의 파일을 만든다고.. 

       -S, --sparse

              Handle sparse files efficiently.  Some files in the file system may have segments which were actually never written (quite often these are database files created by such systems as DBM).  When given this option, tar attempts to determine if the file is sparse prior to archiving it, and if so, to reduce the resulting archive size by not dumping empty parts of the file. 

[링크 : http://man7.org/linux/man-pages/man1/tar.1.html]

'프로그램 사용 > kvm(virt-manager)' 카테고리의 다른 글

virsh create / define  (0) 2019.02.15
kvm 설치  (4) 2019.02.15
qcow2 sparse file  (0) 2019.02.14
qcow2 파일크기의 오류?  (0) 2019.02.12
kvm 서비스 종료하기  (0) 2019.02.12
Posted by 구차니

압축 다시 해봐야겠다...


+

오오... 망할 -_- 진작에 찾아볼걸

$ tar -cvfS test_spar.tar 123123.qcow2

$ tar -S -cvf test_spar.tar 123123.qcow2 


$ ll

-rw-------. 1 root root   9665380352 Aug  8  2018 123123.qcow2

-rw-r--r--. 1 root root      1484800 Feb 14 18:10 test_spar.tar

-rw-r--r--. 1 root root   9665382400 Feb 14 18:09 test.tar



 To have tar attempt to recognize the holes in a file, use `--sparse' (`-S'). 

[링크 : https://www.gnu.org/software/tar/manual/html_node/sparse.html]


Advantages

The advantage of sparse files is that storage is only allocated when actually needed: disk space is saved, and large files can be created even if there is insufficient free space on the file system.


Disadvantages

Disadvantages are that sparse files may become fragmented; file system free space reports may be misleading; filling up file systems containing sparse files can have unexpected effects; and copying a sparse file with a program that does not explicitly support them may copy the entire, uncompressed size of the file, including the sparse, mostly zero sections which are not on disk -- losing the benefits of the sparse property in the file. 

[링크 : https://wiki.archlinux.org/index.php/sparse_file]


ls -s tells you the allocated size of the file, always a multiple of the allocation unit. ls -l tells the actual size. An easy way to test: 

[링크 : https://askubuntu.com/questions/269480/why-does-ls-l-output-a-different-size-from-ls-s]

[링크 : https://www.lisenet.com/2014/so-what-is-the-size-of-that-file/]


$ man ls

       --block-size=SIZE

              scale sizes by SIZE before printing them; e.g., '--block-size=M'

              prints sizes in units of 1,048,576 bytes; see SIZE format below 



2019/02/12 - [프로그램 사용/kvm(virt-manager)] - qcow2 파일크기의 오류?


'프로그램 사용 > kvm(virt-manager)' 카테고리의 다른 글

kvm 설치  (4) 2019.02.15
sparse file with cp  (0) 2019.02.15
qcow2 파일크기의 오류?  (0) 2019.02.12
kvm 서비스 종료하기  (0) 2019.02.12
kvm 관리용 툴(웹)  (0) 2019.02.08
Posted by 구차니
프로그램 사용/squid2019. 2. 14. 13:40

'프로그램 사용 > squid' 카테고리의 다른 글

squid LM-factor? (Last Modified)  (0) 2019.02.18
squid access log 종류..  (2) 2019.02.17
squid cache hit rate 올리기  (0) 2019.02.14
squid 비디오 차단  (0) 2019.02.13
squid 윈도우 업데이트 캐싱  (0) 2019.02.13
Posted by 구차니
프로그램 사용/squid2019. 2. 14. 13:36

정규표현식 문제인지 영 캐시가 잘 안되는 것 같아서

캐시율이 높아야 10% 정도 나오는것 같아서 좀 더 높이는 법을 찾는 중..


[링크 : http://squid-web-proxy-cache.1019090.n4....optimising-caching-or-increasing-hit-ratio-td4681591.html]

[링크 : http://muliantophang.blogspot.com/2013/09/optimize-squid-caching-hit-rate.html]

[링크 : https://aacable.wordpress.com/tag/squid-maximum-cache-hit/]

'프로그램 사용 > squid' 카테고리의 다른 글

squid access log 종류..  (2) 2019.02.17
mrtf centos  (0) 2019.02.14
squid 비디오 차단  (0) 2019.02.13
squid 윈도우 업데이트 캐싱  (0) 2019.02.13
squid cache 정책  (0) 2019.02.13
Posted by 구차니

아 망할 selinux 

smb에서 공유 디렉토리 이름에는 들어가는데 아무것도 안나오고

파일을 올리지 못할때에는 selinux가 탓이다!!!!! 법규!!!


아무튼 아래와 같이 명령을 주면 임시로 설정하는 건데 굳혀버릴려면 -P를 주고 하면 된다

(일단 테스트 였으니...)

# setsebool samba_export_all_rw 1 


아래는 명령어로 조회해 본 설정값(centos 7 기본 설정인듯)

[root@localhost ~]# getsebool -a | grep samba

samba_create_home_dirs --> off

samba_domain_controller --> off

samba_enable_home_dirs --> off

samba_export_all_ro --> off

samba_export_all_rw --> off

samba_load_libgfapi --> off

samba_portmapper --> off

samba_run_unconfined --> off

samba_share_fusefs --> off

samba_share_nfs --> off

sanlock_use_samba --> off

tmpreaper_use_samba --> off

use_samba_home_dirs --> off

virt_use_samba --> off


[root@localhost ~]# getsebool -a | grep smb

smbd_anon_write --> off


[root@localhost ~]# getsebool -a | grep nmb

[root@localhost ~]# 

[링크 : https://wiki.centos.org/HowTos/SetUpSamba]


도움말 찾아 write 로 검색하니 똭!

If you want to allow samba to share any file/directory read/write, you must turn on the samba_export_all_rw boolean.


setsebool -P samba_export_all_rw 1 

[링크 : https://linux.die.net/man/8/smbd_selinux]



+

서버 접속해보니 SETroule 세부 정보로 해서 무언가 뜨고

거기서 이런걸 해제하라고 추천도 해주네.. 오오 좋은 세상이야


Posted by 구차니
프로그램 사용/squid2019. 2. 13. 16:30

'프로그램 사용 > squid' 카테고리의 다른 글

mrtf centos  (0) 2019.02.14
squid cache hit rate 올리기  (0) 2019.02.14
squid 윈도우 업데이트 캐싱  (0) 2019.02.13
squid cache 정책  (0) 2019.02.13
squid log format  (0) 2019.02.13
Posted by 구차니
프로그램 사용/squid2019. 2. 13. 16:29

'프로그램 사용 > squid' 카테고리의 다른 글

squid cache hit rate 올리기  (0) 2019.02.14
squid 비디오 차단  (0) 2019.02.13
squid cache 정책  (0) 2019.02.13
squid log format  (0) 2019.02.13
squid refresh_pattern  (0) 2019.02.12
Posted by 구차니
프로그램 사용/squid2019. 2. 13. 16:26

'프로그램 사용 > squid' 카테고리의 다른 글

squid 비디오 차단  (0) 2019.02.13
squid 윈도우 업데이트 캐싱  (0) 2019.02.13
squid log format  (0) 2019.02.13
squid refresh_pattern  (0) 2019.02.12
squid cachemgr  (0) 2019.02.12
Posted by 구차니
프로그램 사용/squid2019. 2. 13. 13:59


[링크 : https://wiki.squid-cache.org/Features/LogFormat]

[링크 : http://www.squid-cache.org/Doc/config/logformat/]


+

2019.02.18


access log

[링크 : https://wiki.squid-cache.org/SquidFaq/SquidLogs#access.log]


(1) TCP_HIT, TCP_MEM_HIT

    요청한 컨텐츠가 캐시에 있어서 응답한 경우


(2) TCP_MISS

    요청한 컨텐츠가 캐시에 없어서 실제 서버로 요청을 하여 응답한 경우

    대부분 이미지 외 것에 해당한다.


(3) TCP_IMS_HIT

    클라이언트가 If-Modified-Since 필드를 요청 헤더에 보냈는데 HIT가 났다는 의미이다. 

    만약 결과 HTTP코드값이 '304 Not Modified'로 나왔다면 캐시는

    클라이언트로 컨텐츠를 보낼 필요없이 클라이언트 브라우저에 있는 컨텐츠를 사용한다는 의미이다.


(4) TCP_IMS_MISS 

    요청헤더에 If-Modified-Since 가 포함되어 있지만 캐시가 신선하지 않다고 판단되어 실제 서버로 재요청을 한 경우


(5) TCP_REFRESH_HIT 

    요청한 컨텐츠가 신선하지 않아 실제 서버로 요청했는데 '304 Not Modified'를 받아 캐시에서 클라이언트로 응답한 경우


(6) TCP_REFRESH_MISS 

    요청한 컨텐츠가 신선하지 않아 실제 서버로 요청했는데 

    서버에서 새로운 컨텐츠를 전송받아 캐시에 저장하고 다시 클라이언트로 응답


(7) TCP_CLIENT_REFRESH 

    클라이언트 요청 헤더에 'no_cache'를 포함한 경우


(8) TCP_CLIENT_REFRESH_MISS 

    클라이언트 요청에 'no-cache'나 'no-store'같은 캐시를 제어하는 필드를 포함하여서 

    캐시가 서버로부터 컨텐츠를 가져왔을때


(9) TCP_DENIED 

    클라이언트 요청이 캐시에 의해서 거절당했을 경우(컨텐츠필터링과 연관) 

[링크 : http://egloos.zum.com/darkit/v/221572]


* Matched If-None-Match requests are logged as TCP_INM_HIT (proposed by Amos)

* If-Modified-Since requests for modified cached objects are processed as normal HITs

* Not matched If-None-Match requests for cached objects are processed as normal HITs

* If-Modified-Since header is ignored if If-None-Match header exists (RFC7232 compliance) 

[링크 : http://lists.squid-cache.org/pipermail/squid-dev/2016-November/007315.html]

'프로그램 사용 > squid' 카테고리의 다른 글

squid 윈도우 업데이트 캐싱  (0) 2019.02.13
squid cache 정책  (0) 2019.02.13
squid refresh_pattern  (0) 2019.02.12
squid cachemgr  (0) 2019.02.12
howto make squid as https proxy  (0) 2019.02.11
Posted by 구차니
프로그램 사용/LDAP2019. 2. 12. 18:56

계정 통합 생각하다가 gitlab을 쓰고 있어서 얘도 ldap에 통합이 되나 검색중..


결론 : 된다!

[링크 : https://docs.gitlab.com/ee/administration/auth/ldap.html]

'프로그램 사용 > LDAP' 카테고리의 다른 글

ldap 리눅스 서버 계정 통합  (0) 2019.02.12
ldap 구축  (0) 2019.02.12
sso ldap kerberos  (0) 2019.01.17
ldap samba  (0) 2019.01.17
ldap nfs  (0) 2019.01.17
Posted by 구차니