AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

    • 主页
    • 系统&网络
    • Ubuntu
    • Unix
    • DBA
    • Computer
    • Coding
    • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / user-770843

m.divya.mohan's questions

Martin Hope
m.divya.mohan
Asked: 2023-05-16 00:49:09 +0800 CST

关闭期间卸载逻辑卷失败

  • 5

在我的系统中,多个逻辑卷被创建、挂载并/etc/fstab在 systemd 启动后添加条目。

当系统第一次重新启动时,在关机期间观察到许多卸载失败。

有趣的是,在随后的重新启动中,没有观察到这个问题。

第一次和后续重启之间的行为差​​异可能是由于仅在第一次重启期间,片段*.mount不是由systemd-fstab-generator. 我对解决这个问题特别感兴趣,因为/var/log我在这里面临数据丢失。

按照这里的建议,我添加了 override conf for systemd-journal-flush.serviceas:

[Unit]
PartOf=var.mount var-log.mount

[Service]
ExecStop=/usr/local/bin/debugger.sh

此外,在 ExecStop 中添加了一个调试脚本来检查是否有任何打开的 fds。

#!/bin/sh
#
date > /root/out
echo "=============" >> /root/out
fuser -m /var/log >> /root/out
echo "=============" >> /root/out
lsof | grep /var/log >> /root/out
echo "===============" >> /root/out
ps aux  >> /root/out

同样通过此更改,umount 在第一次重新启动时失败并在随后的重新启动中工作。

[FAILED] Failed unmounting /var/crash/kernel.
[FAILED] Failed unmounting /var/lib/systemd/coredump.
[FAILED] Failed unmounting /var/log/audit.
[FAILED] Failed unmounting /var/sonic.
[FAILED] Failed unmounting /var/tmp.
[  OK  ] Stopped target Swap.
         Unmounting /mnt/sftp...
         Unmounting /var/crash...
[FAILED] Failed unmounting /var/crash.
[  OK  ] Stopped Flush Journal to Persistent Storage.
         Unmounting /var/log...
[FAILED] Failed unmounting /var/log.

从调试脚本输出来看,lsof和fuser输出都是空的。ps我也没有发现任何可疑的输出。(有一个umount状态D。不确定它是否需要检查。)

