Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Can't have a partition outside the disk! #37

Open
jishvi opened this issue Jun 27, 2021 · 0 comments
Open

Error: Can't have a partition outside the disk! #37

jishvi opened this issue Jun 27, 2021 · 0 comments

Comments

@jishvi
Copy link

jishvi commented Jun 27, 2021

I'm trying to shrink a 200 GB boot disk (43GB of this disk is used) to a 50 GB disk on GCP. So I attached a 50 GB additional disk and ran weresync -C -L grub2 -g 1 /dev/sda /dev/sdb. But I'm getting this error upon running the weresync command.

weresync -C -L grub2 -g 1 /dev/sda /dev/sdb

Traceback (most recent call last):
  File "/usr/local/bin/weresync", line 11, in <module>
    load_entry_point('WereSync==1.1.5', 'console_scripts', 'weresync')()
  File "/usr/local/lib64/python3.6/site-packages/weresync/interface/cli.py", line 255, in main
    lvm_target, args.bootloader)
  File "/usr/local/lib/python3.6/site-packages/pydbus/proxy_method.py", line 75, in __call__
    0, timeout_to_glib(timeout), None).unpack()
GLib.Error: g-io-error-quark: GDBus.Error:unknown.DeviceError: ('/dev/sdb', 'Non-zero exit code', "Error: Can't have a partition outside the disk!\nModel: Google PersistentDisk (scsi)\nDisk /dev/sdb: 53.7GB\nSector size (logical/physical): 512B/4096B\nPartition Table: unknown\nDisk Flags: \n") (36)

The partition size created by weresync is greater than the disk size.

 sudo fdisk -l -u /dev/sdb

Disk /dev/sdb: 53.7 GB, 53687091200 bytes, 104857600 sectors
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: dos
Disk identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *        2048   105737510    52867731+  83  Linux

I followed the instruction in this article.

Can anyone help?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant