FastVPSEestiOu/ploop_userspace

Error: /dev/nbd0: unrecognised disk label

Opened this issue · 10 comments

zen commented

I;m mounting ploop image and getting errors:
We process: /mnt/tmp/144/root.hdd/root.hdd
Ploop file size is: 155144159232
version: 2 disk type: 2 heads count: 16 cylinder count: 4915200 sector count: 2048 size in tracks: 1228800 size in sectors: 2516582400 disk in use: 0 first block offset: 10240 flags: 0
For storing 1288490188800 bytes on disk we need 1228800 ploop blocks
We have 5 BAT blocks
We have 262128 slots in 1 map
We have 262144 slots in 2 map
We have 262144 slots in 3 map
We have 262144 slots in 4 map
We have 262144 slots in 5 map
Number of non zero blocks in map: 147952
!!!ERROR!!! We can't found GPT table on this disk
!!!ERROR!!! We can't find ext4 signature
Set device /dev/nbd0 as read only
Try to found partitions on ploop device
Error: /dev/nbd0: unrecognised disk label
First ploop partition was not detected properly, please call partx/partprobe manually
You could mount ploop filesystem with command: mount -r -o noload /dev/nbd0p1 /mnt

Looks like nbd device is not created properly.

Hello!

Do you have snapshots for this image? Could you provide parted /dev/ploopXXX after ploop mount command?

And please clarify kernel, vzctl and ploop versions did you use.

zen commented

Hi,
I'm not running on openvz kernel - that's why I'm using ploop_userpsace. So no /dev/ploop. Also I;m not aware of any snapshots:
ploop snapshot-list DiskDescriptor.xml
PARENT_UUID C UUID FNAME
{00000000-0000-0000-0000-000000000000} * {5fbaabe3-6958-40ff-92a7-860e329aab41} /mnt/tmp/144/root.hdd/root.hdd

uname -a
Linux mozzy.napierala.org 3.13.0-41-generic #70-Ubuntu SMP Tue Nov 25 14:40:34 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

vzctl --version
vzctl version 4.6.1

zen commented

And more verbose output:
We process: /mnt/tmp/144/root.hdd/root.hdd
Ploop file size is: 155144159232
version: 2 disk type: 2 heads count: 16 cylinder count: 4915200 sector count: 2048 size in tracks: 1228800 size in sectors: 2516582400 disk in use: 0 first block offset: 10240 flags: 0
For storing 1288490188800 bytes on disk we need 1228800 ploop blocks
We have 5 BAT blocks
We have 262128 slots in 1 map
We have 262144 slots in 2 map
We have 262144 slots in 3 map
We have 262144 slots in 4 map
We have 262144 slots in 5 map
Number of non zero blocks in map: 147952
!!!ERROR!!! We can't found GPT table on this disk
!!!ERROR!!! We can't find ext4 signature
Set device /dev/nbd0 as read only
Try to found partitions on ploop device
Error: /dev/nbd0: unrecognised disk label
First ploop partition was not detected properly, please call partx/partprobe manually
You could mount ploop filesystem with command: mount -r -o noload /dev/nbd0p1 /mnt

^C
root@mozzy:/usr/src/ploop_userspace# TRACE_REQUESTS=1 ./ploop_userspace /mnt/tmp/144/root.hdd/root.hdd
We process: /mnt/tmp/144/root.hdd/root.hdd
Ploop file size is: 155144159232
version: 2 disk type: 2 heads count: 16 cylinder count: 4915200 sector count: 2048 size in tracks: 1228800 size in sectors: 2516582400 disk in use: 0 first block offset: 10240 flags: 0
For storing 1288490188800 bytes on disk we need 1228800 ploop blocks
We have 5 BAT blocks
We have 262128 slots in 1 map
We have 262144 slots in 2 map
We have 262144 slots in 3 map
We have 262144 slots in 4 map
We have 262144 slots in 5 map
Number of non zero blocks in map: 147952
We got request for reading from offset: 512 length 8 bytes to the end: 520
ploop cluster size: 1048576
global first block offset: 5242880
global ploop block device size 1288490188800
data_page_number: 0
data_page_real_place: 5
offset for current page: 512
ploop file size: 155144159232
position_in_file: 9437696

