Web lists-archives.com

Re: Restore backup to KVM

On 26/09/17 17:31, Reco wrote:
On 26/09/17 13:01, solitone wrote:
It's strange, since it finds /dev/sda, i.e. the entire disk:

[    6.438693] sd 0:0:0:0: [sda] 188743680 512-byte logical blocks:
(96.6 GB/90.0 GiB)
[    6.469182] sd 0:0:0:0: [sda] Write Protect is off
[    6.482421] sd 0:0:0:0: [sda] Write cache: enabled, read cache:
enabled, doesn't support DPO or FUA

However, it then complains that /dev/sda1 does not exists

That's because you don't have any partitions on that disk. Partition
that's start with sector 0 is impossible.

Interesting. I used parted to create one single partition as big as the entire file. Here's what parted shows now:

$ /sbin/parted  alan_restore.img
WARNING: You are not superuser.  Watch out for permissions.
GNU Parted 3.2
Using /media/solitone/Maxtor/vmimages/alan_restore.img
Welcome to GNU Parted! Type 'help' to view a list of commands.

(parted) p
Model:  (file)
Disk /media/solitone/Maxtor/vmimages/alan_restore.img: 96.6GB
Sector size (logical/physical): 512B/512B
Partition Table: loop
Disk Flags:

Number  Start  End     Size    File system  Flags
 1      0.00B  96.6GB  96.6GB  ext4

I assumed that that number 1 referred to partition n. 1, but I must be mistaken.