Btrfsと空きディスク容量不足

Btrfsと空きディスク容量不足

良い午後です!

を介してファイルに書き込んでいますが、rsync空きディスク容量は十分ですが、btrfsを使用していますが、btrfsに空き容量がなくなったと表示されます。この状況を処理する方法を教えてください。不要なファイルを削除しましたが役に立ちませんでした。

システムを再起動する方法を教えてください。 du ユーティリティの出力で判断すると、約 150 GB 程度残っておく必要があります。

追加情報:

❯ df -h | grep "sda"
/dev/sda4          515G         513G  5,6M          100% /
/dev/sda4          515G         513G  5,6M          100% /var/log
/dev/sda4          515G         513G  5,6M          100% /home
/dev/sda4          515G         513G  5,6M          100% /var/cache
/dev/sda1          996M         1,5M  995M            1% /boot/efi

❯ mount | egrep "sda"
/dev/sda4 on / type btrfs (rw,noatime,compress=zstd:3,space_cache,autodefrag,subvolid=815,subvol=/@)
/dev/sda4 on /var/log type btrfs (rw,noatime,compress=zstd:3,space_cache,autodefrag,subvolid=260,subvol=/@log)
/dev/sda4 on /home type btrfs (rw,noatime,compress=zstd:3,space_cache,autodefrag,subvolid=814,subvol=/@home)
/dev/sda4 on /var/cache type btrfs (rw,noatime,compress=zstd:3,space_cache,autodefrag,subvolid=259,subvol=/@cache)
/dev/sda1 on /boot/efi type vfat (rw,relatime,fmask=0077,dmask=0077,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro)

[root@localhost]# du -sh / 2> /dev/null
346G    /

[root@localhost]# btrfs fi df /
Data, single: total=506.52GiB, used=506.51GiB
System, DUP: total=8.00MiB, used=80.00KiB
Metadata, DUP: total=4.00GiB, used=2.71GiB
GlobalReserve, single: total=512.00MiB, used=0.00B

[root@localhost]# btrfs fi usage /
Overall:
    Device size:         514.53GiB
    Device allocated:        514.53GiB
    Device unallocated:        1.03MiB
    Device missing:          0.00B
    Used:            511.92GiB
    Free (estimated):          5.31MiB  (min: 5.31MiB)
    Free (statfs, df):         5.31MiB
    Data ratio:               1.00
    Metadata ratio:           2.00
    Global reserve:      512.00MiB  (used: 0.00B)
    Multiple profiles:              no

Data,single: Size:506.52GiB, Used:506.51GiB (100.00%)
   /dev/sda4     506.52GiB

Metadata,DUP: Size:4.00GiB, Used:2.71GiB (67.64%)
   /dev/sda4       8.00GiB

System,DUP: Size:8.00MiB, Used:80.00KiB (0.98%)
   /dev/sda4      16.00MiB

Unallocated:
   /dev/sda4       1.03MiB

修正する:

[root@localhost]# echo "     Total   Exclusive  Set shared  Filename"; find . -maxdepth 1 -type d | grep './' | xargs -I{} btrfs filesystem du -s {} 2> /dev/null | grep -v 'Total'
     Total   Exclusive  Set shared  Filename
 266.01GiB    67.92GiB   189.58GiB  ./home
  64.89GiB     7.96GiB    56.93GiB  ./var
 111.59MiB    34.20MiB    77.39MiB  ./boot
   6.76MiB     2.52MiB     3.79MiB  ./etc
     0.00B       0.00B       0.00B  ./mnt
   1.06GiB   113.59MiB   582.69MiB  ./opt
     0.00B       0.00B       0.00B  ./srv
   8.77GiB     5.28GiB     2.34GiB  ./usr

[root@localhost]# btrfs subvolume list -t --sort=path /
ID  gen top level   path    
--  --- ---------   ----    
815 235310  5       @
259 235014  5       @cache
814 235315  5       @home
260 235315  5       @log
450 233611  5       timeshift-btrfs/snapshots/2021-10-18_19-59-20/@
451 5639    5       timeshift-btrfs/snapshots/2021-10-18_19-59-20/@home
536 233611  5       timeshift-btrfs/snapshots/2021-11-23_22-48-30/@
537 13984   5       timeshift-btrfs/snapshots/2021-11-23_22-48-30/@home
545 233611  5       timeshift-btrfs/snapshots/2021-12-12_18-12-40/@
546 17778   5       timeshift-btrfs/snapshots/2021-12-12_18-12-40/@home
257 233611  5       timeshift-btrfs/snapshots/2022-05-02_13-10-31/@
258 229392  5       timeshift-btrfs/snapshots/2022-05-02_13-10-31/@home
894 233611  5       timeshift-btrfs/snapshots/2022-06-08_20-38-08/@
895 215821  5       timeshift-btrfs/snapshots/2022-06-08_20-38-08/@home
896 233611  5       timeshift-btrfs/snapshots/2022-06-08_21-09-00/@
897 215918  5       timeshift-btrfs/snapshots/2022-06-08_21-09-00/@home
923 233611  5       timeshift-btrfs/snapshots/2022-06-28_19-06-50/@
924 229388  5       timeshift-btrfs/snapshots/2022-06-28_19-06-50/@home

[root@localhost]# timeshift --list
Mounted '/dev/sda4' at '/run/timeshift/3351/backup'
Device : /dev/sda4
UUID   : d0a8bc03-a8d9-470e-8868-ec49b1d4f9dc
Path   : /run/timeshift/3351/backup
Mode   : BTRFS
Status : OK
7 snapshots, 2.3 GB free

Num     Name                 Tags  Description    
------------------------------------------------------------------------------
0    >  2021-10-18_19-59-20  O     {timeshift-autosnap} {created before upgrade}     
1    >  2021-11-23_22-48-30  O     {timeshift-autosnap} {created before upgrade}
2    >  2021-12-12_18-12-40  O     {timeshift-autosnap} {created before upgrade}
3    >  2022-05-02_13-10-31  O     {timeshift-autosnap} {created before upgrade}
4    >  2022-06-08_20-38-08  O     {timeshift-autosnap} {created before upgrade}    
5    >  2022-06-08_21-09-00  O     {timeshift-autosnap} {created before upgrade}    
6    >  2022-06-28_19-06-50  O     {timeshift-autosnap} {created before upgrade}    


Found stale mount for device '/dev/sda4' at path '/run/timeshift/3351/backup'
Unmounted successfully

アップロード日: 2022 年 7 月 17 日:

ここに画像の説明を入力してください。

[root@localhost]# btrfs filesystem du -s / 2> /dev/null
     Total   Exclusive  Set shared  Filename
 340.59GiB    81.30GiB   249.14GiB  /

511.92GiBが何で構成されているかどうかはどうすればわかりますか?

[root@localhost]# btrfs fi usage /
Overall:
    Device size:         514.53GiB
    Device allocated:        514.53GiB
    Device unallocated:        1.03MiB
    Device missing:          0.00B
    Used:            511.92GiB

22年7月23日修正:

一部を削除しました時間の移動スナップショット以降に使用されるディスク容量が減り、次のデータが表示されます。

% # df -h | grep '/dev/s'
/dev/sda4          515G         393G  118G           77% /
tmpfs              7,8G          22M  7,8G            1% /dev/shm
/dev/sda4          515G         393G  118G           77% /var/cache
/dev/sda4          515G         393G  118G           77% /var/log
/dev/sda4          515G         393G  118G           77% /home
/dev/sda1          996M         1,5M  995M            1% /boot/efi
/dev/sda4          515G         393G  118G           77% /mnt/sda4

% btrfs filesystem df -h /
Data, single: total=439.01GiB, used=388.90GiB
System, DUP: total=8.00MiB, used=80.00KiB
Metadata, DUP: total=4.00GiB, used=1.49GiB
GlobalReserve, single: total=512.00MiB, used=0.00B

% mkdir /mnt/sda4 && mount -o subvol=/ /dev/sda4 /mnt/sda4 && btdu /mnt/sda4
--- /<SINGLE>/<DATA> -------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  ~572.9 KiB [          ]  <NO_INODE>
  ~111.2 MiB [          ] /<ROOT_TREE>
   ~50.1 GiB [#         ]  <SLACK>
   ~18.4 GiB [          ] /<UNREACHABLE>
   ~62.7 GiB [##        ] /@
   ~6.26 GiB [          ] /@cache
  ~284.5 GiB [##########] /@home
  ~480.8 MiB [          ] /@log
   ~16.4 GiB [          ] /timeshift-btrfs

--- Details: ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
- Full path: /mnt/sda4
- Average query duration: 0.0003639 seconds
- Represented size: ~439.0 GiB (68296505 samples), ±10.1 MiB
- Logical offsets: ..., 485646549606, 442831113925, 525544520914

--- Explanation:
This node holds samples from chunks in the DATA block group, which mostly contains file data.

一般的に言えば、いくつかのスナップショットを削除すると便利です。時間の移動使用中のディスク容量を表示します。添付のスクリーンショット: ここに画像の説明を入力してください。

残念ながら、双方向上記の結論に示すように、388Gbの占有ディスク領域を構成する要素についての質問に対する回答はありません。

--- /<SINGLE>/<DATA> -------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  ~572.9 KiB [          ]  <NO_INODE>
  ~111.2 MiB [          ] /<ROOT_TREE>
   ~50.1 GiB [#         ]  <SLACK>
   ~18.4 GiB [          ] /<UNREACHABLE>
   ~62.7 GiB [##        ] /@
   ~6.26 GiB [          ] /@cache
  ~284.5 GiB [##########] /@home
  ~480.8 MiB [          ] /@log
   ~16.4 GiB [          ] /timeshift-btrfs

--- Details: ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
- Full path: /mnt/sda4
- Average query duration: 0.0003639 seconds
- Represented size: ~439.0 GiB (68296505 samples), ±10.1 MiB
- Logical offsets: ..., 485646549606, 442831113925, 525544520914

% echo "62.7+6.26+284.5+0.48+16.4"|bc
370.34

おそらく問題は双方向おおよその結果を提供しますか?私はプログラムが終了するのを待たずに数分間走った。

ベストアンサー1

双方向btrfs 空間使用量を視覚的に表示するのに役立つツールです。

--- /RAID0/DATA -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    ~1.5 GiB [          ] /<ERROR>
   ~20.7 MiB [          ] /<UNREACHABLE>
   ~76.4 GiB [          ] /Something
    ~1.0 TiB [##        ] /Something else
  ~273.9 GiB [          ] /Nothing
  ~154.9 MiB [          ] /Private
    ~4.7 TiB [##########] /Linux ISOs
  ~173.9 GiB [          ] /Snapshots                                                                                                                                                                                   
   ~31.8 GiB [          ] /tmp

--- Details: ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
- Full path: /mnt/data
- Average query duration: 0.0004393 seconds
- Represented size: ~6.3 TiB (1929378 samples), ±539.9 MiB
- Logical offsets: ..., 5037530244057, 1797729456912, 5371666300696

--- Explanation:
This node holds samples from chunks in the DATA block group, which mostly contains file data.

あなたのスペースがこのスナップショットに使用されている可能性があります。古いファイルの一部を削除して、後で削除されたファイルのスペースを解放します。

おすすめ記事