Welcome to fdisk (util-linux 2.32.1). Changes will remain in memory only, until you decide to write them. Be careful before using the write command.
Command (m for help): n Partition type p primary (2 primary, 0 extended, 2 free) e extended (container for logical partitions) Select (default p):
Using default response p. Partition number (3,4, default 3): First sector (2095106-8388607, default 2097152): Last sector, +sectors or +size{K,M,G,T,P} (2097152-8388607, default 8388607): +756M
Created a new partition 3 of type 'Linux' and of size 756 MiB.
Command (m for help): w The partition table has been altered. Syncing disks.
默认情况下,parted 显示以 10
的幂次方表示的所有空间大小(KB、MB、GB)。您可以使用 unit
子命令来更改默认设置,该子命令接受以下参数:
[root@node2 ~]# lvdisplay --- Logical volume --- LV Path /dev/vgroup/swap LV Name swap VG Name vgroup LV UUID 80k3wh-3b52-387w-VFW9-pLdC-7jH6-EQ0cps LV Write Access read/write LV Creation host, time (none), 2023-02-19 11:58:34 -0500 LV Status available # open 2 LV Size 256.00 MiB Current LE 64 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 8192 Block device 253:1 --- Logical volume --- LV Path /dev/myvol/vo LV Name vo VG Name myvol LV UUID 91S5cv-jxFA-XK1F-79ZQ-pfxh-ho1Y-JUZXwM LV Write Access read/write LV Creation host, time (none), 2023-02-19 11:58:33 -0500 LV Status available # open 1 LV Size 184.00 MiB Current LE 46 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 8192 Block device 253:0 [root@node2 ~]# vgdisplay myvol --- Volume group --- VG Name myvol System ID Format lvm2 Metadata Areas 1 Metadata Sequence No 2 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 508.00 MiB PE Size 4.00 MiB Total PE 127 Alloc PE / Size 46 / 184.00 MiB Free PE / Size 81 / 324.00 MiB VG UUID Vxlt2s-G798-c1pt-B7Pf-uqaU-u6fE-j72DLZ [root@node2 ~]# man lvextend ... Extend an LV by a specified size.
lvextend -L|--size [+]Size[m|UNIT] LV [ -l|--extents [+]Number[PERCENT] ] [ -r|--resizefs ] [ -i|--stripes Number ] [ -I|--stripesize Size[k|UNIT] ] [ --poolmetadatasize [+]Size[m|UNIT] ] [ COMMON_OPTIONS ] [ PV ... ] [root@node2 ~]# lvextend -L 230m /dev/myvol/vo Rounding size to boundary between physical extents: 232.00 MiB. Size of logical volume myvol/vo changed from 184.00 MiB (46 extents) to 232.00 MiB (58 extents). Logical volume myvol/vo successfully resized. [root@node2 ~]# lvdisplay /dev/myvol/vo --- Logical volume --- LV Path /dev/myvol/vo LV Name vo VG Name myvol LV UUID 91S5cv-jxFA-XK1F-79ZQ-pfxh-ho1Y-JUZXwM LV Write Access read/write LV Creation host, time (none), 2023-02-19 11:58:33 -0500 LV Status available # open 1 LV Size 232.00 MiB Current LE 58 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 8192 Block device 253:0 [root@node2 ~]# resize2fs /dev/mapper/myvol-vo resize2fs 1.45.4 (23-Sep-2019) Filesystem at /dev/mapper/myvol-vo is mounted on /reports; on-line resizing required old_desc_blocks = 2, new_desc_blocks = 2 The filesystem on /dev/mapper/myvol-vo is now 237568 (1k) blocks long.
[root@node2 ~]# scp root@172.25.250.100:/etc/yum.repos.d/*.repo /etc/yum.repos.d/ The authenticity of host '172.25.250.100 (172.25.250.100)' can't be established. ECDSA key fingerprint is SHA256:1H687jfusVXYAUzAuByFfx1U/lB4VS+6h04wRhXhmZU. Are you sure you want to continue connecting (yes/no/[fingerprint])? yes Warning: Permanently added '172.25.250.100' (ECDSA) to the list of known hosts. root@172.25.250.100's password: defaults.repo 100% 315 75.6KB/s 00:00 [root@node2 ~]# yum repolist all repo id repo name status AppStream AppStream enabled BaseOS BaseOS enabled
[root@node1 ~]# su - natasha [natasha@node1 ~]$ echo "alias rhcsa='echo This is a rhcsa'" >> .bashrc [natasha@node1 ~]$ source .bashrc [natasha@node1 ~]$ rhcsa This is a rhcsa