USER         PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root           1 27.4  0.2 188048 37548 ?        Ss   15:43   5:26 /usr/lib/systemd/systemd --show-status=1 --log-target=journal-or-kmsg --log-level=notice
root           2  0.0  0.0      0     0 ?        S    15:43   0:00 [kthreadd]
root           3  0.0  0.0      0     0 ?        I<   15:43   0:00 [rcu_gp]
root           4  0.0  0.0      0     0 ?        I<   15:43   0:00 [rcu_par_gp]
root           5  0.0  0.0      0     0 ?        I    15:43   0:00 [kworker/0:0-cgroup_destroy]
root           6  0.0  0.0      0     0 ?        I<   15:43   0:00 [kworker/0:0H-kblockd]
root           8  0.0  0.0      0     0 ?        I<   15:43   0:00 [mm_percpu_wq]
root           9  0.0  0.0      0     0 ?        S    15:43   0:00 [ksoftirqd/0]
root          10  0.2  0.0      0     0 ?        I    15:43   0:02 [rcu_sched]
root          11  0.0  0.0      0     0 ?        I    15:43   0:00 [rcu_bh]
root          12  0.0  0.0      0     0 ?        S    15:43   0:00 [migration/0]
root          13  0.0  0.0      0     0 ?        S    15:43   0:00 [cpuhp/0]
root          14  0.0  0.0      0     0 ?        S    15:43   0:00 [cpuhp/1]
root          15  0.0  0.0      0     0 ?        S    15:43   0:00 [migration/1]
root          16  0.0  0.0      0     0 ?        S    15:43   0:00 [ksoftirqd/1]
root          18  0.0  0.0      0     0 ?        I<   15:43   0:00 [kworker/1:0H-kblockd]
root          19  0.0  0.0      0     0 ?        S    15:43   0:00 [cpuhp/2]
root          20  0.0  0.0      0     0 ?        S    15:43   0:00 [migration/2]
root          21  0.0  0.0      0     0 ?        S    15:43   0:00 [ksoftirqd/2]
root          23  0.0  0.0      0     0 ?        I<   15:43   0:00 [kworker/2:0H-kblockd]
root          24  0.0  0.0      0     0 ?        S    15:43   0:00 [cpuhp/3]
root          25  0.0  0.0      0     0 ?        S    15:43   0:00 [migration/3]
root          26  0.0  0.0      0     0 ?        S    15:43   0:00 [ksoftirqd/3]
root          28  0.0  0.0      0     0 ?        I<   15:43   0:00 [kworker/3:0H-kblockd]
root          29  0.0  0.0      0     0 ?        S    15:43   0:00 [cpuhp/4]
root          30  0.0  0.0      0     0 ?        S    15:43   0:00 [migration/4]
root          31  0.0  0.0      0     0 ?        S    15:43   0:00 [ksoftirqd/4]
root          33  0.0  0.0      0     0 ?        I<   15:43   0:00 [kworker/4:0H-kblockd]
root          34  0.0  0.0      0     0 ?        S    15:43   0:00 [cpuhp/5]
root          35  0.0  0.0      0     0 ?        S    15:43   0:00 [migration/5]
root          36  0.0  0.0      0     0 ?        S    15:43   0:00 [ksoftirqd/5]
root          38  0.0  0.0      0     0 ?        I<   15:43   0:00 [kworker/5:0H-kblockd]
root          39  0.0  0.0      0     0 ?        S    15:43   0:00 [cpuhp/6]
root          40  0.0  0.0      0     0 ?        S    15:43   0:00 [migration/6]
root          41  0.0  0.0      0     0 ?        S    15:43   0:00 [ksoftirqd/6]
root          43  0.0  0.0      0     0 ?        I<   15:43   0:00 [kworker/6:0H-kblockd]
root          44  0.0  0.0      0     0 ?        S    15:43   0:00 [cpuhp/7]
root          45  0.0  0.0      0     0 ?        S    15:43   0:00 [migration/7]
root          46  0.0  0.0      0     0 ?        S    15:43   0:00 [ksoftirqd/7]
root          48  0.0  0.0      0     0 ?        I<   15:43   0:00 [kworker/7:0H-kblockd]
root          49  0.0  0.0      0     0 ?        S    15:43   0:00 [kdevtmpfs]
root          50  0.0  0.0      0     0 ?        I<   15:43   0:00 [netns]
root          51  0.0  0.0      0     0 ?        S    15:43   0:00 [kauditd]
root          53  0.0  0.0      0     0 ?        S    15:43   0:00 [khungtaskd]
root          54  0.0  0.0      0     0 ?        S    15:43   0:00 [oom_reaper]
root          55  0.0  0.0      0     0 ?        I<   15:43   0:00 [writeback]
root          56  0.0  0.0      0     0 ?        S    15:43   0:00 [kcompactd0]
root          57  0.0  0.0      0     0 ?        SN   15:43   0:00 [ksmd]
root          58  0.0  0.0      0     0 ?        I<   15:43   0:00 [crypto]
root          59  0.0  0.0      0     0 ?        I<   15:43   0:00 [kblockd]
root          60  0.0  0.0      0     0 ?        I<   15:43   0:00 [ata_sff]
root          61  0.0  0.0      0     0 ?        I<   15:43   0:00 [md]
root          62  0.0  0.0      0     0 ?        I<   15:43   0:00 [devfreq_wq]
root          63  0.0  0.0      0     0 ?        S    15:43   0:00 [watchdogd]
root          65  0.0  0.0      0     0 ?        S    15:43   0:00 [kswapd0]
root          73  0.0  0.0      0     0 ?        I<   15:43   0:00 [kthrotld]
root          74  0.0  0.0      0     0 ?        S    15:43   0:00 [irq/30-pciehp]
root          76  0.0  0.0      0     0 ?        I    15:43   0:00 [kworker/1:1-memcg_kmem_cache]
root          77  0.0  0.0      0     0 ?        I    15:43   0:01 [kworker/3:1-events]
root          78  0.0  0.0      0     0 ?        I    15:43   0:00 [kworker/4:1-cgroup_destroy]
root          79  0.0  0.0      0     0 ?        I    15:43   0:00 [kworker/5:1-events]
root          80  0.0  0.0      0     0 ?        I    15:43   0:01 [kworker/6:1-memcg_kmem_cache]
root          82  0.0  0.0      0     0 ?        I<   15:43   0:00 [acpi_thermal_pm]
root          84  0.0  0.0      0     0 ?        I<   15:43   0:00 [tpm-vtpm]
root          85  0.0  0.0      0     0 ?        S    15:43   0:00 [scsi_eh_0]
root          86  0.0  0.0      0     0 ?        I<   15:43   0:00 [scsi_tmf_0]
root          87  0.0  0.0      0     0 ?        S    15:43   0:00 [scsi_eh_1]
root          88  0.0  0.0      0     0 ?        I<   15:43   0:00 [scsi_tmf_1]
root          89  0.0  0.0      0     0 ?        S    15:43   0:00 [scsi_eh_2]
root          90  0.0  0.0      0     0 ?        I<   15:43   0:00 [scsi_tmf_2]
root          91  0.0  0.0      0     0 ?        S    15:43   0:00 [scsi_eh_3]
root          92  0.0  0.0      0     0 ?        I<   15:43   0:00 [scsi_tmf_3]
root          94  0.0  0.0      0     0 ?        I    15:43   0:00 [kworker/u16:3-flush-252:18]
root          97  0.0  0.0      0     0 ?        I<   15:43   0:00 [ipv6_addrconf]
root          99  0.0  0.0      0     0 ?        I<   15:43   0:00 [kworker/1:1H-kblockd]
root         118  0.0  0.0      0     0 ?        I<   15:43   0:00 [ixgbe]
root         126  0.0  0.0      0     0 ?        I    15:43   0:00 [kworker/6:2-events]
root         133  0.0  0.0      0     0 ?        I<   15:43   0:00 [kworker/2:1H-kblockd]
root         135  0.0  0.0      0     0 ?        I<   15:43   0:00 [kdmflush]
root         138  0.0  0.0      0     0 ?        I<   15:43   0:00 [kworker/4:1H-kblockd]
root         139  0.0  0.0      0     0 ?        S    15:43   0:00 [jbd2/dm-0-8]
root         140  0.0  0.0      0     0 ?        I<   15:43   0:00 [ext4-rsv-conver]
root         142  0.0  0.0      0     0 ?        I<   15:43   0:00 [kworker/0:1H-kblockd]
root         145  0.0  0.0      0     0 ?        I<   15:43   0:00 [kworker/6:1H-kblockd]
root         147  0.0  0.0      0     0 ?        I<   15:43   0:00 [kworker/7:1H-events_highpri]
root         158  0.0  0.0      0     0 ?        I<   15:43   0:00 [kworker/3:1H-kblockd]
root         166  0.2  0.3  80384 57352 ?        Ss   15:43   0:02 /usr/lib/systemd/systemd-journald
root         171  0.0  0.0      0     0 ?        I<   15:43   0:00 [kworker/5:1H-kblockd]
root         172  0.0  0.0      0     0 ?        I<   15:43   0:00 [ipmi-msghandler]
root         173  0.0  0.0      0     0 ?        I    15:43   0:00 [kworker/2:2-events_power_efficient]
root         183  0.2  0.0   7164  5260 ?        Ss   15:43   0:02 /usr/lib/systemd/systemd-udevd
root         227  0.0  0.0      0     0 ?        S    15:43   0:00 [scsi_eh_4]
root         228  0.0  0.0      0     0 ?        I<   15:43   0:00 [scsi_tmf_4]
root         231  0.0  0.0      0     0 ?        S    15:43   0:00 [usb-storage]
root         237  0.0  0.0      0     0 ?        I<   15:43   0:00 [ttm_swap]
root         272  0.0  0.0      0     0 ?        SN   15:43   0:00 [kipmi0]
root       68631  0.0  0.0      0     0 ?        I    15:48   0:00 [kworker/3:0-cgroup_destroy]
root       68632  0.0  0.0      0     0 ?        I    15:48   0:00 [kworker/1:2-mm_percpu_wq]
root       95828  0.1  0.0      0     0 ?        I    15:51   0:00 [kworker/2:0-cgroup_destroy]
root       98121  0.0  0.0      0     0 ?        I<   15:51   0:00 [kdmflush]
root       98348  0.0  0.0      0     0 ?        I<   15:51   0:00 [kdmflush]
root       98522  0.0  0.0      0     0 ?        I<   15:51   0:00 [kdmflush]
root       98540  0.0  0.0      0     0 ?        I<   15:51   0:00 [kdmflush]
root       98644  0.0  0.0      0     0 ?        I<   15:51   0:00 [kdmflush]
root       98816  0.0  0.0      0     0 ?        I<   15:51   0:00 [kdmflush]
root       98879  0.0  0.0      0     0 ?        I<   15:51   0:00 [kdmflush]
root       98912  0.0  0.0      0     0 ?        I<   15:51   0:00 [kdmflush]
root       99063  0.0  0.0      0     0 ?        I<   15:51   0:00 [kdmflush]
root       99098  0.0  0.0      0     0 ?        I<   15:51   0:00 [kdmflush]
root       99132  0.0  0.0      0     0 ?        I<   15:51   0:00 [kdmflush]
root       99450  0.0  0.0      0     0 ?        I<   15:51   0:00 [kdmflush]
root       99503  0.0  0.0      0     0 ?        I<   15:51   0:00 [kdmflush]
root       99536  0.0  0.0      0     0 ?        I<   15:51   0:00 [kdmflush]
root       99856  0.0  0.0      0     0 ?        I<   15:51   0:00 [kdmflush]
root      100023  0.0  0.0      0     0 ?        I<   15:51   0:00 [kdmflush]
root      100049  0.0  0.0      0     0 ?        I<   15:51   0:00 [kdmflush]
root      100153  0.0  0.0      0     0 ?        I<   15:51   0:00 [kdmflush]
root      100189  0.0  0.0      0     0 ?        I<   15:51   0:00 [kdmflush]
root      100244  0.0  0.0      0     0 ?        I<   15:51   0:00 [kdmflush]
root      100279  0.0  0.0      0     0 ?        I<   15:51   0:00 [kdmflush]
root      100316  0.0  0.0      0     0 ?        I<   15:51   0:00 [kdmflush]
root      101223  0.2  0.0      0     0 ?        I    15:51   0:01 [kworker/u16:1-events_unbound]
root      101857  0.0  0.0      0     0 ?        S    15:51   0:00 [jbd2/dm-2-8]
root      101858  0.0  0.0      0     0 ?        I<   15:51   0:00 [ext4-rsv-conver]
root      101864  0.0  0.0      0     0 ?        S    15:51   0:00 [jbd2/dm-3-8]
root      101865  0.0  0.0      0     0 ?        I<   15:51   0:00 [ext4-rsv-conver]
root      101872  0.0  0.0      0     0 ?        S    15:51   0:00 [jbd2/dm-4-8]
root      101873  0.0  0.0      0     0 ?        I<   15:51   0:00 [ext4-rsv-conver]
root      101946  0.0  0.0      0     0 ?        S    15:51   0:00 [jbd2/dm-14-8]
root      101947  0.0  0.0      0     0 ?        I<   15:51   0:00 [ext4-rsv-conver]
root      101953  0.0  0.0      0     0 ?        S    15:51   0:00 [jbd2/dm-15-8]
root      101954  0.0  0.0      0     0 ?        I<   15:51   0:00 [ext4-rsv-conver]
root      101960  0.0  0.0      0     0 ?        S    15:51   0:00 [jbd2/dm-16-8]
root      101961  0.0  0.0      0     0 ?        I<   15:51   0:00 [ext4-rsv-conver]
root      101981  0.0  0.0      0     0 ?        S    15:51   0:00 [jbd2/dm-20-8]
root      101982  0.0  0.0      0     0 ?        I<   15:51   0:00 [ext4-rsv-conver]
root      101988  0.0  0.0      0     0 ?        S    15:51   0:00 [jbd2/dm-22-8]
root      101989  0.0  0.0      0     0 ?        I<   15:51   0:00 [ext4-rsv-conver]
root      101995  0.0  0.0      0     0 ?        S    15:51   0:00 [jbd2/sda3-8]
root      101996  0.0  0.0      0     0 ?        I<   15:51   0:00 [ext4-rsv-conver]
root      102071  0.1  0.0      0     0 ?        I    15:51   0:00 [kworker/7:0-events]
root      102103  0.0  0.0      0     0 ?        I    15:51   0:00 [kworker/5:0-rcu_gp]
root      102283  0.1  0.0      0     0 ?        I    15:51   0:00 [kworker/4:0-memcg_kmem_cache]
root      102829  0.0  0.0      0     0 ?        I    15:52   0:00 [kworker/7:3-cgroup_pidlist_destroy]
root      102941  0.0  0.0      0     0 ?        I    15:52   0:00 [kworker/0:1-rcu_gp]
root      116853  0.0  0.0      0     0 ?        I    15:59   0:00 [kworker/u16:0-events_unbound]
root      116965  0.0  0.0      0     0 ?        I    15:59   0:00 [kworker/1:0-mm_percpu_wq]
root      118574  0.0  0.0      0     0 ?        I    16:02   0:00 [kworker/u16:2-flush-252:22]
root      118585  0.0  0.0   7164  3708 ?        S    16:02   0:00 /usr/lib/systemd/systemd-udevd
root      118586  0.0  0.0   7164  3644 ?        S    16:02   0:00 /usr/lib/systemd/systemd-udevd
root      118587  0.0  0.0   7164  3640 ?        S    16:02   0:00 /usr/lib/systemd/systemd-udevd
root      118588  0.0  0.0   7164  3640 ?        S    16:02   0:00 /usr/lib/systemd/systemd-udevd
root      118589  0.5  0.0   7164  3640 ?        S    16:02   0:00 /usr/lib/systemd/systemd-udevd
root      118590  0.0  0.0   7164  3640 ?        S    16:02   0:00 /usr/lib/systemd/systemd-udevd
root      118591  0.0  0.0   7164  3640 ?        S    16:02   0:00 /usr/lib/systemd/systemd-udevd
root      118592  0.0  0.0   7164  3640 ?        S    16:02   0:00 /usr/lib/systemd/systemd-udevd
root      118593  0.0  0.0   7164  3640 ?        S    16:02   0:00 /usr/lib/systemd/systemd-udevd
root      118594  0.0  0.0   7164  3640 ?        S    16:02   0:00 /usr/lib/systemd/systemd-udevd
root      118595  0.0  0.0   7164  3640 ?        S    16:02   0:00 /usr/lib/systemd/systemd-udevd
root      118596  0.0  0.0   7164  3620 ?        S    16:02   0:00 /usr/lib/systemd/systemd-udevd
root      118597  0.0  0.0   7164  3640 ?        S    16:02   0:00 /usr/lib/systemd/systemd-udevd
root      118598  0.0  0.0   7164  3640 ?        S    16:02   0:00 /usr/lib/systemd/systemd-udevd
root      118599  0.0  0.0   7164  3640 ?        S    16:02   0:00 /usr/lib/systemd/systemd-udevd
root      118600  0.0  0.0   7164  3640 ?        S    16:02   0:00 /usr/lib/systemd/systemd-udevd
root      118601  1.6  0.0   7164  3780 ?        S    16:02   0:00 /usr/lib/systemd/systemd-udevd
root      118603  0.0  0.0   7164  3640 ?        S    16:02   0:00 /usr/lib/systemd/systemd-udevd
root      118604  0.0  0.0   7164  3528 ?        S    16:02   0:00 /usr/lib/systemd/systemd-udevd
root      118605  0.0  0.0   7164  3528 ?        S    16:02   0:00 /usr/lib/systemd/systemd-udevd
root      118606  0.0  0.0   7164  3528 ?        S    16:02   0:00 /usr/lib/systemd/systemd-udevd
root      118607  0.0  0.0   7164  3528 ?        S    16:02   0:00 /usr/lib/systemd/systemd-udevd
root      118608  0.0  0.0   7164  3528 ?        S    16:02   0:00 /usr/lib/systemd/systemd-udevd
root      118609  0.0  0.0   7164  3528 ?        S    16:02   0:00 /usr/lib/systemd/systemd-udevd
root      118610  0.0  0.0   7164  3528 ?        S    16:02   0:00 /usr/lib/systemd/systemd-udevd
root      118611  0.0  0.0   7164  3528 ?        S    16:02   0:00 /usr/lib/systemd/systemd-udevd
root      118612  0.0  0.0   7164  3528 ?        S    16:02   0:00 /usr/lib/systemd/systemd-udevd
root      118640  0.0  0.0      0     0 ?        I    16:02   0:00 [kworker/3:2-cgroup_destroy]
root      118731  0.0  0.0      0     0 ?        I    16:02   0:00 [kworker/3:3-events]
root      118745  0.0  0.0      0     0 ?        I    16:02   0:00 [kworker/4:2-cgroup_destroy]
root      118823  0.0  0.0      0     0 ?        I    16:02   0:00 [kworker/7:1-cgroup_destroy]
root      118898  0.0  0.0      0     0 ?        I    16:02   0:00 [kworker/0:2]
root      118899  0.2  0.0      0     0 ?        I    16:02   0:00 [kworker/0:3-events]
root      119014  0.0  0.0      0     0 ?        I    16:02   0:00 [kworker/6:0-mm_percpu_wq]
root      119052  0.0  0.0      0     0 ?        I    16:02   0:00 [kworker/2:1-events]
root      119111  0.0  0.0   6136   932 ?        R    16:02   0:00 /bin/umount /var/lib/docker -c
root      119117  0.0  0.0   6808  2936 ?        Ss   16:02   0:00 /bin/sh /usr/local/bin/debugger.sh
root      119120  0.0  0.0   6136   876 ?        D    16:02   0:00 /bin/umount /mnt/sftp -c
root      119124  0.0  0.0   6132  2036 ?        R    16:02   0:00 ps aux

