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-1126666

Pro West's questions

Martin Hope
Pro West
Asked: 2025-01-30 20:25:27 +0800 CST

即使添加新磁盘后,RAID1 NAS 驱动器仍报告设备上没有剩余空间

  • 7

我的 NAS 驱动器出现问题,报告设备上没有剩余空间。

经过检查,我发现mdadm报告称文件系统降级是因为两个磁盘中的一个发生故障。我更换了磁盘并重建了阵列,重建过程在 24 小时后完成。

df等的所有输出都mdadm表明文件系统是健康的,并且应该有 1.6 TB 的可用空间。

但是尝试保存一个文件,即使是一个小文件也会导致设备上没有剩余空间。

诊断输出如下。RAID1 文件系统安装在 上/mnt/pools/A/A0。

空间检查:

df -h
Filesystem            Size  Used Avail Use% Mounted on
rootfs                 50M  3.0M   48M   6% /
/dev/root.old         6.5M  2.1M  4.4M  33% /initrd
none                   50M  3.0M   48M   6% /
/dev/md0_vg/BFDlv     4.0G  624M  3.2G  17% /boot
/dev/loop0            592M  538M   54M  91% /mnt/apps
/dev/loop1            4.9M  2.2M  2.5M  47% /etc
/dev/loop2            260K  260K     0 100% /oem
tmpfs                 122M     0  122M   0% /mnt/apps/lib/init/rw
tmpfs                 122M     0  122M   0% /dev/shm
/dev/mapper/md0_vg-vol1
                       16G  1.5G   15G  10% /mnt/system
/dev/mapper/5244dd0f_vg-lv58141b0d
                      3.7T  2.0T  1.7T  55% /mnt/pools/A/A0

i 节点检查:

df -ih
Filesystem            Inodes   IUsed   IFree IUse% Mounted on
rootfs                   31K     565     30K    2% /
/dev/root.old           1.7K     130    1.6K    8% /initrd
none                     31K     565     30K    2% /
/dev/md0_vg/BFDlv       256K      20    256K    1% /boot
/dev/loop0               25K     25K      11  100% /mnt/apps
/dev/loop1              1.3K    1.1K     152   88% /etc
/dev/loop2                21      21       0  100% /oem
tmpfs                    31K       4     31K    1% /mnt/apps/lib/init/rw
tmpfs                    31K       1     31K    1% /dev/shm
/dev/mapper/md0_vg-vol1
                         17M    9.7K     16M    1% /mnt/system
/dev/mapper/5244dd0f_vg-lv58141b0d
                        742M    2.6M    739M    1% /mnt/pools/A/A0

RAID 状态:

mdadm --detail /dev/md1
/dev/md1:
        Version : 01.00
  Creation Time : Mon Mar  7 08:45:49 2011
     Raid Level : raid1
     Array Size : 3886037488 (3706.01 GiB 3979.30 GB)
  Used Dev Size : 7772074976 (7412.03 GiB 7958.60 GB)
   Raid Devices : 2
  Total Devices : 2
Preferred Minor : 1
    Persistence : Superblock is persistent

    Update Time : Thu Jan 30 03:16:36 2025
          State : clean
 Active Devices : 2
Working Devices : 2
 Failed Devices : 0
  Spare Devices : 0

           Name : ix2-200-DC386F:1
           UUID : 8a192f2c:9829df88:a6961d81:20478f62
         Events : 365739

    Number   Major   Minor   RaidDevice State
       3       8       18        0      active sync   /dev/sdb2
       2       8        2        1      active sync   /dev/sda2

分区:

sfdisk -l /dev/sda

WARNING: GPT (GUID Partition Table) detected on '/dev/sda'! The util sfdisk doesn't support GPT. Use GNU Parted.


Disk /dev/sda: 486401 cylinders, 255 heads, 63 sectors/track
Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0

   Device Boot Start     End   #cyls    #blocks   Id  System
/dev/sda1          0+      -       0- 2147483647+  ee  EFI GPT
        start: (c,h,s) expected (0,0,2) found (0,0,1)
/dev/sda2          0       -       0          0    0  Empty
/dev/sda3          0       -       0          0    0  Empty
/dev/sda4          0       -       0          0    0  Empty



sfdisk -l /dev/sdb

WARNING: GPT (GUID Partition Table) detected on '/dev/sdb'! The util sfdisk doesn't support GPT. Use GNU Parted.


Disk /dev/sdb: 486401 cylinders, 255 heads, 63 sectors/track
Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0

   Device Boot Start     End   #cyls    #blocks   Id  System
/dev/sdb1          0+      -       0- 2147483647+  ee  EFI GPT
        start: (c,h,s) expected (0,0,2) found (0,0,1)
/dev/sdb2          0       -       0          0    0  Empty
/dev/sdb3          0       -       0          0    0  Empty
/dev/sdb4          0       -       0          0    0  Empty

pvs、lvs、vgs 输出:

pvs
  PV         VG          Fmt  Attr PSize  PFree
  /dev/md0   md0_vg      lvm2 a-   20.01G    0 
  /dev/md1   5244dd0f_vg lvm2 a-    3.62T    0 


lvs
  LV         VG          Attr   LSize  Origin Snap%  Move Log Copy%  Convert
  lv58141b0d 5244dd0f_vg -wi-ao  3.62T                                      
  BFDlv      md0_vg      -wi-ao  4.00G                                      
  vol1       md0_vg      -wi-ao 16.01G 


vgs
  VG          #PV #LV #SN Attr   VSize  VFree
  5244dd0f_vg   1   1   0 wz--n-  3.62T    0 
  md0_vg        1   2   0 wz--n- 20.01G    0 

lvdisplay、pvdisplay 和 vgdisplay 输出:

lvdisplay 
  --- Logical volume ---
  LV Name                /dev/5244dd0f_vg/lv58141b0d
  VG Name                5244dd0f_vg
  LV UUID                hLUJyo-C8ge-1SRc-gvdg-dlLn-5A7e-D55XeO
  LV Write Access        read/write
  LV Status              available
  # open                 1
  LV Size                3.62 TB
  Current LE             948739
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:2
   
  --- Logical volume ---
  LV Name                /dev/md0_vg/BFDlv
  VG Name                md0_vg
  LV UUID                N48AUD-nucp-gP18-wmQi-Ym12-3G1L-7wE1jd
  LV Write Access        read/write
  LV Status              available
  # open                 1
  LV Size                4.00 GB
  Current LE             1024
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:0
   
  --- Logical volume ---
  LV Name                /dev/md0_vg/vol1
  VG Name                md0_vg
  LV UUID                73CtS1-b4KB-cLrG-hgUz-Qsli-Mlte-QhaUzy
  LV Write Access        read/write
  LV Status              available
  # open                 1
  LV Size                16.01 GB
  Current LE             4098
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:1


pvdisplay 
  --- Physical volume ---
  PV Name               /dev/md1
  VG Name               5244dd0f_vg
  PV Size               3.62 TB / not usable 2.30 MB
  Allocatable           yes (but full)
  PE Size (KByte)       4096
  Total PE              948739
  Free PE               0
  Allocated PE          948739
  PV UUID               mdm9UZ-dhcm-T26Z-LRAB-Pevo-4y7t-OHRDRr
   
  --- Physical volume ---
  PV Name               /dev/md0
  VG Name               md0_vg
  PV Size               20.01 GB / not usable 1.06 MB
  Allocatable           yes (but full)
  PE Size (KByte)       4096
  Total PE              5122
  Free PE               0
  Allocated PE          5122
  PV UUID               AGH7Ci-jGbF-bLsB-pMKr-IttE-7GtR-e5Rf9k


vgdisplay 
  --- Volume group ---
  VG Name               5244dd0f_vg
  System ID             
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  8
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                1
  Open LV               1
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               3.62 TB
  PE Size               4.00 MB
  Total PE              948739
  Alloc PE / Size       948739 / 3.62 TB
  Free  PE / Size       0 / 0   
  VG UUID               FB2tzp-8Gr2-6Dlj-9Dck-Tyc4-Gxx5-HHIsBD
   
  --- Volume group ---
  VG Name               md0_vg
  System ID             
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  3
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                2
  Open LV               2
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               20.01 GB
  PE Size               4.00 MB
  Total PE              5122
  Alloc PE / Size       5122 / 20.01 GB
  Free  PE / Size       0 / 0   
  VG UUID               EA3tJR-nVdm-0Dcf-YtBE-t1Qj-peHc-Sh0zXe
   

我不知道下一步该做什么。

更新:

该文件系统下的目录数为 280,286。

$ cd /mnt/pools/A/A0/
$ ls
Backups  Documents  Movies  Music  Pictures  QuikTransfer  stls_userdata  TimeMachine
$ find . -type d | wc -l
280286

Update2-mount 命令输出:

mount
rootfs on / type rootfs (rw)
/dev/root.old on /initrd type ext2 (rw,relatime,errors=continue)
none on / type tmpfs (rw,relatime,size=51200k,nr_inodes=31083)
/dev/md0_vg/BFDlv on /boot type ext2 (rw,noatime,errors=continue)
/dev/loop0 on /mnt/apps type ext2 (ro,relatime)
/dev/loop1 on /etc type ext2 (rw,sync,noatime)
/dev/loop2 on /oem type cramfs (ro,relatime)
proc on /proc type proc (rw,relatime)
none on /proc/bus/usb type usbfs (rw,relatime)
none on /proc/fs/nfsd type nfsd (rw,relatime)
none on /sys type sysfs (rw,relatime)
devpts on /dev/pts type devpts (rw,relatime,gid=5,mode=620)
tmpfs on /mnt/apps/lib/init/rw type tmpfs (rw,nosuid,relatime,mode=755)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev,relatime)
/dev/mapper/md0_vg-vol1 on /mnt/system type xfs (rw,noatime,attr2,logbufs=8,noquota)
/dev/mapper/5244dd0f_vg-lv58141b0d on /mnt/pools/A/A0 type xfs (rw,noatime,attr2,nobarrier,logbufs=8,noquota)

失败的示例命令:

mount > /mnt/pools/A/A0/Documents/mount.txt
-sh: /mnt/pools/A/A0/Documents/mount.txt: No space left on device
mdadm
  • 1 个回答
  • 97 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

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve