'2019/02'에 해당되는 글 135건

  1. 2019.02.16 bash history 번호 옆 *
  2. 2019.02.15 sparse file nfs /smb
  3. 2019.02.15 좀 많이 늦은(?) HTTPS SNI 차단에 대한 견해 2
  4. 2019.02.15 gitlab 서비스 명(centos)
  5. 2019.02.15 R730 PERC RAID-0 vs RAID-5
  6. 2019.02.15 virsh create / define
  7. 2019.02.15 kvm 설치 4
  8. 2019.02.15 sparse file with cp
  9. 2019.02.14 qcow2 sparse file
  10. 2019.02.14 mrtf centos
Linux2019. 2. 16. 07:43

history를 보는데 어라 *이 머지? 하고 찾아보니

 1035* virsh dumpxml

 1036  ll 


원래 명령어가 아닌 수정된 경우에는 이렇게 표시 된다고..

반대로 생각하면.. 수정해버리면 실제 실행된 명령을 모르게 할 수 있다는 의미네?

Lines prefixed with a ‘*’ have been modified. 

[링크 : https://www.gnu.org/software/bash/manual/html_node/Bash-History-Builtins.html]

'Linux' 카테고리의 다른 글

cron 실행 및 시간 관련 문제  (0) 2019.02.24
linux multi core 압축  (0) 2019.02.22
네트워크 속도 모니터링  (0) 2019.02.03
ls에서 전체년도 보기  (0) 2019.02.03
bcache - SSD write cache  (0) 2019.02.01
Posted by 구차니

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

kvm snapshot  (0) 2019.03.17
tar 로 압축된 sparse file 풀기  (0) 2019.02.16
virsh create / define  (0) 2019.02.15
kvm 설치  (4) 2019.02.15
sparse file with cp  (0) 2019.02.15
Posted by 구차니

정부랑 방통위랑 뺑뻉이 돌리면서 개소리 하는걸로 밖에 안보인다 정도

그리고 여가부 영향을 받았다는 음모론까지 나올 정도로

일괄되게 "남자들이 야동을 못보게 되서 반대한다"라고 하는데

예상외로 음란물의 비율은 10.72% 정도로 높은편은 아니다


[링크 : http://www.korea.kr/news/actuallyView.do?newsId=148858369&pWise=sub&pWiseSub=B3]


문제는 '불법'을 어떻게 규정짓냐와

기존의 DNS 장난질 보다 한단계 기술적으로 진보된 패킷 분석으로 올라간 것이 문제이고

(단순하게 생각해도 해당 사이트를 막기 위해서는 서버 접속 요청을 모두 감시해야 원하는 목적을 달성 할 수 있다.)

즉, 정부의 입맛대로 '불법'을 규정지어 원하는대로 차단을 하게 되면 피할 방법이 없게 된다는 것이다.


내가 하면 로맨스 남이 하면 불륜도 아니고

테러방지법에 대해서 필리버스터로 막던 민주당의 내로남불 행위로 밖에 볼 수가 없게 된다.

물론 이번에 적용된 SNI 차단이 이번 정권에서 바로 도입하고 승인된거라고 볼 순 없겠지만 (도입시간이 필요하니까)

정통부 해명만 보이고 정부 공식 해명은 없는 상황이기에 결국에는 (이전에도 그래왔던) 정부탓을 할 수 밖에 없다.


이미 ESNI 라고 해서 TLS 1.3 우회기술이 도입전이긴 하지만 사용가능한 우회수단이 존재하는 상황에서

그리고 패킷 정보 조회라는 관점에서 중국의 만리장성 방화벽과 무슨 차이가 있냐라는 의문이 든다.


현재기술/비용으로는 이 정도 패킷 검사는 부하가 크게 걸리지 않아서 가벼운(?) 접속할 서버 이름만 본다지만

좀 더 시간이 지나서 필터링 기술의 CPU 사용량이 적어지거나 하드웨어 제품이 나오게 되었을 경우에도

과연 정부 수준의 Man In The Middle 공격 수준의 패킷 분석을 하지 않을거라는 보장이 있을까?

[링크 : https://en.wikipedia.org/wiki/Man-in-the-middle_attack]


+

웬수와 이야기 하다가 적절해 보이는 예시 생성


정부 공인 "불법" 번호인 010-0000-0000 으로 전화거는 사람을 걸러내기 위해서

정부에서 통신3사의 협조를 구해 이통사로 전화거는 모든 call을 감시하여

해당 번호를 차단한다면 당신은 어떻게 반응할 것인가?

Posted by 구차니

centos 에서 서비스 명을 겨우 찾음.. -_-


# ll /etc/systemd/system/basic.target.wants

합계 0

lrwxrwxrwx. 1 root root 41  1월 16  2017 firewalld.service -> /usr/lib/systemd/system/firewalld.service

lrwxrwxrwx. 1 root root 47  1월 16  2017 gitlab-runsvdir.service -> /usr/lib/systemd/system/gitlab-runsvdir.service

lrwxrwxrwx. 1 root root 41  1월 16  2017 microcode.service -> /usr/lib/systemd/system/microcode.service 

[링크 : https://www.digitalocean.com/.../how-to-use-systemctl-to-manage-systemd-services-and-units]


# systemctl status gitlab-runsvdir

● gitlab-runsvdir.service - GitLab Runit supervision process

   Loaded: loaded (/usr/lib/systemd/system/gitlab-runsvdir.service; enabled; vendor preset: disabled)

   Active: active (running) since 화 2019-01-22 12:42:45 KST; 3 weeks 3 days ago

 Main PID: 620 (runsvdir)

   CGroup: /system.slice/gitlab-runsvdir.service

           ├─  620 runsvdir -P /opt/gitlab/service log: ....................................................................

...

           ├─18710 sleep 3000

           └─18789 sleep 1


 1월 22 12:42:45 localhost.localdomain systemd[1]: Started GitLab Runit supervision process.

 1월 22 12:42:45 localhost.localdomain systemd[1]: Starting GitLab Runit supervision process... 


설치

[링크 : https://wikidocs.net/16279]

[링크 : https://blog.asamaru.net/2015/09/22/how-to-install-gitlib-on-centos/]


업그레이드 및 중지

[링크 : https://hreeman.tistory.com/79]


자동실행

[링크 : https://stackoverflow.com/questions/27983295/gitlab-autostart-on-boot]

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

git 저장소 합치기  (0) 2019.06.03
gitignore 특정 파일은 예외에서 제외시키기  (0) 2019.04.17
git branch  (0) 2019.01.29
git 윈도우 자격증명 관리  (0) 2019.01.16
git tag  (0) 2018.12.07
Posted by 구차니
하드웨어/RAID2019. 2. 15. 13:44

에에에에에에엥??!?!?!


동일 시스템 아니고 동일 하드가 아니라 다르게 나올수도 있고

다른 서비스 도는게 있어서 전혀 영향이 없다라고 할 순 없는 좀 불공평한 상황이긴 하지만

SAS 10K HDD RAID-5 * 4

SAS 10K HDD RAID-0 * 4

# dd if=/dev/zero of=/home/testfile bs=1G count=1 oflag=direct

1073741824 bytes (1.1 GB) copied, 0.968236 s, 1.1 GB/s


# dd if=/dev/zero of=/home/testfile bs=1M count=1024 oflag=direct

1073741824 bytes (1.1 GB) copied, 0.877165 s, 1.2 GB/s

1073741824 bytes (1.1 GB) copied, 1.67205 s, 642 MB/s

1073741824 bytes (1.1 GB) copied, 1.64823 s, 651 MB/s

1073741824 bytes (1.1 GB) copied, 1.70338 s, 630 MB/s

1073741824 bytes (1.1 GB) copied, 1.67719 s, 640 MB/s


# dd if=/dev/zero of=/home/testfile bs=1G count=1 oflag=direct

1073741824 bytes (1.1 GB) copied, 0.981585 s, 1.1 GB/s

1073741824 bytes (1.1 GB) copied, 1.86161 s, 577 MB/s

1073741824 bytes (1.1 GB) copied, 1.83748 s, 584 MB/s


# dd if=/dev/zero of=/home/testfile bs=512 count=1024 oflag=direct

524288 bytes (524 kB) copied, 0.0448593 s, 11.7 MB/s

524288 bytes (524 kB) copied, 0.0444185 s, 11.8 MB/s

524288 bytes (524 kB) copied, 0.0448892 s, 11.7 MB/s


# dd if=/dev/zero of=/home/testfile bs=512 count=102400 oflag=direct

52428800 bytes (52 MB) copied, 2.87847 s, 18.2 MB/s


# dd if=/dev/zero of=/home/testfile bs=4096 count=102400 oflag=direct

419430400 bytes (419 MB) copied, 3.62074 s, 116 MB/s

419430400 bytes (419 MB) copied, 3.60996 s, 116 MB/s


# dd if=/dev/zero of=/home/testfile bs=1G count=1 oflag=direct

1073741824 bytes (1.1 GB) copied, 1.33766 s, 803 MB/s


# dd if=/dev/zero of=/home/testfile bs=1G count=1 oflag=direct

1073741824 bytes (1.1 GB) copied, 1.33303 s, 805 MB/s

1073741824 bytes (1.1 GB) copied, 2.53404 s, 424 MB/s

1073741824 bytes (1.1 GB) copied, 2.69058 s, 399 MB/s

1073741824 bytes (1.1 GB) copied, 1.35569 s, 792 MB/s

1073741824 bytes (1.1 GB) copied, 2.63433 s, 408 MB/s


# dd if=/dev/zero of=/home/testfile bs=1M count=1024 oflag=direct

1073741824 bytes (1.1 GB) copied, 2.34943 s, 457 MB/s

1073741824 bytes (1.1 GB) copied, 2.39908 s, 448 MB/s

1073741824 bytes (1.1 GB) copied, 1.12215 s, 957 MB/s // 쉬었다가 실행


# dd if=/dev/zero of=/home/testfile bs=512 count=1024 oflag=direct

524288 bytes (524 kB) copied, 0.0496745 s, 10.6 MB/s

524288 bytes (524 kB) copied, 0.0369942 s, 14.2 MB/s

524288 bytes (524 kB) copied, 0.0600279 s, 8.7 MB/s


# dd if=/dev/zero of=/home/testfile bs=512 count=102400 oflag=direct

52428800 bytes (52 MB) copied, 4.08467 s, 12.8 MB/s


# dd if=/dev/zero of=/home/testfile bs=4096 count=102400 oflag=direct

419430400 bytes (419 MB) copied, 6.50347 s, 64.5 MB/s

419430400 bytes (419 MB) copied, 6.21405 s, 67.5 MB/s



내가 멀 잘못했나 해서 보는데 맞는데.. 머지?

Read/ Write 정책에 block size 모두 동일하고.. 우찌된게 RAID-5가 전반적으로 좋냐?


RAID-0


RAID-5 (크.. redundancy 1 흐믓하다)



+

다른 서버

얘는 

삼성 SATA SSD * 2 RAID-0

시게이트 SAS HDD * 6 RAID-0 로 묶인놈


요게 SSD


요건 HDD


RAID 컨트롤러 성능이 문제인가.. 아니면 stripe 사이즈가 문제인가?

예상외로 너무 성능이 안나오는데?

SATA SSD RAID-0 * 2

 SAS 10K HDD RAID-0 * 6

# dd if=/dev/zero of=/home/testfile bs=1G count=1 oflag=direct

1073741824 bytes (1.1 GB) copied, 1.38812 s, 774 MB/s

1073741824 bytes (1.1 GB) copied, 0.837179 s, 1.3 GB/s // 5초 쉬었다


# dd if=/dev/zero of=/home/testfile bs=1M count=1024 oflag=direct

1073741824 bytes (1.1 GB) copied, 0.736994 s, 1.5 GB/s

1073741824 bytes (1.1 GB) copied, 1.03865 s, 1.0 GB/s


# dd if=/dev/zero of=/home/testfile bs=512 count=1024 oflag=direct

524288 bytes (524 kB) copied, 0.0402945 s, 13.0 MB/s

524288 bytes (524 kB) copied, 0.0447082 s, 11.7 MB/s


# dd if=/dev/zero of=/home/testfile bs=512 count=102400 oflag=direct

52428800 bytes (52 MB) copied, 4.22318 s, 12.4 MB/s

52428800 bytes (52 MB) copied, 3.15094 s, 16.6 MB/s


# dd if=/dev/zero of=/home/testfile bs=4096 count=102400 oflag=direct

419430400 bytes (419 MB) copied, 5.89989 s, 71.1 MB/s

419430400 bytes (419 MB) copied, 6.28572 s, 66.7 MB/s

# dd if=/dev/zero of=/mnt/data/testfile bs=1G count=1 oflag=direct

1073741824 bytes (1.1 GB) copied, 1.1833 s, 907 MB/s

1073741824 bytes (1.1 GB) copied, 0.775761 s, 1.4 GB/s


# dd if=/dev/zero of=/mnt/data/testfile bs=1M count=1024 oflag=direct

1073741824 bytes (1.1 GB) copied, 0.52785 s, 2.0 GB/s

1073741824 bytes (1.1 GB) copied, 0.879442 s, 1.2 GB/s


# dd if=/dev/zero of=/mnt/data/testfile bs=512 count=1024 oflag=direct

524288 bytes (524 kB) copied, 0.04629 s, 11.3 MB/s

524288 bytes (524 kB) copied, 0.0437859 s, 12.0 MB/s


# dd if=/dev/zero of=/mnt/data/testfile bs=4096 count=102400 oflag=direct

419430400 bytes (419 MB) copied, 3.37354 s, 124 MB/s

419430400 bytes (419 MB) copied, 3.44868 s, 122 MB/s


# dd if=/dev/zero of=/mnt/data/testfile bs=4096 count=102400 oflag=direct

419430400 bytes (419 MB) copied, 4.17253 s, 101 MB/s

419430400 bytes (419 MB) copied, 4.63281 s, 90.5 MB/s



'하드웨어 > RAID' 카테고리의 다른 글

raid 특성인가?  (0) 2019.02.22
RAID 1+0 구성과 span  (0) 2019.02.19
R730 RAID5 성능 테스트(?)  (0) 2019.02.13
PowerEdge RAID Controller - PERC  (0) 2019.02.12
512b vs 4k sector HDD (Advanced Format - AF)  (0) 2019.02.12
Posted by 구차니

적었나 기억이 안나네..

일단 다른 시스템으로 이전하면서 사용이 가능한지 확인하려고 하는데

dumpxml로 설정을 받아내고(그냥 뱉어내니 파일로 저장을 해주어야 함)

그걸 create 냐 define이냐로 고민을 하고 있는데

(난 도움말 보고 create면 된다라고 하고, 다른 사람은 define으로 해야 한다라고 해서)


fedora 글로는 create면 되는 듯 한데?

# virsh dumpxml GuestID > guest.xml

# virsh create configuration_file.xml 

[링크 : https://docs.fedoraproject.org/..._with_virsh-Creating_a_virtual_machine_XML_dump_configuration_file.html]


일단 define은 생성만 하고 실행을 안하고 create는 pause를 주지 않으면 바로 실행 하는 듯?

실험을 해보니 create로 하면 등록되지 않고 바로 실행되고

define + start가 적합한 등록 방법으로 보인다.

create FILE [--console] [--paused] [--autodestroy]

Create a domain from an XML <file>. An easy way to create the XML <file> is to use the dumpxml command to obtain the definition of a pre-existing guest. The domain will be paused if the --paused option is used and supported by the driver; otherwise it will be running. If --console is requested, attach to the console after creation. If --autodestroy is requested, then the guest will be automatically destroyed when virsh closes its connection to libvirt, or otherwise exits.

Example

virsh dumpxml <domain> > domain.xml

vi domain.xml (or make changes with your other text editor)

virsh create domain.xml


define FILE

Define a domain from an XML <file>. The domain definition is registered but not started. If domain is already running, the changes will take effect on the next boot. 

[링크 : https://linux.die.net/man/1/virsh]

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

tar 로 압축된 sparse file 풀기  (0) 2019.02.16
sparse file nfs /smb  (0) 2019.02.15
kvm 설치  (4) 2019.02.15
sparse file with cp  (0) 2019.02.15
qcow2 sparse file  (0) 2019.02.14
Posted by 구차니

어라. centos 처음깔때 kvm 포함하면 되는게 아니었냐 -ㅁ-?


$ sudo yum install kvm libvirt 

[링크 : https://www.howtoforge.com/how-to-install-kvm-and-libvirt-on-centos-6.2-with-bridged-networking]


위의 패키지에 기본으로 깔리는지 모르는 녀석

$ sudo yum install virt-manager


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

sparse file nfs /smb  (0) 2019.02.15
virsh create / define  (0) 2019.02.15
sparse file with cp  (0) 2019.02.15
qcow2 sparse file  (0) 2019.02.14
qcow2 파일크기의 오류?  (0) 2019.02.12
Posted by 구차니

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 구차니