일부 데이터가 포함된 파일을 만들었습니다.
root$ echo thisismydata > /etc/myfile
파일을 grep할 수 있습니다.
root$ grep -a "thisismydata" /etc/myfile
thisismydata
디스크의 데이터를 grep할 수 있는지 확인하고 싶습니다.
root$ grep -a "thisismydata" /dev/mapper/vg-root
아무것도 발견되지 않았습니다. 그러나 이 명령은 다른 데이터에서는 잘 작동합니다.
root$ grep -a 'MIICNTCCA' /dev/mapper/vg-root
MIICNTCCAbygAwIBAgIJAMhaW/dIVfGbMAoGCCqGSM49BAMDMGAxCzAJBgNVBAYT
MIICNTCCAbygAwIBAgIJAMhaW/dIVfGbMAoGCCqGSM49BAMDMGAxCzAJBgNVBAYT
...
(이 특정 데이터는 내 디스크의 여러 위치에 나타납니다.)
여기서 무슨 일이 일어나고 있는 걸까요? 파일이 아직 디스크에 동기화되지 않았을 수 있다고 의심되어 다음과 같이 했습니다.
root$ sync
root$ grep -a "thisismydata" /dev/mapper/vg-root
하지만 아직 아무것도 없습니다.
내 장치에서 새로 생성된 데이터를 찾을 수 없는 이유는 무엇입니까?
참고: 설치 플래그는 다음과 같습니다.
root$ mount | grep root
/dev/mapper/vg-root on / type ext4 (rw,relatime,seclabel,data=ordered)
편집하다
요청 시 설치를 완료하세요.
root$ mount
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime,seclabel)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
devtmpfs on /dev type devtmpfs (rw,nosuid,seclabel,size=8101844k,nr_inodes=2025461,mode=755)
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev,seclabel)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,seclabel,gid=5,mode=620,ptmxmode=000)
tmpfs on /run type tmpfs (rw,nosuid,nodev,seclabel,mode=755)
tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,seclabel,mode=755)
cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,seclabel,xattr,release_agent=/usr/lib/systemd/systemd-cgroups-agent,name=systemd)
pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime)
cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,seclabel,cpuacct,cpu)
cgroup on /sys/fs/cgroup/net_cls,net_prio type cgroup (rw,nosuid,nodev,noexec,relatime,seclabel,net_prio,net_cls)
cgroup on /sys/fs/cgroup/hugetlb type cgroup (rw,nosuid,nodev,noexec,relatime,seclabel,hugetlb)
cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,seclabel,blkio)
cgroup on /sys/fs/cgroup/pids type cgroup (rw,nosuid,nodev,noexec,relatime,seclabel,pids)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,seclabel,devices)
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,seclabel,freezer)
cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,seclabel,cpuset)
cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,seclabel,memory)
cgroup on /sys/fs/cgroup/perf_event type cgroup (rw,nosuid,nodev,noexec,relatime,seclabel,perf_event)
configfs on /sys/kernel/config type configfs (rw,relatime)
/dev/mapper/vg-root on / type ext4 (rw,relatime,seclabel,data=ordered)
/dev/mapper/vg-usr on /usr type ext4 (rw,relatime,seclabel,data=ordered)
selinuxfs on /sys/fs/selinux type selinuxfs (rw,relatime)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=32,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=13034)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime,seclabel)
mqueue on /dev/mqueue type mqueue (rw,relatime,seclabel)
tmpfs on /tmp type tmpfs (rw,nosuid,noexec,relatime,seclabel,size=2097152k)
/dev/sda1 on /boot type ext4 (rw,relatime,seclabel,data=ordered)
/dev/mapper/vg-repo on /repo type ext4 (rw,relatime,seclabel,data=ordered)
/dev/mapper/vg-var on /var type ext4 (rw,relatime,seclabel,data=ordered)
/dev/mapper/vg-home on /home type ext4 (rw,relatime,seclabel,data=ordered)
/dev/mapper/vg-mysql on /var/lib/mysql type ext4 (rw,relatime,seclabel,data=ordered)
tmpfs on /var/www/html/app/cache type tmpfs (rw,nosuid,noexec,relatime,seclabel,size=262144k)
/dev/mapper/vg-backup on /var/backup type ext4 (rw,relatime,seclabel,data=ordered)
/dev/mapper/vg-log on /var/log type ext4 (rw,relatime,seclabel,data=ordered)
/dev/mapper/vg-audit on /var/log/audit type ext4 (rw,relatime,seclabel,data=ordered)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,relatime)
tmpfs on /run/user/0 type tmpfs (rw,nosuid,nodev,relatime,seclabel,size=1626632k,mode=700)