!!!ERROR!!! We can't found GPT table on this disk
We got request for reading from offset: 1049656 length 2 bytes to the end: 1049658
ploop cluster size: 1048576
global first block offset: 5242880
global ploop block device size 1288490188800
data_page_number: 1
data_page_real_place: 7
offset for current page: 1080
ploop file size: 155144159232
position_in_file: 11535416

We got request for reading from offset: 1080 length 2 bytes to the end: 1082
ploop cluster size: 1048576
global first block offset: 5242880
global ploop block device size 1288490188800
data_page_number: 0
data_page_real_place: 5
offset for current page: 1080
ploop file size: 155144159232
position_in_file: 9438264

!!!ERROR!!! We can't find ext4 signature
Set device /dev/nbd0 as read only
Try to found partitions on ploop device
We got request for reading from offset: 0 length 1024 bytes to the end: 1024
ploop cluster size: 1048576
global first block offset: 5242880
global ploop block device size 1288490188800
data_page_number: 0
data_page_real_place: 5
offset for current page: 0
ploop file size: 155144159232
position_in_file: 9437184

We got request for reading from offset: 1024 length 1024 bytes to the end: 2048
ploop cluster size: 1048576
global first block offset: 5242880
global ploop block device size 1288490188800
data_page_number: 0
data_page_real_place: 5
offset for current page: 1024
ploop file size: 155144159232
position_in_file: 9438208

We got request for reading from offset: 2048 length 1024 bytes to the end: 3072
ploop cluster size: 1048576
global first block offset: 5242880
global ploop block device size 1288490188800
data_page_number: 0
data_page_real_place: 5
offset for current page: 2048
ploop file size: 155144159232
position_in_file: 9439232

We got request for reading from offset: 3072 length 1024 bytes to the end: 4096
ploop cluster size: 1048576
global first block offset: 5242880
global ploop block device size 1288490188800
data_page_number: 0
data_page_real_place: 5
offset for current page: 3072
ploop file size: 155144159232
position_in_file: 9440256

We got request for reading from offset: 4096 length 1024 bytes to the end: 5120
ploop cluster size: 1048576
global first block offset: 5242880
global ploop block device size 1288490188800
data_page_number: 0
data_page_real_place: 5
offset for current page: 4096
ploop file size: 155144159232
position_in_file: 9441280

We got request for reading from offset: 5120 length 1024 bytes to the end: 6144
ploop cluster size: 1048576
global first block offset: 5242880
global ploop block device size 1288490188800
data_page_number: 0
data_page_real_place: 5
offset for current page: 5120
ploop file size: 155144159232
position_in_file: 9442304

We got request for reading from offset: 6144 length 1024 bytes to the end: 7168
ploop cluster size: 1048576
global first block offset: 5242880
global ploop block device size 1288490188800
data_page_number: 0
data_page_real_place: 5
offset for current page: 6144
ploop file size: 155144159232
position_in_file: 9443328

We got request for reading from offset: 7168 length 1024 bytes to the end: 8192
ploop cluster size: 1048576
global first block offset: 5242880
global ploop block device size 1288490188800
data_page_number: 0
data_page_real_place: 5
offset for current page: 7168
ploop file size: 155144159232
position_in_file: 9444352

We got request for reading from offset: 12288 length 1024 bytes to the end: 13312
ploop cluster size: 1048576
global first block offset: 5242880
global ploop block device size 1288490188800
data_page_number: 0
data_page_real_place: 5
offset for current page: 12288
ploop file size: 155144159232
position_in_file: 9449472

