“不会在这里创建文件系统!”

“不会在这里创建文件系统!”

尝试格式化这个/dev/mapper/nvmeVg-var未安装的 LV。见findmnt下文。

 mkfs.ext3 /dev/mapper/nvmeVg-var
mke2fs 1.45.6 (20-Mar-2020)
/dev/mapper/nvmeVg-var contains a ext4 file system
    last mounted on /var on Mon Oct 11 23:18:35 2021
Proceed anyway? (y,N) y
/dev/mapper/nvmeVg-var is apparently in use by the system; will not make a filesystem here!

[root@localhost-live snapshots]# findmnt
TARGET                           SOURCE      FSTYPE     OPTIONS
/                                /dev/mapper/live-rw
│                                            ext4       rw,relatime,seclabel
├─/proc                          proc        proc       rw,nosuid,nodev,noexec,relatime
│ └─/proc/sys/fs/binfmt_misc     systemd-1   autofs     rw,relatime,fd=30,pgrp=1,timeout=0,minproto=5,maxproto=5,direc
│   └─/proc/sys/fs/binfmt_misc   binfmt_misc binfmt_mis rw,nosuid,nodev,noexec,relatime
├─/sys                           sysfs       sysfs      rw,nosuid,nodev,noexec,relatime,seclabel
│ ├─/sys/kernel/security         securityfs  securityfs rw,nosuid,nodev,noexec,relatime
│ ├─/sys/fs/cgroup               cgroup2     cgroup2    rw,nosuid,nodev,noexec,relatime,seclabel,nsdelegate,memory_rec
│ ├─/sys/fs/pstore               pstore      pstore     rw,nosuid,nodev,noexec,relatime,seclabel
│ ├─/sys/firmware/efi/efivars    efivarfs    efivarfs   rw,nosuid,nodev,noexec,relatime
│ ├─/sys/fs/bpf                  none        bpf        rw,nosuid,nodev,noexec,relatime,mode=700
│ ├─/sys/fs/selinux              selinuxfs   selinuxfs  rw,nosuid,noexec,relatime
│ ├─/sys/kernel/debug            debugfs     debugfs    rw,nosuid,nodev,noexec,relatime,seclabel
│ │ └─/sys/kernel/debug/tracing  tracefs     tracefs    rw,nosuid,nodev,noexec,relatime,seclabel
│ ├─/sys/kernel/tracing          tracefs     tracefs    rw,nosuid,nodev,noexec,relatime,seclabel
│ ├─/sys/fs/fuse/connections     fusectl     fusectl    rw,nosuid,nodev,noexec,relatime
│ └─/sys/kernel/config           configfs    configfs   rw,nosuid,nodev,noexec,relatime
├─/dev                           devtmpfs    devtmpfs   rw,nosuid,seclabel,size=32845836k,nr_inodes=8211459,mode=755,i
│ ├─/dev/shm                     tmpfs       tmpfs      rw,nosuid,nodev,seclabel,inode64
│ ├─/dev/pts                     devpts      devpts     rw,nosuid,noexec,relatime,seclabel,gid=5,mode=620,ptmxmode=000
│ ├─/dev/mqueue                  mqueue      mqueue     rw,nosuid,nodev,noexec,relatime,seclabel
│ └─/dev/hugepages               hugetlbfs   hugetlbfs  rw,relatime,seclabel,pagesize=2M
├─/run                           tmpfs       tmpfs      rw,nosuid,nodev,seclabel,size=13150860k,nr_inodes=819200,mode=
│ ├─/run/initramfs/live          /dev/sdf1   iso9660    ro,relatime,nojoliet,check=s,map=n,blocksize=2048
│ ├─/run/media/liveuser/c90f13b9-f228-4051-a586-7b6083f50105
│ │                              /dev/sdb1   ext4       rw,nosuid,nodev,relatime,seclabel
│ ├─/run/media/liveuser/Anaconda /dev/mapper/live-base
│ │                                          ext4       ro,nosuid,nodev,relatime,seclabel
│ ├─/run/user/1000               tmpfs       tmpfs      rw,nosuid,nodev,relatime,seclabel,size=6575428k,nr_inodes=1643
│ │ └─/run/user/1000/gvfs        gvfsd-fuse  fuse.gvfsd rw,nosuid,nodev,relatime,user_id=1000,group_id=1000
│ ├─/run/media/liveuser/d52b3913-2ed2-4142-9309-3fdf641141f0
│ │                              /dev/md127  ext4       rw,nosuid,nodev,relatime,seclabel,stripe=256
│ ├─/run/media/liveuser/disk     /dev/loop0  squashfs   ro,nosuid,nodev,relatime,seclabel
│ └─/run/media/liveuser/66a1a58a-c06f-4407-8d47-1fd4266c6b75
│                                /dev/mapper/centos-root
│                                            xfs        rw,nosuid,nodev,relatime,seclabel,attr2,inode64,logbufs=8,logb
├─/var/lib/nfs/rpc_pipefs        rpc_pipefs  rpc_pipefs rw,relatime
├─/tmp                           tmpfs       tmpfs      rw,nosuid,nodev,seclabel,size=32877144k,nr_inodes=409600,inode
├─/var/tmp                       vartmp      tmpfs      rw,relatime,seclabel,inode64
└─/mnt                           /dev/mapper/centos-home
                                             xfs        rw,relatime,seclabel,attr2,inode64,logbufs=8,logbsize=32k,noqu

