Please add dupport in clonezilla to handle /dev/nbd devices
please move it to enhancements category (i logged it here because i have no access to log enhancements)
https://sourceforge.net/p/clonezilla/discussion/Help/thread/d2d2a480/
so i have a test.qcow2 image
modprobe nbd max_part=63
qemu-nbd --connect=/dev/nbd0 /home/test/test.qcow2
now i have the nbd0 device working perfectley.
and i usualy use dd to write this image to a hdd
dd if=/dev/nbd0 of=/dev/sda bs=8M
but this takes time becuase the dd it's just doing bit by bit copy
now i would like to use clonezilla to create an disk to image and also do a disk to disk
if i start clonezilla /dev/nbd0 device is not seen. in the gui only /dev/sda is seen
if i use ocs-sr i get an error "no input device"
test@PC:~$ sudo ocs-sr savedisk test1.clz nbd0
Setting the TERM as xterm
Starting /usr/sbin/ocs-sr at 2016-05-09 15:11:50 PDT...
*.
Clonezilla image dir: /home/partimag**.
Shutting down the Logical Volume Manager
Finished Shutting down the Logical Volume Manager
Selected device [nbd0] found!
The selected devices: nbd0
**.
setterm: terminal xterm does not support --blank
Activating the partition info in /proc... done!
Selected device [nbd0] found!
The selected devices: nbd0
Searching for data partition(s)...
Excluding busy partition or disk...
Unmounted partitions (including extended or swap):
Collecting info. done!
Searching for swap partition(s)...
Excluding busy partition or disk...
Unmounted partitions (including extended or swap):
Collecting info. done!
The data partition to be saved:
The swap partition to be saved:
setterm: terminal xterm does not support --blank
Activating the partition info in /proc... done!
No input device!
test@PC:~$ sudo parted -s /dev/nbd0 print
Model: Unknown (unknown)
Disk /dev/nbd0: 494GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:
Number Start End Size Type File system Flags
1 1049kB 525MB 524MB primary fat16
2 525MB 1050MB 524MB primary ext4 boot
3 1050MB 34.6GB 33.6GB primary ext4
4 34.6GB 480GB 445GB extended
5 34.6GB 68.2GB 33.6GB logical
6 68.2GB 102GB 33.6GB logical ext4
7 102GB 480GB 378GB logical lvm
test@PC:~$ cat /proc/partitions
major minor #blocks name
1 0 65536 ram0
1 1 65536 ram1
1 2 65536 ram2
1 3 65536 ram3
1 4 65536 ram4
1 5 65536 ram5
1 6 65536 ram6
1 7 65536 ram7
1 8 65536 ram8
1 9 65536 ram9
1 10 65536 ram10
1 11 65536 ram11
1 12 65536 ram12
1 13 65536 ram13
1 14 65536 ram14
1 15 65536 ram15
8 0 156290904 sda
8 1 153163776 sda1
8 2 3125248 sda2
11 0 1048575 sr0
8 32 60653568 sdc
8 33 58061824 sdc1
8 37 2588672 sdc5
43 0 482344960 nbd0
43 1 512000 nbd0p1
43 2 512000 nbd0p2
43 3 32768000 nbd0p3
43 5 32768000 nbd0p5
43 6 32768000 nbd0p6
43 7 369518592 nbd0p7
test@PC:~$ blkid
/dev/sda1: UUID="c1e522a2-1941-47fb-967f-28da7b8f37ef" TYPE="ext4" PARTUUID="5251f42b-01"
/dev/sda2: UUID="ac9fbe8e-c4a9-4f35-938e-ebabeb71b3f7" TYPE="swap" PARTUUID="5251f42b-02"
/dev/sdc1: UUID="21c443e4-7ae1-4b37-a426-e9e5b497e162" TYPE="ext4" PARTUUID="461bb889-01"
/dev/sdc5: UUID="c8db8cde-9df5-4c93-8183-1f0f819364f3" TYPE="swap" PARTUUID="461bb889-05"
see also this i think same question was asked in teh past but has not been answered:
https://sourceforge.net/p/clonezilla/discussion/Help/thread/41850f6d/
"Good point. The device name /dev/nbd is not supported by Clonezilla. We should add that in the future. However, if you can make your virtual disk as /dev/sd format, the you can use Clonezilla without any issue.
For the time being, you can use partclone to specify the device you want to save. Partclone is very similar to dd, so I believe there is no problem for you to use that."
Steven
We will add this after the next stable one is release. Before that, could you please show us the qemu command and options to start the VM?
Thanks.
Steven
this are the 2 commands you need
once this is done the /dev/nbd0 will act like any other disk
The device name /dev/nbd* is now supported in Clonezilla live 2.7.1 or 20160621-* .
http://clonezilla.org/downloads.php
Please give it a try and let us know the results.
Thanks.
Steven
thanks very much, i posted on the other thread, nbd worked fine disk2disk but LVM is not working even for normal devices in that build. + if lvm fails why dd is not used ?
If it's possible, please open one issue for one bug.
Thanks.
Steven