일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
Tags
- libvirt
- i3
- Octavia
- Ansible
- cloud-init
- kolla
- terraform
- nfs-provisioner
- yum
- Arch
- HTML
- archlinux
- grafana-loki
- Docker
- ceph-ansible
- port open
- Kubernetes
- cephadm
- Linux
- pacman
- ceph
- KVM
- golang
- OpenStack
- repository
- awx
- ubuntu
- Kubeflow
- kolla-ansible
- k8s
Archives
- Today
- Total
YJWANG
Linux raw device 생성 (Character device) 본문
Linux raw device 생성
character device로 전환하여 OS의 disk block buffer cache를 거치지 않고 바로 I/O수행
raw device 생성
- 생성
# raw /dev/raw/raw99 /dev/testvg/testlv
/dev/raw/raw99: bound to major 253, minor 2
- 확인
# raw -qa
/dev/raw/raw99: bound to major 253, minor 2
# ls -l /dev/raw
total 0
crw-rw----. 1 root disk 162, 99 Feb 19 09:15 raw99
crw-rw----. 1 root disk 162, 0 Feb 19 09:05 rawctl
raw device 삭제
# raw /dev/raw/raw99 0 0
raw deivce 생성 permanent
- udev rule 생성 // vg, lv, owner, group, mode는 상황에 따라 변경
# cat /etc/udev/rules.d/60-raw.rules
ACTION=="add|change"
ENV{DM_VG_NAME}=="testvg", ENV{DM_LV_NAME}=="testlv",RUN+="/usr/bin/raw /dev/raw/raw1 %N"
KERNEL=="raw*",OWNER="root",GROUP="disk",MODE="0660"
# udevadm control --reload-rules
# udevadm trigger --type=devices --action=add
- 확인
# raw -qa
/dev/raw/raw1: bound to major 253, minor 2
반응형