GPT PMBR size mismatch 解决方法

root@debian:/home/liyezhen/src/sbk_debian_32bit/build/product_tools# fdisk -l /dev/sdb
GPT PMBR size mismatch (60062499 != 60995327) will be corrected by w(rite).
The backup GPT table is corrupt, but the primary appears OK, so that will be used.

Disk /dev/sdb: 29.1 GiB, 31229607936 bytes, 60995328 sectors
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: BE4B4A96-2EDA-4A01-886E-97A3523426A3

Device       Start      End Sectors  Size Type
/dev/sdb1     2048   104447  102400   50M EFI System
/dev/sdb2   104448   299007  194560   95M Linux filesystem
/dev/sdb3   299008  2252799 1953792  954M Linux filesystem
/dev/sdb4  2252800 10854399 8601600  4.1G Linux filesystem

root@debian:/home/liyezhen/src/sbk_debian_32bit/build/product_tools# parted -l 
Model: ATA ST3500413AS (scsi)
Disk /dev/sda: 500GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags: 

Number  Start   End    Size    Type      File system     Flags
 1      1049kB  496GB  496GB   primary   ext4            boot
 2      496GB   500GB  4218MB  extended
 5      496GB   500GB  4218MB  logical   linux-swap(v1)


Error: The backup GPT table is corrupt, but the primary appears OK, so that will
be used.
OK/Cancel? ok                                                             
Warning: Not all of the space available to /dev/sdb appears to be used, you can fix the GPT to use all of the space (an extra 932828 blocks) or continue with the current setting? 
Fix/Ignore? fix                                                           
Model: Kingston DataTraveler 3.0 (scsi)
Disk /dev/sdb: 31.2GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags: 

Number  Start   End     Size    File system  Name              Flags
 1      1049kB  53.5MB  52.4MB  fat16        Linux filesystem  boot, esp
 2      53.5MB  153MB   99.6MB  ext4
 3      153MB   1153MB  1000MB  ext4
 4      1153MB  5557MB  4404MB  ext4


Error: The backup GPT table is corrupt, but the primary appears OK, so that will be used.
OK/Cancel? ok                                                             
Model: SanDisk Ultra USB 3.0 (scsi)
Disk /dev/sdc: 30.8GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags: 

Number  Start   End     Size    File system  Name              Flags
 1      1049kB  53.5MB  52.4MB  fat16        Linux filesystem  boot, esp
 2      53.5MB  153MB   99.6MB  ext4
 3      153MB   1153MB  1000MB  ext4
 4      1153MB  5557MB  4404MB  ext4


root@debian:/home/liyezhen/src/sbk_debian_32bit/build/product_tools# 
root@debian:/home/liyezhen/src/sbk_debian_32bit/build/product_tools# 
root@debian:/home/liyezhen/src/sbk_debian_32bit/build/product_tools# 
root@debian:/home/liyezhen/src/sbk_debian_32bit/build/product_tools# fdisk -l /dev/sdb

Disk /dev/sdb: 29.1 GiB, 31229607936 bytes, 60995328 sectors
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: BE4B4A96-2EDA-4A01-886E-97A3523426A3

Device       Start      End Sectors  Size Type
/dev/sdb1     2048   104447  102400   50M EFI System
/dev/sdb2   104448   299007  194560   95M Linux filesystem
/dev/sdb3   299008  2252799 1953792  954M Linux filesystem
/dev/sdb4  2252800 10854399 8601600  4.1G Linux filesystem

root@debian:/home/liyezhen/src/sbk_debian_32bit/build/product_tools# mount /dev/sdb4 /mnt/usb
mount: wrong fs type, bad option, bad superblock on /dev/sdb4,
       missing codepage or helper program, or other error

       In some cases useful info is found in syslog - try
       dmesg | tail or so.
root@debian:/home/liyezhen/src/sbk_debian_32bit/build/product_tools# 
root@debian:/home/liyezhen/src/sbk_debian_32bit/build/product_tools# 
root@debian:/home/liyezhen/src/sbk_debian_32bit/build/product_tools# fsck.ext4 /dev/sdb4 
e2fsck 1.42.12 (29-Aug-2014)
Superblock has an invalid journal (inode 8).
Clear<y>? yes
*** ext3 journal has been deleted - filesystem is now ext2 only ***

说明:GPT PMBR size mismatch 解决方法

  1. parted -l 修复分区表
### Spring Framework ApplicationEventPublisher Example and Usage In the context of the Spring framework, `ApplicationEventPublisher` is an interface that allows beans to publish events to the application context. This mechanism facilitates a loosely coupled architecture where components can notify each other about significant occurrences without being directly dependent on one another. The core classes involved in this event-driven model include: - **ApplicationEvent**: A class extending from which all custom events should derive. - **ApplicationListener<E extends ApplicationEvent>**: An interface implemented by any bean wishing to listen for specific types of events. - **ApplicationEventMulticaster**: The component responsible for broadcasting events to registered listeners within the ApplicationContext[^1]. To demonstrate how these pieces work together using `ApplicationEventPublisher`, consider the following code snippets illustrating both publishing and listening capabilities. #### Publishing Events with ApplicationEventPublisher A service or repository layer might want to inform others when certain actions occur. For instance, after saving data into storage, it could broadcast such activity as shown below: ```java @Service public class MyService { private final ApplicationEventPublisher publisher; @Autowired public MyService(ApplicationEventPublisher publisher) { this.publisher = publisher; } void performAction() { // Action logic here... CustomEvent event = new CustomEvent(this); publisher.publishEvent(event); // Publishes the event through the context } } ``` Here, upon executing some action inside `performAction()`, a new `CustomEvent` gets created and published via injection of `ApplicationEventPublisher`. #### Listening for Specific Events Using ApplicationListener On the receiving end, interested parties implement `ApplicationListener<SpecificEventType>` to react accordingly whenever their targeted type occurs: ```java @Component public class EventConsumer implements ApplicationListener<MyCustomEvent> { @Override public void onApplicationEvent(MyCustomEvent event) { System.out.println("Received my custom event : " + event.getMessage()); } } ``` This listener will automatically receive notifications every time a matching event (`MyCustomEvent`) happens anywhere across different parts of your application[^2]. Additionally, annotations like `@EventListener` provide even more concise syntax while offering flexibility regarding method signatures and parameters used during handling processes. By leveraging these constructs effectively, developers gain powerful tools enabling robust communication patterns throughout complex systems built atop Spring's foundation.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值