We got request for reading from offset: 13312 length 1024 bytes to the end: 14336
ploop cluster size: 1048576
global first block offset: 5242880
global ploop block device size 1288490188800
data_page_number: 0
data_page_real_place: 5
offset for current page: 13312
ploop file size: 155144159232
position_in_file: 9450496

We got request for reading from offset: 14336 length 1024 bytes to the end: 15360
ploop cluster size: 1048576
global first block offset: 5242880
global ploop block device size 1288490188800
data_page_number: 0
data_page_real_place: 5
offset for current page: 14336
ploop file size: 155144159232
position_in_file: 9451520

We got request for reading from offset: 15360 length 1024 bytes to the end: 16384
ploop cluster size: 1048576
global first block offset: 5242880
global ploop block device size 1288490188800
data_page_number: 0
data_page_real_place: 5
offset for current page: 15360
ploop file size: 155144159232
position_in_file: 9452544

We got request for reading from offset: 131072 length 4096 bytes to the end: 135168
ploop cluster size: 1048576
global first block offset: 5242880
global ploop block device size 1288490188800
data_page_number: 0
data_page_real_place: 5
offset for current page: 131072
ploop file size: 155144159232
position_in_file: 9568256

We got request for reading from offset: 65536 length 4096 bytes to the end: 69632
ploop cluster size: 1048576
global first block offset: 5242880
global ploop block device size 1288490188800
data_page_number: 0
data_page_real_place: 5
offset for current page: 65536
ploop file size: 155144159232
position_in_file: 9502720

We got request for reading from offset: 32768 length 4096 bytes to the end: 36864
ploop cluster size: 1048576
global first block offset: 5242880
global ploop block device size 1288490188800
data_page_number: 0
data_page_real_place: 5
offset for current page: 32768
ploop file size: 155144159232
position_in_file: 9469952

We got request for reading from offset: 8192 length 4096 bytes to the end: 12288
ploop cluster size: 1048576
global first block offset: 5242880
global ploop block device size 1288490188800
data_page_number: 0
data_page_real_place: 5
offset for current page: 8192
ploop file size: 155144159232
position_in_file: 9445376

We got request for reading from offset: 16384 length 12288 bytes to the end: 28672
ploop cluster size: 1048576
global first block offset: 5242880
global ploop block device size 1288490188800
data_page_number: 0
data_page_real_place: 5
offset for current page: 16384
ploop file size: 155144159232
position_in_file: 9453568

We got request for reading from offset: 262144 length 4096 bytes to the end: 266240
ploop cluster size: 1048576
global first block offset: 5242880
global ploop block device size 1288490188800
data_page_number: 0
data_page_real_place: 5
offset for current page: 262144
ploop file size: 155144159232
position_in_file: 9699328

Error: /dev/nbd0: unrecognised disk label
First ploop partition was not detected properly, please call partx/partprobe manually
You could mount ploop filesystem with command: mount -r -o noload /dev/nbd0p1 /mnt

Neither partprobe nor kpartx can discover any partitions. What else can I check?

Is this image using 1.2Tb inside ploop and 120Gb outside?

zen commented

I;m not sure what you are asking for. The image itself is 144GiB in size.

I'm interested in filesystem size :) But at this point I have no ideas about this issue :(

zen commented

Underlying FS is 394G

zen commented

I think your tool assumes that fs insode the container is ext4. In my image it's probably ext3 (I recall host system was Ubuntu 10.04 - there was no support for vzquota and other tools for ext4 in that time).

zen commented

Looks like I have snapshot inside:
root@hornet:/mnt/original/144/root.hdd# ploop snapshot-list DiskDescriptor.xml
PARENT_UUID C UUID FNAME
{00000000-0000-0000-0000-000000000000} * {5fbaabe3-6958-40ff-92a7-860e329aab41} /mnt/original/144/root.hdd/root.hdd

I understand, that this tool does not support snaphots?

Unfortunately, I haven't support for snapshots now. Because for snapshots support I should build snapshot tree and parse all xml config files from ploop and it's very complex task :( But patches welcome :)