좋은 오후에요!
를 통해 파일에 쓰고 있는데 rsync
여유 디스크 공간이 충분하지만 btrfs를 사용하고 있는데 btrfs에 여유 공간이 소진된 것으로 표시됩니다. 이 상황을 처리하는 방법을 알려주실 수 있나요? 불필요한 파일을 삭제했지만 도움이 되지 않았습니다.
시스템을 다시 작동시키는 방법을 알려주실 수 있나요? du 유틸리티의 출력으로 판단하면 약 150GB 정도 남아 있어야 합니다.
추가 정보:
❯ 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.
귀하의 공간이 이 스냅샷에 사용되었을 수 있습니다. 이전 파일 중 일부를 삭제하여 이후 삭제된 파일을 위한 공간을 확보하세요.