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
    • 最新
    • 标签
主页 / server / 问题

问题[parted](server)

Martin Hope
Someone Sometime
Asked: 2022-01-30 13:27:41 +0800 CST

parted和fdisk的不同输出

  • 1

我有一个奇怪的 CentOS 行为,当我parted -l在服务器上键入命令时,我得到以下结果:

Model: DELL PERC H730P Adp (scsi)
Disk /dev/sda: 5758GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags: pmbr_boot

Number  Start   End     Size    File system     Name  Flags
 1      1049kB  3146kB  2097kB                        bios_grub
 2      3146kB  1077MB  1074MB  ext4
 3      1077MB  5749GB  5748GB  ext4
 4      5749GB  5758GB  8590MB  linux-swap(v1)

一切似乎都很好,但是当我检查时,fdisk -l我得到了:

Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk label type: gpt
Disk identifier: 79700B71-AB44-4ED5-95EC-0FE5E3C0CF1D


#         Start          End    Size  Type            Name
 1         2048         6143      2M  BIOS boot       
 2         6144      2103295      1G  Microsoft basic 
 3      2103296  11229198335    5.2T  Microsoft basic 
 4  11229198336  11245975551      8G  Linux swap      

正如你所看到的,文件系统的类型在每种情况下都是不同的,这让我很困扰。
谁能解释一下是什么导致输出结果如此多样化?
提前致谢

fdisk parted table-partitioning
  • 1 个回答
  • 56 Views
Martin Hope
Martin
Asked: 2021-11-13 04:11:11 +0800 CST

使用 Parted ansible 的模块创建交换分区 UUID 后无法获取它

  • 3

我必须在 VM 上的新磁盘中创建一个新分区。我使用 parted 模块来创建分区。在未来的任务中(在同一个剧本中),我需要使用设备分区的 UUID(不是分区 UUID,而是分区的设备 UUID,例如在 /dev/disks/by-uuid/ 中)

问题是:在 parted 模块归档作业后,我找不到在任务中获取分区 UUID 的方法。我确信 parted 模块工作正常,因为分区在运行后存在。

让我们看看我尝试了什么:

Creating the partition with the parted module
Re-launch facts with the setup module (with and without filtering on ansible_devices) in order to use the ansible_devices.sdX.partitions.sdXY.uuid --> return void
Use the blkid -s UUID -o value /dev/sdXY throught the shell module --> return void
Use the ls -l /dev/disk/by-uuid/ | grep sdXY | awk '{print $9}' throught the shell module --> still return void

可怕的事实是:如果我在另一个剧本中启动相同的任务(如 2、3 或 4),我就能得到结果。但是在 parted 模块的同一剧本中:我不能。

这是我的完整剧本:

---
- hosts: all
  become: yes
  gather_facts: "yes"
  tasks:

   - name: Check actual swap quantity
     debug:
       var: ansible_swaptotal_mb
     failed_when: ansible_swaptotal_mb > 1999


   - name: Add a 2Gb disk
     shell: pwsh ./add_disk_vm.ps1 -vm {{ ansible_hostname }} -diskspace 2
     delegate_to: localhost


   - name: Scan for new disks
     shell: for i in $(ls /sys/class/scsi_host/); do echo "- - -" > /sys/class/scsi_host/$i/scan ; done

   - name: Get letter of the new disk
     shell: 'dmesg | grep "sd\w.*2.00 GiB)$" | grep -o "sd\w" | tail -1'
     register: diskletter


   - name: Create new partition
     community.general.parted:
       device: /dev/{{ diskletter.stdout }}
       fs_type: linux-swap
       label: gpt
       name: swap
       number: 1
       state: present
     register: parted


   #here the task who should work, but returning nothing
   - name: Get UUID
     shell: blkid -s UUID -o value /dev/{{ diskletter.stdout }}1
     register: uuidinfo

我之前没有提到它,但最后一个任务在其他剧本上运行良好,甚至直接在 VM 上的 SSH 中运行。该命令仅在剧本执行上下文期间不返回任何内容。

以下是有关我的设置的其他一些信息:

ansible-playbook 2.9.27 python 版本 = 2.7.17 Ubuntu 18.04(安装了 ansible 和目标服务器) community.general 集合(版本 3.7.0)

如果有人对此有任何想法;谢谢大家!

hard-drive ubuntu ansible parted
  • 2 个回答
  • 330 Views
Martin Hope
HCSF
Asked: 2021-02-10 23:01:41 +0800 CST

10TB硬盘分区失败?

  • 2

在我再次尝试对 10TB 硬盘进行分区之前,parted看到了它:

# parted /dev/sdb
(parted) print list                                                       
Model: ATA ST10000NM0016-1T (scsi)
Disk /dev/sdb: 10.0TB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags: 

Number  Start   End     Size    File system  Name     Flags
 1      1049kB  10.0TB  10.0TB  xfs          primary
....
....
....

然后,我只是尝试再次分区但失败了:

[root@localhost ~]# parted /dev/sdb
GNU Parted 3.1
Using /dev/sdb
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) mklabel gpt                                                      
Warning: The existing disk label on /dev/sdb will be destroyed and all data on this disk will be lost. Do you want to continue?
Yes/No? Yes
Error: end of file while reading /dev/sdb
Retry/Ignore/Cancel? Retry                                                
Error: end of file while reading /dev/sdb
Retry/Ignore/Cancel? Cancel                                               
(parted) q                                                                
Warning: Error fsyncing/closing /dev/sdb: Input/output error
Retry/Ignore? Retry                                                       
Warning: Error fsyncing/closing /dev/sdb: Input/output error
Retry/Ignore? Ignore                                                      

然后,驱动消失了。我试图重新启动,但仍然看不到驱动器。

这篇文章建议使用gdisk /dev/sdb. 但是,我认为它已经损坏到gdisk无法识别:

# gdisk -l /dev/sdb
GPT fdisk (gdisk) version 0.8.10

Problem opening /dev/sdb for reading! Error is 2.
The specified file does not exist!

lsbk的输出:

# lsblk 
NAME                 MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda                    8:0    1 447.1G  0 disk 
├─sda1                 8:1    1     2G  0 part /boot
└─sda2                 8:2    1 445.1G  0 part 
  ├─centos-root      253:0    0    30G  0 lvm  /
  ├─centos-swap      253:1    0     4G  0 lvm  [SWAP]
  ├─centos-var       253:2    0    30G  0 lvm  /var
  ├─centos-coredumps 253:3    0    30G  0 lvm  /coredumps
  └─centos-latest    253:4    0 351.1G  0 lvm  /latest

ls -ltr /dev/sd*的输出:

brw-rw---- 1 root disk 8, 0 Feb 10 16:00 /dev/sda
brw-rw---- 1 root disk 8, 2 Feb 10 16:00 /dev/sda2
brw-rw---- 1 root disk 8, 1 Feb 10 16:00 /dev/sda1

lshw -class disk,parted -l也fdisk -l看不到驱动器。

我看到一些可疑的东西dmesg:

