You are not logged in.
Well, what have I done..
Accidentally I removed my partition table (my SD card was inside the reader, and device names changed after the reboot). Testdisk was partially successful at bringing back part of it, except the one (most important) partition. What I've got after looks like that:
sdb 8:16 0 167.7G 0 disk
├─sdb1 8:17 0 512M 0 part
└─sdb2 8:18 0 167.2G 0 part
└─backuparch 254:4 0 167.2G 0 crypt
├─archlinux_lvm-swap 254:5 0 8G 0 lvm
└─archlinux_lvm-root 254:6 0 32G 0 lvm But, going back to the beginning:
After getting this output from testdisk:
Partition Start End Size in sectors
>D FAT32 0 32 33 65 101 36 1048576 [NO NAME]
D Linux 25 126 38 9118 105 11 146077696
D Linux 65 101 37 65 166 37 4096I've added the partition:
>P Linux 65 101 37 21888 254 63 350596161After, lvscan does show missing partition
WARNING: Device /dev/mapper/backuparch has size of 350592065 sectors which is smaller than corresponding PV size of 350597120 sectors. Was device resized?
One or more devices used as PVs in VG archlinux_lvm have changed sizes.
ACTIVE '/dev/archlinux_lvm/swap' [8.00 GiB] inherit
ACTIVE '/dev/archlinux_lvm/root' [32.00 GiB] inherit
inactive '/dev/archlinux_lvm/home' [<127.18 GiB] inheritBut by calling
vgchange -aygives the same error as above:
WARNING: Device /dev/mapper/backuparch has size of 350592065 sectors which is smaller than corresponding PV size of 350597120 sectors. Was device resized?
One or more devices used as PVs in VG archlinux_lvm have changed sizes.
device-mapper: reload ioctl on (254:7) failed: Invalid argument
2 logical volume(s) in volume group "archlinux_lvm" now activeSo 5055 sectors are missing. While creating that partition I've included that 4096 sector-sized partition (LUKS header, i guess), but it's still too small.
I'm out of ideas, does anybody know what's going on and would be willing to help please?
Offline
`parted /dev/sdb unit s print free` ?
Online
frostschitz, thank you for taking interest.
parted /dev/sdb unit s print free
Model: ATA INTEL SSDSCKKW18 (scsi)
Disk /dev/sdb: 351651888s
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:
Number Start End Size Type File system Flags
63s 2047s 1985s Free Space
1 2048s 1050623s 1048576s primary fat32 boot
2 1050624s 351646784s 350596161s primary
351646785s 351651887s 5103s Free SpaceNow I see some trailing sectors, and that area is a bit bigger than the missing one. How can I resize that partition? Testdisk won't l let me take any more sectors than I already did?
P. S. Parted says, that this is msdos partition table, but I had GPT. Does that change sectors a bit?
Offline
in parted, `resizepart 2 351651887s`, then check again with `unit s`, `print free` that it's correct
alternatively `resizepart 2 -1`
Last edited by frostschutz (2019-02-05 11:05:54)
Online