所以我的问题是:

  1. /etc/fstab我是否缺少在运行时添加条目时所需的任何优雅处理。有什么具体的方法可以通知 systemd 创建*.mount和systemd-fsck@*分片吗?
  2. 如果没有进程正在使用挂载点,还有什么会导致 umount 失败?如何进一步调试?
  3. 有解决数据丢失的方法吗?添加另一个服务来执行惰性/强制卸载会有帮助吗?
linux
  • 1 个回答
  • 26 Views
Martin Hope
m.divya.mohan
Asked: 2023-04-14 01:04:06 +0800 CST

如果在小于 512 MB 的逻辑卷中创建文件,则文件的出生时间会丢失

  • 26

我的系统中有一个卷组,由单个物理卷创建。

我正在创建两个逻辑卷 - 一个大小为 100M,另一个大小为 512M。

在 LV 上创建的任何 100M 大小的文件都不会显示出生时间属性。大小为 512M 的 LV 没有这个问题。

关于为什么会这样的任何线索?

物理卷和卷组:

# pvdisplay
  --- Physical volume ---
  PV Name               /dev/sda4
  VG Name               VG_System
  PV Size               400.00 GiB / not usable 4.00 MiB
  Allocatable           yes
  PE Size               4.00 MiB
  Total PE              102399
  Free PE               38099
  Allocated PE          64300
  PV UUID               Awnq0n-24v1-Z53P-MC09-3Fvv-dc0r-6QvAyX