[Wed Feb 10 13:27:39 2021] ata13: softreset failed (1st FIS failed)
[Wed Feb 10 13:27:49 2021] ata13: softreset failed (device not ready)
[Wed Feb 10 13:28:06 2021] ata13: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
[Wed Feb 10 13:28:11 2021] ata13.00: qc timeout (cmd 0xec)
[Wed Feb 10 13:28:11 2021] ata13.00: failed to IDENTIFY (I/O error, err_mask=0x4)
[Wed Feb 10 13:28:17 2021] ata13: link is slow to respond, please be patient (ready=0)
[Wed Feb 10 13:28:21 2021] ata13: softreset failed (device not ready)
[Wed Feb 10 13:28:31 2021] ata13: softreset failed (1st FIS failed)
[Wed Feb 10 13:28:41 2021] ata13: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
[Wed Feb 10 13:28:51 2021] ata13.00: qc timeout (cmd 0xec)
[Wed Feb 10 13:28:51 2021] ata13.00: failed to IDENTIFY (I/O error, err_mask=0x4)
[Wed Feb 10 13:28:51 2021] ata13: limiting SATA link speed to 3.0 Gbps
[Wed Feb 10 13:28:52 2021] ata13: SATA link up 3.0 Gbps (SStatus 123 SControl 320)
[Wed Feb 10 13:29:13 2021] ata13.00: qc timeout (cmd 0x47)
[Wed Feb 10 13:29:13 2021] ata13.00: READ LOG DMA EXT failed, trying unqueued
[Wed Feb 10 13:29:13 2021] ata13.00: failed to get NCQ Send/Recv Log Emask 0x40
[Wed Feb 10 13:29:13 2021] ata13.00: ATA-10: ST10000NM0016-1TT101, SNE0, max UDMA/133
[Wed Feb 10 13:29:13 2021] ata13.00: 19532873728 sectors, multi 16: LBA48 NCQ (depth 31/32), AA
[Wed Feb 10 13:29:13 2021] ata13.00: failed to set xfermode (err_mask=0x40)
[Wed Feb 10 13:29:13 2021] ata13.00: disabled
[Wed Feb 10 13:29:13 2021] ata13: hard resetting link
[Wed Feb 10 13:29:23 2021] ata13: softreset failed (1st FIS failed)
[Wed Feb 10 13:29:23 2021] ata13: hard resetting link
[Wed Feb 10 13:29:33 2021] ata13: softreset failed (device not ready)
[Wed Feb 10 13:29:33 2021] ata13: hard resetting link
[Wed Feb 10 13:29:39 2021] ata13: link is slow to respond, please be patient (ready=0)
[Wed Feb 10 13:29:49 2021] ata13: SATA link up 3.0 Gbps (SStatus 123 SControl 320)
[Wed Feb 10 13:29:49 2021] ata13: EH complete

==================================

更新#1

我看了这篇文章然后关机了acpi,另一篇文章提示电源问题所以我关机了tune-adm。然后,磁盘回来了,我就像上次一样运行,但这一次,没有parted /dev/sdb,但是当我继续时 ,它给了我。我重新启动机器并再次尝试:mklabel gptError: end of file while reading /dev/sdbmkpart primary xfs 0% 1%Error: /dev/sdb: unrecognised disk label

(parted) mkpart primary xfs 0% 1%                                         
(parted) mkpart primary xfs 1% 2%                                         
(parted) mkpart primary ext4 2% 3%                                        
(parted) mkpart primary ext4 3% 4%
(parted) mkpart primary btrfs 4% 5%                                       
(parted) mkpart primary btrfs 5% 6%                                       
(parted) mkpart primary xfs 6% 100%                                       
(parted) print                                                            
Model: ATA ST10000NM0016-1T (scsi)
Disk /dev/sdb: 10.0TB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags: 

Number  Start   End     Size    File system  Name     Flags
 1      1049kB  100GB   100GB   xfs          primary
 2      100GB   200GB   100GB                primary
 3      200GB   300GB   100GB                primary
 4      300GB   400GB   100GB                primary
 5      400GB   500GB   100GB                primary
 6      500GB   600GB   100GB                primary
 7      600GB   10.0TB  9401GB               primary

(parted) q                                                                

有用。但这似乎很不稳定。我dmesg再次检查,发现类似但不同的故障:

[Thu Feb 11 00:58:31 2021] ata15.00: qc timeout (cmd 0xec)
[Thu Feb 11 00:58:31 2021] ata15.00: failed to IDENTIFY (I/O error, err_mask=0x4)
[Thu Feb 11 00:58:32 2021] ata15: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
[Thu Feb 11 00:58:42 2021] ata15.00: qc timeout (cmd 0xec)
[Thu Feb 11 00:58:42 2021] ata15.00: failed to IDENTIFY (I/O error, err_mask=0x4)
[Thu Feb 11 00:58:42 2021] ata15: limiting SATA link speed to 3.0 Gbps
[Thu Feb 11 00:58:44 2021] ata15: SATA link up 3.0 Gbps (SStatus 123 SControl 320)
[Thu Feb 11 00:59:12 2021] ata15.00: ATA-10: ST10000NM0016-1TT101, SNE0, max UDMA/133
[Thu Feb 11 00:59:12 2021] ata15.00: 19532873728 sectors, multi 16: LBA48 NCQ (depth 31/32), AA
[Thu Feb 11 00:59:12 2021] ata15.00: configured for UDMA/133
[Thu Feb 11 00:59:12 2021] scsi 14:0:0:0: Direct-Access     ATA      ST10000NM0016-1T SNE0 PQ: 0 ANSI: 5
[Thu Feb 11 00:59:12 2021] sd 14:0:0:0: [sdb] 19532873728 512-byte logical blocks: (10.0 TB/9.09 TiB)
[Thu Feb 11 00:59:12 2021] sd 14:0:0:0: [sdb] 4096-byte physical blocks
[Thu Feb 11 00:59:12 2021] sd 14:0:0:0: [sdb] Write Protect is off
[Thu Feb 11 00:59:12 2021] sd 14:0:0:0: [sdb] Mode Sense: 00 3a 00 00
[Thu Feb 11 00:59:12 2021] sd 14:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[Thu Feb 11 00:59:19 2021]  sdb:
[Thu Feb 11 00:59:19 2021] sd 14:0:0:0: [sdb] Attached SCSI removable disk
[Thu Feb 11 00:59:37 2021] SGI XFS with ACLs, security attributes, no debug enabled

知道发生了什么吗?

谢谢。

hard-drive xfs centos7 fdisk parted
  • 2 个回答
  • 421 Views
Martin Hope
sheffadmin
Asked: 2020-12-02 14:23:43 +0800 CST

parted + 使用帮助未描述 resizepart

  • 0

我们需要在 rhel server 7.2 版本上使用 parted 命令作为示例

parted -s /dev/sda resizepart 2

但是从分开的帮助中我们找不到选项resizepart

例子:

parted -s /dev/sda resizepart 2
Usage: parted [OPTION]... [DEVICE [COMMAND [PARAMETERS]...]...]
Apply COMMANDs with PARAMETERS to DEVICE.  If no COMMAND(s) are given, run in
interactive mode.

OPTIONs:
  -h, --help                      displays this help message
  -l, --list                      lists partition layout on all block devices
  -m, --machine                   displays machine parseable output
  -s, --script                    never prompts for user intervention
  -v, --version                   displays the version
  -a, --align=[none|cyl|min|opt]  alignment for new partitions

COMMANDs:
  align-check TYPE N                        check partition N for TYPE(min|opt) alignment
  help [COMMAND]                           print general help, or help on COMMAND
  mklabel,mktable LABEL-TYPE               create a new disklabel (partition table)
  mkpart PART-TYPE [FS-TYPE] START END     make a partition
  name NUMBER NAME                         name partition NUMBER as NAME
  print [devices|free|list,all|NUMBER]     display the partition table, available devices, free space, all found partitions, or a particular partition
  quit                                     exit program
  rescue START END                         rescue a lost partition near START and END
  rm NUMBER                                delete partition NUMBER
  select DEVICE                            choose the device to edit
  disk_set FLAG STATE                      change the FLAG on selected device
  disk_toggle [FLAG]                       toggle the state of FLAG on selected device
  set NUMBER FLAG STATE                    change the FLAG on partition NUMBER
  toggle [NUMBER [FLAG]]                   toggle the state of FLAG on partition NUMBER
  unit UNIT                                set the default unit to UNIT
  version                                  display the version number and copyright information of GNU Parted

我们的版本是'

parted --version
parted (GNU parted) 3.1
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by <http://git.debian.org/?p=parted/parted.git;a=blob_plain;f=AUTHORS>.

使用帮助是否可能或错误?

还是真的resizepart不支持?

参考 - https://access.redhat.com/sites/default/files/attachments/parted_0.pdf

https://bugzilla.redhat.com/show_bug.cgi?id=1423357

redhat partition lvm fdisk parted
  • 1 个回答
  • 576 Views
Martin Hope
sheffadmin
Asked: 2020-11-28 02:14:10 +0800 CST

增加 OS VM 磁盘并重新扫描后,rhel + parted 失败

  • 0

我们有 VM rhel 机器版本 7.6

来自 lsblk 的示例

lsblk
NAME             MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
fd0                2:0    1     4K  0 disk
sda                8:0    0   300G  0 disk
├─sda1             8:1    0   500M  0 part /boot
├─sda2             8:2    0  39.5G  0 part
│ ├─VG-RHEL_root 253:0    0  40.9G  0 lvm  /
│ ├─VG-RHEL_swap 253:1    0   7.7G  0 lvm  [SWAP]
│ └─VG-RHEL_var  253:2    0 100.9G  0 lvm  /var
└─sda3             8:3    0   110G  0 part
  ├─VG-RHEL_root 253:0    0  40.9G  0 lvm  /
  └─VG-RHEL_var  253:2    0 100.9G  0 lvm  /var

在使用分开之前

我们将 vsphare 客户端的 OS 磁盘从 200G 增加到 300G

然后我们重新扫描 sda 磁盘,我们得到 lsblk 300 而不是之前的 200G

现在我们想使用parted

但我们得到以下

  parted /dev/sda  resizepart 2 100%
Usage: parted [OPTION]... [DEVICE [COMMAND [PARAMETERS]...]...]
Apply COMMANDs with PARAMETERS to DEVICE.  If no COMMAND(s) are given, run in
interactive mode.
 
OPTIONs:
  -h, --help                      displays this help message
  -l, --list                      lists partition layout on all block devices
  -m, --machine                   displays machine parseable output
  -s, --script                    never prompts for user intervention
  -v, --version                   displays the version
  -a, --align=[none|cyl|min|opt]  alignment for new partitions

这里有什么问题?

linux redhat lvm fdisk parted
  • 1 个回答
  • 100 Views
Martin Hope
sheffadmin
Asked: 2020-11-16 00:37:54 +0800 CST

增加 OS 磁盘大小后添加额外的分区

  • 0

作为添加额外分区的一部分 – sda3 我们将操作系统磁盘从 vsphere 客户端(VM Linux 服务器)从 50g 扩展到 120g

我们执行重新扫描,而不是重新启动

lsblk
NAME             MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sda                8:0    0  120G  0 disk
├─sda1             8:1    0    1G  0 part /boot
└─sda2             8:2    0  119G  0 part
  ├─Vlpr-lvm_root 253:0    0   10G  0 lvm  /
  ├─Vlpr-lvm_swap 253:1    0  3.9G  0 lvm  [SWAP]
  └─Vlpr-lvm_var  253:2    0  10G  0 lvm  /var


fdisk /dev/sda

Command (m for help): n
Partition type:
   p   primary (2 primary, 0 extended, 2 free)
   e   extended
Select (default p): p0
Partition number (3,4, default 3): 3
No free sectors available

Command (m for help):

正如我们在上面看到的,我们有分区 - sda1 sda2 ,但是当我们从 fdisk 中选择分区号 - 3 时,它会抱怨 -No free sectors available 尽管我们没有使用 sda3

为什么 fdisk 给出错误的任何建议 -No free sectors available

我只想提一下,如果这是解决方案,我们宁愿不重新启动?

centos redhat fdisk parted
  • 1 个回答
  • 319 Views
Martin Hope
Weymouth Solutions
Asked: 2020-07-29 14:40:28 +0800 CST

10TB 硬盘有一个 9999GB 的分区,但只允许我访问 215GB

  • 0

分开打印所有结果

我有一个 10tb 硬盘,有 3 个分区和一个标志(不确定这意味着什么)。该标志设置为 215gb,这就是我能够在文件系统中访问的全部内容。我正在运行 Ubuntu Server 20.04,我真的很想访问这个铁狼硬盘的其余部分。任何帮助将不胜感激(最好的解决方法是不会让我格式化驱动器并丢失我的数据)

hard-drive partition ubuntu-20.04 parted
  • 1 个回答
  • 156 Views
Martin Hope
Debianuser
Asked: 2016-08-24 12:04:37 +0800 CST

Centos 5 上的 4 TB 外部磁盘

  • 0

我有一台运行 CentOS 5(内核 2.6.18-92.el5)的旧服务器。它正在运行一个遗留应用程序,所以我还不能退役它。我已将 2 TB USB 磁盘连接到它以进行备份,并且该磁盘现在几乎已满。

我买了一个新的 4 TB 磁盘,但操作系统只检测到它为 2 TB。我知道 fdisk 不支持 2TB 以上的分区,但我也没有使用 parted 的运气。

有什么解决方法可以让操作系统读取 4 TB 的全部空间?

来自 dmesg:

usb-storage: device found at 15
usb-storage: waiting for device to settle before scanning
  Vendor: Seagate   Model: Backup+  Desk     Rev: 040B
  Type:   Direct-Access                      ANSI SCSI revision: 06
sdc: Spinning up disk....ready
sdc : very big device. try to use READ CAPACITY(16).
sdc : READ CAPACITY(16) failed.
sdc : status=0, message=00, host=5, driver=00 
sdc : use 0xffffffff as device size
SCSI device sdc: 4294967296 512-byte hdwr sectors (2199023 MB)

分开 /dev/sdc 打印

Model: Seagate Backup+ Desk (scsi)
Disk /dev/sdc: 2199GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number  Start   End     Size    File system  Name     Flags
 1      17.4kB  2100GB  2100GB               primary       

Information: Don't forget to update /etc/fstab, if necessary.
partition fdisk parted centos5
  • 2 个回答
  • 1710 Views
Martin Hope
Vikelidis Kostas
Asked: 2016-08-15 09:31:09 +0800 CST

缩小分区以完全适合底层文件系统大小

  • 8

最近我将 ext4 文件系统的大小缩小到 500GB

df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda2       493G   64G  404G  14% /

现在我想缩小分区大小以完全适合文件系统大小。

我尝试使用 parted 和 resizepart 命令。问题是当 parted 要求新尺寸时。如果我选择 500GB,则生成的分区比 500GB 小,因此底层文件系统无法适应该分区。关于如何进行正确尺寸计算的任何提示?

partition parted
  • 2 个回答
  • 11442 Views
Martin Hope
a coder
Asked: 2016-07-21 05:09:51 +0800 CST

pvs 未显示正确的可用空间

  • 5

最近在具有以下驱动器的 PowerEdge R320 上安装了 RHEL7:

2 x 300GB sas 15k
2 x 1TB sas 7.2k

在安装过程中设置 LVM 时,我特意留下了数百 GB 的空闲空间,以防以后需要扩展。

我现在看到我需要扩展安装期间创建的卷之一。

问题是 pvs 只显示我创建的内容,并没有显示任何可用的可用空间。

[user@box ~] pvdisplay
  --- Physical volume ---
  PV Name               /dev/sda2
  VG Name               rhel_os
  PV Size               165.79 GiB / not usable 0   
  Allocatable           yes (but full)
  PE Size               4.00 MiB
  Total PE              42443
  Free PE               0
  Allocated PE          42443
  PV UUID               sDdEfu-qagM-qq35-OGfF-HpPw-Bizd-LcXazt

  --- Physical volume ---
  PV Name               /dev/sdb1
  VG Name               rhel_data
  PV Size               139.71 GiB / not usable 4.00 MiB
  Allocatable           yes 
  PE Size               4.00 MiB
  Total PE              35766
  Free PE               1
  Allocated PE          35765
  PV UUID               Jgjcad-idBE-wxXc-tGGf-SY8m-qb8T-nBi9ar

parted显示可用空间:

[user@box ~]# parted
GNU Parted 3.1
Using /dev/sda
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print free                                                       
Model: DELL PERC H710 (scsi)
Disk /dev/sda: 299GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags: 

Number  Start   End     Size    Type     File system  Flags
        18.4kB  1049kB  1030kB           Free Space
 1      1049kB  301MB   300MB   primary  xfs          boot
 2      301MB   178GB   178GB   primary               lvm
        178GB   299GB   121GB            Free Space

和 /dev/sdb:

[user@box ~]# parted /dev/sdb
(parted) print free
Model: DELL PERC H710 (scsi)
Disk /dev/sdb: 1000GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags: 

Number  Start   End     Size    Type     File system  Flags
        32.3kB  1049kB  1016kB           Free Space
 1      1049kB  150GB   150GB   primary               lvm
        150GB   1000GB  850GB            Free Space

1) 我需要做什么才能使用免费的 850GB?

2) 将来,我如何将所有可用空间放入物理卷中(从而更容易与 LVM 一起使用)?

redhat lvm rhel7 parted
  • 2 个回答
  • 13013 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