[liveuser@localhost-live ~]$ lsblk
NAME            MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT
loop0             7:0    0   1.8G  1 loop  
loop1             7:1    0   7.5G  1 loop  
├─live-rw       253:6    0   7.5G  0 dm    /
└─live-base     253:7    0   7.5G  1 dm    
loop2             7:2    0    32G  0 loop  
└─live-rw       253:6    0   7.5G  0 dm    /
sda               8:0    0 447.1G  0 disk  
├─sda1            8:1    0   200M  0 part  
├─sda2            8:2    0     1G  0 part  
└─sda3            8:3    0 445.9G  0 part  
  ├─centos-swap 253:0    0  31.4G  0 lvm   
  ├─centos-home 253:1    0 364.5G  0 lvm   
  └─centos-root 253:2    0    50G  0 lvm   
sdb               8:16   0 447.1G  0 disk  
└─sdb1            8:17   0 447.1G  0 part  
sdc               8:32   0   1.8T  0 disk  
└─md127           9:127  0   3.6T  0 raid5 
sdd               8:48   0   1.8T  0 disk  
└─md127           9:127  0   3.6T  0 raid5 
sde               8:64   0   1.8T  0 disk  
└─md127           9:127  0   3.6T  0 raid5 
sdf               8:80   1   3.6G  0 disk  
├─sdf1            8:81   1   1.9G  0 part  /run/initramfs/live
├─sdf2            8:82   1   9.9M  0 part  
└─sdf3            8:83   1  20.9M  0 part  
sr0              11:0    1     2K  0 rom   
zram0           252:0    0     8G  0 disk  [SWAP]
nvme1n1         259:0    0 953.9G  0 disk  
├─nvme1n1p1     259:1    0   953M  0 part  
├─nvme1n1p2     259:2    0  46.6G  0 part  
│ ├─nvmeVg-var  253:3    0    44G  0 lvm   
│ └─nvmeVg-home 253:4    0   181G  0 lvm   
├─nvme1n1p3     259:3    0  46.6G  0 part  
│ ├─nvmeVg-home 253:4    0   181G  0 lvm   
│ └─nvmeVg-root 253:5    0   100G  0 lvm   
├─nvme1n1p4     259:4    0  46.6G  0 part  
│ └─nvmeVg-home 253:4    0   181G  0 lvm   
├─nvme1n1p5     259:5    0  46.6G  0 part  
│ └─nvmeVg-home 253:4    0   181G  0 lvm   
├─nvme1n1p6     259:6    0  46.6G  0 part  
│ └─nvmeVg-root 253:5    0   100G  0 lvm   
├─nvme1n1p7     259:7    0  46.6G  0 part  
│ └─nvmeVg-root 253:5    0   100G  0 lvm   
├─nvme1n1p8     259:8    0  46.6G  0 part  
│ └─nvmeVg-home 253:4    0   181G  0 lvm   
├─nvme1n1p9     259:9    0  46.6G  0 part  
├─nvme1n1p10    259:10   0  46.6G  0 part  
├─nvme1n1p11    259:11   0  46.6G  0 part  
└─nvme1n1p12    259:12   0     1G  0 part  
nvme0n1         259:13   0 931.5G  0 disk 

  --- Logical volume ---
  LV Path                /dev/nvmeVg/var
  LV Name                var
  VG Name                nvmeVg
  LV UUID                9WAde0-jcOC-ymG3-petc-cqjX-dBdS-fi4fXM
  LV Write Access        read/write
  LV Creation host, time orcacomputers.orcainbox, 2021-01-25 18:37:42 -0500
  LV Status              available
  # open                 0
  LV Size                44.00 GiB
  Current LE             11264
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:3
   
  --- Logical volume ---
  LV Path                /dev/nvmeVg/home
  LV Name                home
  VG Name                nvmeVg
  LV UUID                zdQoid-kIS8-98bk-BncS-eLvf-fTD8-t8cVQ9
  LV Write Access        read/write
  LV Creation host, time orcacomputers.orcainbox, 2021-01-25 22:53:20 -0500
  LV Status              available
  # open                 0
  LV Size                181.00 GiB
  Current LE             46336
  Segments               7
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:4
   
  --- Logical volume ---
  LV Path                /dev/nvmeVg/root
  LV Name                root
  VG Name                nvmeVg
  LV UUID                NcQmu9-17Kn-yBlu-PrzZ-xcyP-kDjm-afgKYI
  LV Write Access        read/write
  LV Creation host, time orcacomputers.orcainbox, 2021-01-27 00:34:57 -0500
  LV Status              available
  # open                 0
  LV Size                100.00 GiB
  Current LE             25600
  Segments               3
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:5



    [root@localhost-live liveuser]# vgdisplay
      --- Volume group ---
      VG Name               centos
      System ID             
      Format                lvm2
      Metadata Areas        1
      Metadata Sequence No  6
      VG Access             read/write
      VG Status             resizable
      MAX LV                0
      Cur LV                3
      Open LV               0
      Max PV                0
      Cur PV                1
      Act PV                1
      VG Size               445.93 GiB
      PE Size               4.00 MiB
      Total PE              114159
      Alloc PE / Size       114158 / <445.93 GiB
      Free  PE / Size       1 / 4.00 MiB
      VG UUID               h3Rhh8-1jGr-ylLe-Hagr-vJ8h-fibH-PxYOye
       
      --- Volume group ---
      VG Name               nvmeVg
      System ID             
      Format                lvm2
      Metadata Areas        7
      Metadata Sequence No  11
      VG Access             read/write
      VG Status             resizable
      MAX LV                0
      Cur LV                3
      Open LV               0
      Max PV                0
      Cur PV                7
      Act PV                7
      VG Size               <325.94 GiB
      PE Size               4.00 MiB
      Total PE              83440
      Alloc PE / Size       83200 / 325.00 GiB
      Free  PE / Size       240 / 960.00 MiB
      VG UUID               sM2ZQz-ke7H-543U-EylK-pO25-0G6S-jhV57f

       
    [root@localhost-live liveuser]# pvdisplay
      --- Physical volume ---
      PV Name               /dev/sda3
      VG Name               centos
      PV Size               445.93 GiB / not usable 0   
      Allocatable           yes 
      PE Size               4.00 MiB
      Total PE              114159
      Free PE               1
      Allocated PE          114158
      PV UUID               OjAFDa-Il7s-Vj0h-Lian-culw-97um-9GYjOo
       
      --- Physical volume ---
      PV Name               /dev/nvme1n1p2
      VG Name               nvmeVg
      PV Size               <46.57 GiB / not usable 3.00 MiB
      Allocatable           yes 
      PE Size               4.00 MiB
      Total PE              11920
      Free PE               240
      Allocated PE          11680
      PV UUID               M1em0l-TY0y-ZuIt-DK2i-0yJp-OHNz-7RfupC
       
      --- Physical volume ---
      PV Name               /dev/nvme1n1p3
      VG Name               nvmeVg
      PV Size               <46.57 GiB / not usable 3.00 MiB
      Allocatable           yes (but full)
      PE Size               4.00 MiB
      Total PE              11920
      Free PE               0
      Allocated PE          11920
      PV UUID               qkaPsI-FLzs-wt4Y-bnhm-BpGK-aOcR-fheulP
       
      --- Physical volume ---
      PV Name               /dev/nvme1n1p4
      VG Name               nvmeVg
      PV Size               <46.57 GiB / not usable 3.00 MiB
      Allocatable           yes (but full)
      PE Size               4.00 MiB
      Total PE              11920
      Free PE               0
      Allocated PE          11920
      PV UUID               CTkIFV-Ebvf-Ps5w-rysY-s7U0-VLhs-6jLVRV
       
      --- Physical volume ---
      PV Name               /dev/nvme1n1p5
      VG Name               nvmeVg
      PV Size               <46.57 GiB / not usable 3.00 MiB
      Allocatable           yes (but full)
      PE Size               4.00 MiB
      Total PE              11920
      Free PE               0
      Allocated PE          11920
      PV UUID               Sjii2Q-zkwB-9Nhb-0g6o-4rt3-O9gy-4CMtEI
       
      --- Physical volume ---
      PV Name               /dev/nvme1n1p6
      VG Name               nvmeVg
      PV Size               <46.57 GiB / not usable 3.00 MiB
      Allocatable           yes (but full)
      PE Size               4.00 MiB
      Total PE              11920
      Free PE               0
      Allocated PE          11920
      PV UUID               QLUYbk-TzNY-RZHz-ck60-gbqA-kPtk-QT2Tm4
       
      --- Physical volume ---
      PV Name               /dev/nvme1n1p7
      VG Name               nvmeVg
      PV Size               <46.57 GiB / not usable 3.00 MiB
      Allocatable           yes (but full)
      PE Size               4.00 MiB
      Total PE              11920
      Free PE               0
      Allocated PE          11920
      PV UUID               nQg41G-8A3m-wMog-LBzJ-U09n-W1md-lgVEdQ
       
      --- Physical volume ---
      PV Name               /dev/nvme1n1p8
      VG Name               nvmeVg
      PV Size               <46.57 GiB / not usable 3.00 MiB
      Allocatable           yes (but full)
      PE Size               4.00 MiB
      Total PE              11920
      Free PE               0
      Allocated PE          11920
      PV UUID               D5HOGp-nLA3-zypn-edIj-uPon-Pzrj-N6JcB5
       
      "/dev/nvme1n1p1" is a new physical volume of "953.00 MiB"
      --- NEW Physical volume ---
      PV Name               /dev/nvme1n1p1
      VG Name               
      PV Size               953.00 MiB
      Allocatable           NO
      PE Size               0   
      Total PE              0
      Free PE               0
      Allocated PE          0
      PV UUID               CjuOUt-h2bH-EjCp-ALwd-c8BW-ZckJ-cpB322
       
      "/dev/nvme1n1p10" is a new physical volume of "<46.57 GiB"
      --- NEW Physical volume ---
      PV Name               /dev/nvme1n1p10
      VG Name               
      PV Size               <46.57 GiB
      Allocatable           NO
      PE Size               0   
      Total PE              0
      Free PE               0
      Allocated PE          0
      PV UUID               0XEQEc-pHGc-2B02-d4lp-581f-ZMYv-vKTgpG
       
      "/dev/nvme1n1p11" is a new physical volume of "<46.57 GiB"
      --- NEW Physical volume ---
      PV Name               /dev/nvme1n1p11
      VG Name               
      PV Size               <46.57 GiB
      Allocatable           NO
      PE Size               0   
      Total PE              0
      Free PE               0
      Allocated PE          0
      PV UUID               NF82AB-ZUaP-D9FF-PLVP-HMuA-pWFz-NIZFRG

   
