首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何在md0 sw raid 1时调整/dev/sda2 2的大小

如何在md0 sw raid 1时调整/dev/sda2 2的大小
EN

Unix & Linux用户
提问于 2021-10-11 07:57:53
回答 1查看 349关注 0票数 0

我刚刚将更大的4TB2TB ssd添加到md0 raid中,但是大小仍然相同。我试着调整.partition的大小,但它说它很忙。Parted仍在按旧尺寸调整大小。

阵列:

代码语言:javascript
复制
Personalities : [raid1] [linear] [multipath] [raid0] [raid6] [raid5] [raid4] [raid10] 
md0 : active raid1 sdb2[3] sda2[2]
      1875210240 blocks super 1.2 [2/2] [UU]
      bitmap: 3/14 pages [12KB], 65536KB chunk

知道我做错了什么吗?谢谢

代码语言:javascript
复制
resize2fs /dev/sda2 
resize2fs 1.44.5 (15-Dec-2018)
resize2fs: Device or resource busy while trying to open /dev/sda2
Couldn't find valid filesystem superblock.

GNU Parted 3.2
Using /dev/sda
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) p                                                                
Warning: Not all of the space available to /dev/sda appears to be used, you can fix the GPT to use all of the space (an extra 3750727680 blocks) or continue with the current setting? 
Fix/Ignore? Fix                                                           
Model: ATA KINGSTON SEDC450 (scsi)
Disk /dev/sda: 3841GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags: 

Number  Start   End     Size    File system  Name  Flags
 1      1049kB  32.5MB  31.5MB                     bios_grub
 2      32.5MB  1920GB  1920GB                     raid

resize      resizepart  
(parted) resizepart 2
End?  [1920GB]? 35000GB                                                   
Error: The location 35000GB is outside of the device /dev/sda.

fdisk输出:

代码语言:javascript
复制
Disk /dev/sda: 3.5 TiB, 3840755982336 bytes, 7501476528 sectors
Disk model: KINGSTON SEDC450
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: gpt
Disk identifier: 36C330A7-33FB-423A-981B-2DC29CCE3822

Device     Start        End    Sectors  Size Type
/dev/sda1   2048      63487      61440   30M BIOS boot
/dev/sda2  63488 3750748159 3750684672  1.8T Linux RAID

Disk /dev/sdb: 3.5 TiB, 3840755982336 bytes, 7501476528 sectors
Disk model: KINGSTON SEDC450
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: gpt
Disk identifier: 36C330A7-33FB-423A-981B-2DC29CCE3822

Device     Start        End    Sectors  Size Type
/dev/sdb1   2048      63487      61440   30M BIOS boot
/dev/sdb2  63488 3750748159 3750684672  1.8T Linux RAID
EN

回答 1

Unix & Linux用户

回答已采纳

发布于 2021-10-11 08:22:02

解决了这个问题,我把错误的大小放在那里,我没有意识到3.5TB的大小实际上是3840 is没有3500 is。

通过@archemar的评论,修正了这个问题。

票数 0
EN
页面原文内容由Unix & Linux提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://unix.stackexchange.com/questions/672718

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档