# vgdisplay VG_System
  --- Volume group ---
  VG Name               VG_System
  System ID
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  25
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                24
  Open LV               22
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               <400.00 GiB
  PE Size               4.00 MiB
  Total PE              102399
  Alloc PE / Size       64300 / 251.17 GiB
  Free  PE / Size       38099 / 148.82 GiB
  VG UUID               Zg53rH-kuCI-dWKa-Uo3H-Mr2i-G2As-Wflm0d

第一个LV:

# lvcreate --stripes 1 -n testing -L 100M VG_System
  Logical volume "testing" created.

# mkfs.ext4 /dev/VG_System/testing
mke2fs 1.45.6 (20-Mar-2020)
Discarding device blocks: done
Creating filesystem with 102400 1k blocks and 25688 inodes
Filesystem UUID: ac9c1782-7770-4031-bad8-9b76f7577467
Superblock backups stored on blocks:
        8193, 24577, 40961, 57345, 73729

Allocating group tables: done
Writing inode tables: done
Creating journal (4096 blocks): done
Writing superblocks and filesystem accounting information: done


# blkid /dev/VG_System/testing
/dev/VG_System/testing: UUID="ac9c1782-7770-4031-bad8-9b76f7577467" BLOCK_SIZE="1024" TYPE="ext4"

# mount /dev/VG_System/testing /mnt/test
# mount | grep test
/dev/mapper/VG_System-testing on /mnt/test type ext4 (rw,relatime,stripe=4)

# touch /mnt/test/a
# stat /mnt/test/a
  File: /mnt/test/a
  Size: 0               Blocks: 0          IO Block: 1024   regular empty file
Device: 252,23  Inode: 12          Links: 1
Access: (0644/-rw-r--r--)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2023-04-13 22:13:43.000000000 +0530
Modify: 2023-04-13 22:13:43.000000000 +0530
Change: 2023-04-13 22:13:43.000000000 +0530
 Birth: -

这里的Birth字段是空的。

第二个LV:

# lvcreate  -n testing2 -L 512M VG_System
  Logical volume "testing2" created.

# mkfs.ext4 /dev/VG_System/testing2
mke2fs 1.45.6 (20-Mar-2020)
Discarding device blocks: done
Creating filesystem with 131072 4k blocks and 32768 inodes
Filesystem UUID: 0b5e24a9-cdf1-4749-9089-bf0cf1495185
Superblock backups stored on blocks:
        32768, 98304

Allocating group tables: done
Writing inode tables: done
Creating journal (4096 blocks): done
Writing superblocks and filesystem accounting information: done


# blkid /dev/VG_System/testing2
/dev/VG_System/testing2: UUID="0b5e24a9-cdf1-4749-9089-bf0cf1495185" BLOCK_SIZE="4096" TYPE="ext4"

