我遇到了一个奇怪的情况,我的根分区 (/dev/sda9) 也被挂载(在 /mnt/sda9),导致分区已满。这是一个测试分区,所以我会覆盖它,但我很想知道是否有人对此有任何见解。没有 fstab 条目将 /dev/sda9 挂载到除根之外的任何地方。以下是一些代码片段 -
$ df -h
Filesystem Size Used Avail Use% Mounted on
udev 3.8G 0 3.8G 0% /dev
tmpfs 766M 40M 727M 6% /run
/dev/sda9 20G 20G 0 100% /
tmpfs 3.8G 4.0K 3.8G 1% /dev/shm
tmpfs 5.0M 4.0K 5.0M 1% /run/lock
tmpfs 3.8G 0 3.8G 0% /sys/fs/cgroup
/dev/sdb1 1.8T 1.8T 4.7G 100% /media/2TB-01
/dev/sdc1 2.8T 2.8T 18G 100% /media/XBMC
/dev/sda5 621G 577G 45G 93% /mnt/Data
tmpfs 766M 0 766M 0% /run/user/1000
# sudo du -hsx /* | sort -rh | head -n 40
7.3G /mnt
6.4G /var
3.7G /usr
1.1G /lib
1.1G /home
108M /boot
13M /sbin
12M /etc
12M /bin
5.8M /lib32
4.3M /media
2.9M /root
88K /run
36K /tmp
16K /lost+found
8.0K /srv
8.0K /snap
...
$ sudo du -hsx /mnt/* | sort -rh | head -n 35
577G /mnt/Data
7.3G /mnt/sda9
20K /mnt/boot-sav
4.0K /mnt/sda8
4.0K /mnt/sda6
4.0K /mnt/sandisk
$ ls /mnt/sda9
bin cdrom dev etc home initrd.img initrd.img.old lib lib32 lib64 lost+found opt proc resolv.conf root run sbin snap srv sys usr var vmlinuz vmlinuz.old
# sudo umount /mnt/sda9
umount: /mnt/sda9: not mounted.
# sudo umount /dev/sda9
# ls /mnt/sda9
bin cdrom dev etc home initrd.img initrd.img.old lib lib32 lib64 lost+found opt proc resolv.conf root run sbin snap srv sys usr var vmlinuz vmlinuz.old
$ cat /proc/mounts
sysfs /sys sysfs rw,nosuid,nodev,noexec,relatime 0 0
proc /proc proc rw,nosuid,nodev,noexec,relatime 0 0
udev /dev devtmpfs rw,nosuid,relatime,size=3898600k,nr_inodes=974650,mode=755 0 0
devpts /dev/pts devpts rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000 0 0
tmpfs /run tmpfs rw,nosuid,noexec,relatime,size=784212k,mode=755 0 0
/dev/sda9 / ext4 rw,relatime,errors=remount-ro,data=ordered 0 0
securityfs /sys/kernel/security securityfs rw,nosuid,nodev,noexec,relatime 0 0
tmpfs /dev/shm tmpfs rw,nosuid,nodev 0 0
tmpfs /run/lock tmpfs rw,nosuid,nodev,noexec,relatime,size=5120k 0 0
tmpfs /sys/fs/cgroup tmpfs ro,nosuid,nodev,noexec,mode=755 0 0
cgroup /sys/fs/cgroup/unified cgroup2 rw,nosuid,nodev,noexec,relatime,nsdelegate 0 0
cgroup /sys/fs/cgroup/systemd cgroup rw,nosuid,nodev,noexec,relatime,xattr,name=systemd 0 0
pstore /sys/fs/pstore pstore rw,nosuid,nodev,noexec,relatime 0 0
cgroup /sys/fs/cgroup/memory cgroup rw,nosuid,nodev,noexec,relatime,memory 0 0
cgroup /sys/fs/cgroup/blkio cgroup rw,nosuid,nodev,noexec,relatime,blkio 0 0
cgroup /sys/fs/cgroup/cpu,cpuacct cgroup rw,nosuid,nodev,noexec,relatime,cpu,cpuacct 0 0
cgroup /sys/fs/cgroup/devices cgroup rw,nosuid,nodev,noexec,relatime,devices 0 0
cgroup /sys/fs/cgroup/hugetlb cgroup rw,nosuid,nodev,noexec,relatime,hugetlb 0 0
cgroup /sys/fs/cgroup/pids cgroup rw,nosuid,nodev,noexec,relatime,pids 0 0
cgroup /sys/fs/cgroup/net_cls,net_prio cgroup rw,nosuid,nodev,noexec,relatime,net_cls,net_prio 0 0
cgroup /sys/fs/cgroup/perf_event cgroup rw,nosuid,nodev,noexec,relatime,perf_event 0 0
cgroup /sys/fs/cgroup/cpuset cgroup rw,nosuid,nodev,noexec,relatime,cpuset 0 0
cgroup /sys/fs/cgroup/rdma cgroup rw,nosuid,nodev,noexec,relatime,rdma 0 0
cgroup /sys/fs/cgroup/freezer cgroup rw,nosuid,nodev,noexec,relatime,freezer 0 0
systemd-1 /proc/sys/fs/binfmt_misc autofs rw,relatime,fd=27,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=1594 0 0
mqueue /dev/mqueue mqueue rw,relatime 0 0
debugfs /sys/kernel/debug debugfs rw,relatime 0 0
hugetlbfs /dev/hugepages hugetlbfs rw,relatime,pagesize=2M 0 0
configfs /sys/kernel/config configfs rw,relatime 0 0
fusectl /sys/fs/fuse/connections fusectl rw,relatime 0 0
/dev/sdb1 /media/2TB-01 ext4 rw,relatime,data=ordered 0 0
/dev/sdc1 /media/XBMC xfs rw,nosuid,nodev,noexec,noatime,nodiratime,attr2,inode64,allocsize=524288k,logbufs=8,noquota 0 0
/dev/sda5 /mnt/Data ext3 rw,relatime,data=ordered 0 0
tmpfs /run/user/1000 tmpfs rw,nosuid,nodev,relatime,size=784208k,mode=700,uid=1000,gid=1000 0 0
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc nodev,noexec,nosuid 0 0
# / was on /dev/sda9 during installation
### UUID=0b512eac-ce71-4d31-8756-ad25f01a50b3 / ext4 errors=remount-ro 0 1
### UUID=08085bcd-cc21-4ab9-8420-508bc3590516 / ext4 errors=remount-ro 0 1
LABEL=sda9 / ext4 errors=remount-ro 0 1
# swap was on /dev/sda2 during installation
UUID=2a95d85a-45fe-4584-88dd-0ee20e651ec5 none swap sw 0 0
# /dev/sda5 = Data
LABEL=sda-data-600gb /mnt/Data ext3 defaults,relatime,user_xattr 0 0
#/dev/sda5 /mnt/Data ext3 defaults,relatime,user_xattr 0 0
#UUID=37971286-b8d3-4a1b-9f94-4008288fed6d
# Dropbox automatically adds user_xattr to the partition that holds the Dropbox folder to enable extended file attributes
# relatime means that file access times are only updated when the file is modified, not read
# /dev/sda6 = home
#LABEL=home /home ext3 defaults,relatime 0 0
#/dev/sda6 /home ext3 defaults,relatime,user_xattr 0 0
# Dropbox automatically adds user_xattr to the partition that holds the Dropbox folder to enable extended file attributes
# relatime means that file access times are only updated when the file is modified, not each time it is read
#1TB-01
##### LABEL=HTPC_MythTV /media/MythTV_1TB xfs user,nofail,noatime,nodiratime,allocsize=512m,logbufs=8 0 0
#UUID=76f3823a-81dc-45c9-a0b7-2bc6c3beb2f8 /media/1TB-01 xfs noatime,nodiratime,allocsize=512m,logbufs=8 0 0
#removed defaults, relatime
# XBMC
# This next line is usually the only uncommented one for this volume.
LABEL=XBMC-3TB /media/XBMC xfs user,nofail,noatime,nodiratime,allocsize=512m,logbufs=8 0 0
# MYTHTV
#LABEL=3TB01P1-Myth /media/MythTV xfs noatime,nofail,nodiratime,allocsize=512m,logbufs=8 0 0
# 2TB-01
LABEL=2TB-01 /media/2TB-01 ext4 defaults,nofail
# Arch /dev/sda8 on /mnt/sda8
#/dev/sda8 /mnt/sda8 ext3 defaults,relatime,user_xattr 0 0
# Arch /dev/sda6 (HOME/BEN) on /dev/sda6
#/dev/sda6 /mnt/sda6 ext3 defaults,relatime,user_xattr 0 0
#Sandisk backup
### LABEL=ROOT /mnt/sandisk ext4 defaults,nofail
# blkid
/dev/sda1: LABEL="/grub" UUID="1555c5bb-a9a5-4da9-9274-fdee304ec3e8" SEC_TYPE="ext2" TYPE="ext3" PARTUUID="0000b084-01"
/dev/sda2: UUID="2a95d85a-45fe-4584-88dd-0ee20e651ec5" TYPE="swap" PARTUUID="0000b084-02"
/dev/sda5: LABEL="sda-data-600gb" UUID="37971286-b8d3-4a1b-9f94-4008288fed6d" TYPE="ext3" PARTUUID="0000b084-05"
/dev/sda6: LABEL="home" UUID="559c6f3d-8891-414b-965c-1578f06bbf5b" SEC_TYPE="ext2" TYPE="ext3" PARTUUID="0000b084-06"
/dev/sda7: LABEL="mini" UUID="6b2a25de-98c2-425b-aace-1d1fcc24cb32" TYPE="ext4" PARTUUID="0000b084-07"
/dev/sda8: LABEL="mini" UUID="4ce44df5-64f0-4b1f-90cb-4cff9b3f55f2" TYPE="ext4" PARTUUID="0000b084-08"
/dev/sda9: LABEL="sda9" UUID="08085bcd-cc21-4ab9-8420-508bc3590516" TYPE="ext4" PARTUUID="0000b084-09"
/dev/sdb1: LABEL="2TB-01" UUID="c23cf34b-9513-4461-a718-4b9d06f60e4b" TYPE="ext3" PARTUUID="00057fb0-01"
/dev/sdc1: LABEL="XBMC-3TB" UUID="571b07eb-40c2-4d87-9d19-44f72de467fc" TYPE="xfs" PARTUUID="eb244e9e-690a-4f0e-a31d-aa9fc03eaf86"
/dev/sdd1: LABEL="ROOT" UUID="81c098a4-45d9-438e-8ad5-d262e8e8f740" TYPE="ext4" PARTUUID="edacc4dc-01"
$ dmesg | grep mount
[ 6.247070] EXT4-fs (sda9): mounted filesystem with ordered data mode. Opts: (null)
[ 11.940721] systemd[1]: Set up automount Arbitrary Executable File Formats File System Automount Point.
[ 12.432598] EXT4-fs (sda9): re-mounted. Opts: errors=remount-ro
[ 38.452416] EXT4-fs (sdb1): warning: maximal mount count reached, running e2fsck is recommended
[ 38.818369] EXT4-fs (sdb1): mounted filesystem with ordered data mode. Opts: (null)
[ 39.575054] XFS (sdc1): Ending clean mount
[ 39.603079] EXT4-fs (sda5): mounting ext3 file system using the ext4 subsystem
[ 39.648981] EXT4-fs (sda5): warning: mounting fs with errors, running e2fsck is recommended
[ 40.020530] EXT4-fs (sda5): mounted filesystem with ordered data mode. Opts: user_xattr
$ cat /var/log/syslog | grep sda9
Nov 4 10:57:45 HTPC kernel: [ 1.462557] sda: sda1 sda2 sda4 < sda5 sda6 sda7 sda8 sda9 >
Nov 4 10:57:45 HTPC kernel: [ 6.235204] EXT4-fs (sda9): mounted filesystem with ordered data mode. Opts: (null)
Nov 4 10:57:45 HTPC kernel: [ 12.221009] EXT4-fs (sda9): re-mounted. Opts: errors=remount-ro
Nov 4 11:39:58 HTPC kernel: [ 1.196425] sda: sda1 sda2 sda4 < sda5 sda6 sda7 sda8 sda9 >
Nov 4 11:39:58 HTPC kernel: [ 6.279665] EXT4-fs (sda9): mounted filesystem with ordered data mode. Opts: (null)
Nov 4 11:39:58 HTPC kernel: [ 12.298919] EXT4-fs (sda9): re-mounted. Opts: errors=remount-ro
Nov 4 12:00:01 HTPC CRON[2476]: (root) CMD (rsync -avxHAWX --numeric-ids --exclude-from '/home/ben/Scripts/RsyncRootExcList.txt' / /mnt/sda9 >/dev/null )
$ ls /etc/udev/rules.d/
70-persistent-net.rules
$ sudo cat 70-persistent-net.rules | less
cat: 70-persistent-net.rules: No such file or directory
$ gio mount -li
Drive(0): WDC WD7500AACS-00ZJB0
Type: GProxyDrive (GProxyVolumeMonitorUDisks2)
ids:
unix-device: '/dev/sda'
themed icons: [drive-harddisk] [drive]
symbolic themed icons: [drive-harddisk-symbolic] [drive-symbolic] [drive-harddisk] [drive]
is_removable=0
is_media_removable=0
has_media=1
is_media_check_automatic=1
can_poll_for_media=0
can_eject=0
can_start=0
can_stop=0
start_stop_type=shutdown
sort_key=00coldplug/00fixed/sd____a
Volume(0): mini
Type: GProxyVolume (GProxyVolumeMonitorUDisks2)
ids:
class: 'device'
unix-device: '/dev/sda8'
uuid: '4ce44df5-64f0-4b1f-90cb-4cff9b3f55f2'
label: 'mini'
uuid=4ce44df5-64f0-4b1f-90cb-4cff9b3f55f2
themed icons: [drive-harddisk] [drive]
symbolic themed icons: [drive-harddisk-symbolic] [drive-symbolic] [drive-harddisk] [drive]
can_mount=1
can_eject=0
should_automount=0
sort_key=gvfs.time_detected_usec.1604631000947770
Volume(1): mini
Type: GProxyVolume (GProxyVolumeMonitorUDisks2)
ids:
class: 'device'
unix-device: '/dev/sda7'
uuid: '6b2a25de-98c2-425b-aace-1d1fcc24cb32'
label: 'mini'
uuid=6b2a25de-98c2-425b-aace-1d1fcc24cb32
themed icons: [drive-harddisk] [drive]
symbolic themed icons: [drive-harddisk-symbolic] [drive-symbolic] [drive-harddisk] [drive]
can_mount=1
can_eject=0
should_automount=0
sort_key=gvfs.time_detected_usec.1604631000947857
Volume(2): home
Type: GProxyVolume (GProxyVolumeMonitorUDisks2)
ids:
class: 'device'
unix-device: '/dev/sda6'
uuid: '559c6f3d-8891-414b-965c-1578f06bbf5b'
label: 'home'
uuid=559c6f3d-8891-414b-965c-1578f06bbf5b
themed icons: [drive-harddisk] [drive]
symbolic themed icons: [drive-harddisk-symbolic] [drive-symbolic] [drive-harddisk] [drive]
can_mount=1
can_eject=0
should_automount=0
sort_key=gvfs.time_detected_usec.1604631000947938
Volume(3): /grub
Type: GProxyVolume (GProxyVolumeMonitorUDisks2)
ids:
class: 'device'
unix-device: '/dev/sda1'
uuid: '1555c5bb-a9a5-4da9-9274-fdee304ec3e8'
label: '/grub'
uuid=1555c5bb-a9a5-4da9-9274-fdee304ec3e8
themed icons: [drive-harddisk] [drive]
symbolic themed icons: [drive-harddisk-symbolic] [drive-symbolic] [drive-harddisk] [drive]
can_mount=1
can_eject=0
should_automount=0
sort_key=gvfs.time_detected_usec.1604631000948018
答案1
好的。谢谢。你们已经搞定了——从有关 cron 作业的 syslog 行开始。该 cron 作业不应在 sda9 中运行——它应在我的实时系统 sdd1 中运行——以创建 sda9 的备份。(所有这些输出都是在启动/chroot 到 sda9 时获取的,因为问题就出在那里)。sdd1 crontab 文件已 rsync 到 sda9,因为我没有注释掉 sdd1 crontab 的 sda9 副本中的 rsync 行——并且因为当 crontab 运行 rsync 作业时我已启动到 sda9——sda9 确实将自身复制到了 /mnt/sda9 文件夹中。感谢您的帮助。我现在已经删除了 /mnt/sda9 的内容,注释掉了 sda9 中的 rsync cron 行,并且需要将 cron 文件夹 (/var/spool/cron/crontabs) 添加到 sdd1 中的排除列表中。我如何将标题标记为已解决?