[root@localhost-live liveuser]# pvdisplay
  --- Physical volume ---
  PV Name               /dev/sda3
  VG Name               centos
  PV Size               445.93 GiB / not usable 0   
  Allocatable           yes 
  PE Size               4.00 MiB
  Total PE              114159
  Free PE               1
  Allocated PE          114158
  PV UUID               OjAFDa-Il7s-Vj0h-Lian-culw-97um-9GYjOo
   
  --- Physical volume ---
  PV Name               /dev/nvme1n1p2
  VG Name               nvmeVg
  PV Size               <46.57 GiB / not usable 3.00 MiB
  Allocatable           yes 
  PE Size               4.00 MiB
  Total PE              11920
  Free PE               240
  Allocated PE          11680
  PV UUID               M1em0l-TY0y-ZuIt-DK2i-0yJp-OHNz-7RfupC
   
  --- Physical volume ---
  PV Name               /dev/nvme1n1p3
  VG Name               nvmeVg
  PV Size               <46.57 GiB / not usable 3.00 MiB
  Allocatable           yes (but full)
  PE Size               4.00 MiB
  Total PE              11920
  Free PE               0
  Allocated PE          11920
  PV UUID               qkaPsI-FLzs-wt4Y-bnhm-BpGK-aOcR-fheulP
   
  --- Physical volume ---
  PV Name               /dev/nvme1n1p4
  VG Name               nvmeVg
  PV Size               <46.57 GiB / not usable 3.00 MiB
  Allocatable           yes (but full)
  PE Size               4.00 MiB
  Total PE              11920
  Free PE               0
  Allocated PE          11920
  PV UUID               CTkIFV-Ebvf-Ps5w-rysY-s7U0-VLhs-6jLVRV
   
  --- Physical volume ---
  PV Name               /dev/nvme1n1p5
  VG Name               nvmeVg
  PV Size               <46.57 GiB / not usable 3.00 MiB
  Allocatable           yes (but full)
  PE Size               4.00 MiB
  Total PE              11920
  Free PE               0
  Allocated PE          11920
  PV UUID               Sjii2Q-zkwB-9Nhb-0g6o-4rt3-O9gy-4CMtEI
   
  --- Physical volume ---
  PV Name               /dev/nvme1n1p6
  VG Name               nvmeVg
  PV Size               <46.57 GiB / not usable 3.00 MiB
  Allocatable           yes (but full)
  PE Size               4.00 MiB
  Total PE              11920
  Free PE               0
  Allocated PE          11920
  PV UUID               QLUYbk-TzNY-RZHz-ck60-gbqA-kPtk-QT2Tm4
   
  --- Physical volume ---
  PV Name               /dev/nvme1n1p7
  VG Name               nvmeVg
  PV Size               <46.57 GiB / not usable 3.00 MiB
  Allocatable           yes (but full)
  PE Size               4.00 MiB
  Total PE              11920
  Free PE               0
  Allocated PE          11920
  PV UUID               nQg41G-8A3m-wMog-LBzJ-U09n-W1md-lgVEdQ
   
  --- Physical volume ---
  PV Name               /dev/nvme1n1p8
  VG Name               nvmeVg
  PV Size               <46.57 GiB / not usable 3.00 MiB
  Allocatable           yes (but full)
  PE Size               4.00 MiB
  Total PE              11920
  Free PE               0
  Allocated PE          11920
  PV UUID               D5HOGp-nLA3-zypn-edIj-uPon-Pzrj-N6JcB5
   
  "/dev/nvme1n1p1" is a new physical volume of "953.00 MiB"
  --- NEW Physical volume ---
  PV Name               /dev/nvme1n1p1
  VG Name               
  PV Size               953.00 MiB
  Allocatable           NO
  PE Size               0   
  Total PE              0
  Free PE               0
  Allocated PE          0
  PV UUID               CjuOUt-h2bH-EjCp-ALwd-c8BW-ZckJ-cpB322
   
  "/dev/nvme1n1p10" is a new physical volume of "<46.57 GiB"
  --- NEW Physical volume ---
  PV Name               /dev/nvme1n1p10
  VG Name               
  PV Size               <46.57 GiB
  Allocatable           NO
  PE Size               0   
  Total PE              0
  Free PE               0
  Allocated PE          0
  PV UUID               0XEQEc-pHGc-2B02-d4lp-581f-ZMYv-vKTgpG
   
  "/dev/nvme1n1p11" is a new physical volume of "<46.57 GiB"
  --- NEW Physical volume ---
  PV Name               /dev/nvme1n1p11
  VG Name               
  PV Size               <46.57 GiB
  Allocatable           NO
  PE Size               0   
  Total PE              0
  Free PE               0
  Allocated PE          0
  PV UUID               NF82AB-ZUaP-D9FF-PLVP-HMuA-pWFz-NIZFRG

答案1

我晚上拔掉了所有电源,安装了备用电池,今天早上一切正常sudo mkfs.ext4 /dev/mapper/nvmeVg-var

相关内容