# mount /dev/VG_System/testing2 /mnt/test2
# mount | grep test
/dev/mapper/VG_System-testing2 on /mnt/test2 type ext4 (rw,relatime)

# touch /mnt/test2/a
# stat /mnt/test2/a
  File: /mnt/test2/a
  Size: 0               Blocks: 0          IO Block: 4096   regular empty file
Device: 252,24  Inode: 12          Links: 1
Access: (0644/-rw-r--r--)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2023-04-13 22:19:01.873047858 +0530
Modify: 2023-04-13 22:19:01.873047858 +0530
Change: 2023-04-13 22:19:01.873047858 +0530
 Birth: 2023-04-13 22:19:01.873047858 +0530

注意确定它是否相关,但是第一个 LV 的安装选项有stripe=4,而第二个没有这个。除此之外,两个 LV 是相似的。

# lvdisplay VG_System/testing
  --- Logical volume ---
  LV Path                /dev/VG_System/testing
  LV Name                testing
  VG Name                VG_System
  LV UUID                n19sRr-SqHW-znjI-0fEW-MkQX-JRUn-MTmZHF
  LV Write Access        read/write
  LV Creation host, time controller, 2023-04-13 22:12:45 +0530
  LV Status              available
  # open                 0
  LV Size                100.00 MiB
  Current LE             25
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           252:23


# lvdisplay VG_System/testing2
  --- Logical volume ---
  LV Path                /dev/VG_System/testing2
  LV Name                testing2
  VG Name                VG_System
  LV UUID                94oJKP-r2Ob-ReHr-sDSO-t3HY-isJB-ZtEPsq
  LV Write Access        read/write
  LV Creation host, time controller, 2023-04-13 22:18:01 +0530
  LV Status              available
  # open                 1
  LV Size                512.00 MiB
  Current LE             128
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           252:24

linux
  • 1 个回答
  • 1715 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助
subwaysurfers
my femboy roommate

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve