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

RobbieTheK's questions

Martin Hope
RobbieTheK
Asked: 2020-03-22 16:41:32 +0800 CST

在 Fedora 31 上扩展 LVM 分区 > 2TB 以使用所有未分配的磁盘空间

  • 1

我们有一个带有 Perc H710 Mini 的戴尔 R420,它在 RAID 5 中配置了 3 个 1TB 驱动器。我添加了另一个 1TB 驱动器,感谢戴尔讨论板的一些帮助,RAID 5 重新配置正确,现在有 2.47 TiB。我使用了众所周知的策略,即简单地打开 Gparted 并将现有分区滑到 1.9TB 并使用lvextend -r -l +100%FREE命令将其移至那里。但是我们想将剩余的未分配磁盘空间用于我们的 /home 分区。

首先我遇到了这个错误:

parted ---pretend-input-tty /dev/sda resizepart 2  100%
Error: partition length of 5266759680 sectors exceeds the msdos-partition-table-imposed maximum of 4294967295

我在 SO 上找到了这个提示,它说要为未分配的磁盘空间创建一个新分区

我对此进行了测试,但一直在此错误中运行:

lvextend -L1844.1G /dev/mapper/fedora_newserver-home
  Rounding size to boundary between physical extents: 1.80 TiB.
  Insufficient free space: 214489 extents needed, but only 0 available

从教程:

注意,-L参数lvextend表示的是Logical Volume的总大小,而不是Logical Volume的扩展量

我误解了这里的语法吗?您可以从fdisk整个逻辑卷中看到 2.47 TB。我正在尝试将新的可用空间添加到主分区。

fdisk -l
Disk /dev/sda: 2.47 TiB, 2698581639168 bytes, 5270667264 sectors
Disk model: PERC H710
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xa23c34a0

Device     Boot   Start        End    Sectors  Size Id Type
/dev/sda1  *       2048    3907583    3905536  1.9G 83 Linux
/dev/sda2       3907584 4006645759 4002738176  1.9T 8e Linux LVM

另一个SF 建议有一个单行命令示例来实现我想要做的,但想看看是否有更首选的方式。

我在 Gparted 中删除了上面那个额外的分区,所以我可以再试一次。

按要求:

pvs
      PV         VG              Fmt  Attr PSize PFree
      /dev/sda2  fedora_newserver lvm2 a--  1.86t    0

vgs
VG              #PV #LV #SN Attr   VSize VFree
fedora_newserver   1   5   0 wz--n- 1.86t    0

谢谢@NasirRiley!我不得不稍微修改你的指示。

pvcreate /dev/sda3
WARNING: ext4 signature detected on /dev/sda3 at offset 1080. Wipe it? [y/n]: y
  Wiping ext4 signature on /dev/sda3.
  Physical volume "/dev/sda3" successfully created.

然后:

vgextend fedora_newserver /dev/sda3
  Volume group "fedora_newserver" successfully extended

接下来,并没有完全得到我们整个未分配的空间:

lvextend -l +100%FREE /dev/mapper/fedora_newserver-home
  Size of logical volume fedora_newserver/home changed from 1.21 TiB (317766 extents) to 1.80 TiB (472065 extents).
  Logical volume fedora_newserver/home successfully resized.

下一条命令出错:

xfs_growfs /dev/mapper/fedora_newserver-home xfs_growfs: /dev/mapper/fedora_newserver-home is not a mounted XFS filesystem

然后:

lvdisplay | sed -n '/home/,/Size/p'
  LV Path                /dev/fedora_newserver/home
  LV Name                home
  VG Name                fedora_newserver
  LV UUID                j94360-O22L-
  LV Write Access        read/write
  LV Creation host, time ourserver.edu, 2018-03-03 13:55:06 -0500
  LV Status              available
  # open                 1
  LV Size                1.80 TiB

我们并不完全在那里:

df -h
Filesystem                             Size  Used Avail Use% Mounted on
devtmpfs                                24G  4.0K   24G   1% /dev
tmpfs                                   24G   23M   24G   1% /dev/shm
tmpfs                                   24G  3.1M   24G   1% /run
/dev/mapper/fedora_newserver-root       280G   41G  240G  15% /
tmpfs                                   24G  4.2M   24G   1% /tmp
/dev/mapper/fedora_newserver-home       1.3T  859G  383G  70% /u/newserver
/dev/sda1                              1.9G  256M  1.5G  15% /boot
/dev/mapper/fedora_newserver-var        187G   73G  114G  39% /var
/dev/mapper/fedora_newserver-usr_local  187G   58G  129G  32% /usr/local

这是最终奏效的方法:

lvextend -r -l +100%FREE /dev/mapper/fedora_neweserver-home
  Size of logical volume fedora_newserver/home unchanged from 1.80 TiB (472065 extents).
  Logical volume fedora_newserver/home successfully resized.
meta-data=/dev/mapper/fedora_newserver-home isize=512    agcount=7, agsize=48828160 blks
         =                       sectsz=512   attr=2, projid32bit=1
         =                       crc=1        finobt=1, sparse=0, rmapbt=0
         =                       reflink=0
data     =                       bsize=4096   blocks=325392384, imaxpct=25
         =                       sunit=0      swidth=0 blks
naming   =version 2              bsize=4096   ascii-ci=0, ftype=1
log      =internal log           bsize=4096   blocks=95367, version=2
         =                       sectsz=512   sunit=0 blks, lazy-count=1
realtime =none                   extsz=4096   blocks=0, rtextents=0
data blocks changed from 325392384 to 483394560

现在我们在那里:

df -h|grep home
/dev/mapper/fedora_newserver-home       1.9T  860G  985G  47% /u/newserver

不知道为什么 xfs 命令失败,我们显然在使用 XFS,也许它在 LVM 中?

来自blkid:

/dev/mapper/fedora_newserver-home: LABEL="home" UUID="5aab1b3f-5cb5" TYPE="xfs"

好的,修改后的 XFS 命令不起作用:

    xfs_growfs /home
xfs_growfs: /home is not a mounted XFS filesystem

呃,不得不使用实际的挂载点:

xfs_growfs /u/newserver
meta-data=/dev/mapper/fedora_newserver-home isize=512    agcount=10, agsize=48828160 blks
         =                       sectsz=512   attr=2, projid32bit=1
         =                       crc=1        finobt=1, sparse=0, rmapbt=0
         =                       reflink=0
data     =                       bsize=4096   blocks=483394560, imaxpct=25
         =                       sunit=0      swidth=0 blks
naming   =version 2              bsize=4096   ascii-ci=0, ftype=1
log      =internal log           bsize=4096   blocks=95367, version=2
         =                       sectsz=512   sunit=0 blks, lazy-count=1
realtime =none                   extsz=4096   blocks=0, rtextents=0
partition fedora raid5 xfs
  • 1 个回答
  • 1968 Views
Martin Hope
RobbieTheK
Asked: 2019-01-15 12:54:45 +0800 CST

试图在 firewalld 中查找 NIS 或 NFS 服务的静态端口

  • 2

在我们的从 NIS 服务器上,我们/etc/sysconfig/network已经设置了

YPSERV_ARGS="-p 944"
YPXFRD_ARGS="-p 945"

OTHER_YPBIND_OPTS="-p 3000"在/etc/ypbind.conf里面_ YPPASSWDD_ARGS="--port 946"_ /etc/sysconfig/yppasswdd

但是在主服务器上,当make -C /var/yp在 firewalld 上运行和调试启用时,目标端口 (DPT) 总是会发生变化。它总是UDP。

kernel: FINAL_REJECT: IN=eno3 OUT= MAC=00:0a:f7:e1:f8:6c:00:0a:f7:e1:d3:71:08:00 SRC=nis-slave DST=nis-master LEN=76 TOS=0x00 PREC=0x00 TTL=64 ID=59404 DF PROTO=UDP SPT=1003 DPT=676 LEN=56 

同样在新的/etc/nfs.conf我们有:

[lockd]
port=4002
udp-port=4002
[mountd]
port=4003
[nfsd]
port=2049
port=4001
outgoing-port=4004

从服务器中的日志显示:ypxfr_callback call: RPC: Unable to receive; errno = No route to host

停止firewalld,一切都很好。那么什么服务在使用UDP呢?

nfs
  • 2 个回答
  • 2971 Views
Martin Hope
RobbieTheK
Asked: 2017-03-02 13:53:44 +0800 CST

sshd.service:收到来自 PID 的通知消息,但只允许主 PID 接收

  • 6

在过去一周左右的时间里,我们的许多使用 4.9.x 内核的 Fedora 25 服务器和工作站都在 /var/log/messages 中获取这些日志:

sshd.service: Got notification message from PID xxxx, but reception only
permitted for main PID xxxx: 1 Time(s)
user@xxxx.service: Got notification message from PID xxxx, but reception only
permitted for main PID xxxx: 1 Time(s)

这些有什么关系吗?这个旧错误可能与此有关吗?也许这会有所启发?

systemctl status -l
● ourdomain
    State: degraded
     Jobs: 0 queued
   Failed: 1 units
    Since: Mon 2017-02-13 09:28:47 EST; 2 weeks 2 days ago
   CGroup: /
           ├─user.slice
           │ ├─user-6105.slice
           │ │ ├─session-2159.scope
           │ │ │ ├─10514 systemctl status -l
           │ │ │ ├─26349 sshd: me [priv]
           │ │ │ ├─26376 sshd: me@pts/5
           │ │ │ ├─26377 -bash
           │ │ │ ├─26441 su
           │ │ │ └─26470 bash
           │ │ ├─user@6105.service
           │ │ │ ├─gvfs-gphoto2-volume-monitor.service
           │ │ │ │ └─7543 /usr/libexec/gvfs-gphoto2-volume-monitor
           │ │ │ ├─at-spi-dbus-bus.service
           │ │ │ │ ├─17460 /usr/libexec/at-spi-bus-launcher
           │ │ │ │ └─17465 /bin/dbus-daemon --config-file=/usr/share/defaults/at-spi2/accessibility.conf --nofork --print-address 3
           │ │ │ ├─dbus.service
           │ │ │ │ ├─ 7382 /usr/bin/dbus-daemon --session --address=systemd: --nofork --nopidfile --systemd-activation --syslog-only
           │ │ │ │ ├─ 7391 /usr/lib64/xfce4/xfconf/xfconfd
           │ │ │ │ ├─ 7542 /usr/libexec/goa-daemon
           │ │ │ │ ├─ 7561 /usr/libexec/goa-identity-service
           │ │ │ │ ├─ 7594 /usr/libexec/dconf-service
           │ │ │ │ ├─ 7718 /usr/libexec/imsettings-daemon
           │ │ │ │ ├─22486 /usr/libexec/gconfd-2
           │ │ │ │ ├─24823 /usr/bin/ibus-daemon -r --xim
           │ │ │ │ └─24832 /usr/libexec/ibus-dconf
           │ │ │ ├─gvfs-udisks2-volume-monitor.service
           │ │ │ │ └─7536 /usr/libexec/gvfs-udisks2-volume-monitor
           │ │ │ ├─evolution-source-registry.service
           │ │ │ │ └─7516 /usr/libexec/evolution-source-registry
           │ │ │ ├─gvfs-metadata.service
           │ │ │ │ └─7736 /usr/libexec/gvfsd-metadata
           │ │ │ ├─gvfs-mtp-volume-monitor.service
           │ │ │ │ └─7547 /usr/libexec/gvfs-mtp-volume-monitor
           │ │ │ ├─gvfs-goa-volume-monitor.service
           │ │ │ │ └─7572 /usr/libexec/gvfs-goa-volume-monitor
           │ │ │ ├─gvfs-afc-volume-monitor.service
           │ │ │ │ └─7562 /usr/libexec/gvfs-afc-volume-monitor
           │ │ │ ├─init.scope
           │ │ │ │ ├─23030 /usr/lib/systemd/systemd --user
           │ │ │ │ └─23039 (sd-pam)
           │ │ │ ├─tracker-store.service
           │ │ │ │ └─7477 /usr/libexec/tracker-store
           │ │ │ └─gvfs-daemon.service
           │ │ │   ├─7437 /usr/libexec/gvfsd
           │ │ │   ├─7442 /usr/libexec/gvfsd-fuse /run/user/6105/gvfs -f -o big_writes
           │ │ │   └─7729 /usr/libexec/gvfsd-trash --spawner :1.11 /org/gtk/gvfs/exec_spaw/0
ssh fedora
  • 1 个回答
  • 6146 Views
Martin Hope
RobbieTheK
Asked: 2017-01-08 11:36:41 +0800 CST

来自备份脚本 aquota.user 的 Fedora 25 tar 错误:无法计时 不允许操作

  • 0

我们刚刚升级到 Fedora 25 并重新启用了对 Drobo 设备的 tar/gzip 备份。

这些错误在重新启用备份后才开始发生。

gzip: stdout: Input/output error
/bin/tar: Child returned status 1
/bin/tar: Error is not recoverable: exiting now

STANDARD OUTPUT:
Backed up /home to /drobo/home.tgz

Backup of /home/users FAILED

Backed up /home/users to
home-users-FAILED.tgz
/bin/tar: home/users/aquota.user: Cannot utime: Operation not permitted

我知道 aquota.user 文件设置为不可变:

lsattr aquota.user 

----i--A------e---- aquota.user

所以我尝试了这个:

# chattr -iAe aquota.user
chattr: Operation not permitted while setting flags on aquota.user

所以我尝试将这些标志添加到我们备份脚本中的 tar 命令中:

--no-overwrite-dir --preserve-permissions

错误继续。有任何想法吗?

quota file-permissions tar
  • 2 个回答
  • 189 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