I am running on the Centos 6.5 x86_64 boot disk.
# uname -a Linux localhost.localdomain 2.6.32-431.el6.x86_64 #1 SMP Fri Nov 22 03:15:09 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
I have been running ddrescue for a while and now it is time to check the progress.
I want to take the oldhd.img output from ddrescue and load it to satrt performing recovery (LVM, then filesystem) but I want to do a copy on write with that.
I fetched http://www.atcomputing.nl/Tools/cowloop/packages/cowloop-3.2.0.1.tar.gz, built it
root@localhost ~/cowloop-3.2.0.1 # cowdev -a /root/oldhd.img /root/oldhd.cow Cannot open /dev/cow/ctl: No such device or address
So I:
root@localhost /dev # mkdir cow
root@localhost /dev # cd cow/
root@localhost /dev/cow # mknod /dev/cow/ctl b 241 255
But I still get a
root@localhost ~ # cowdev -a /root/oldhd.img /root/oldhd.cow Cannot open /dev/cow/ctl: No such device or address
Listing /proc/devices I do not see 241.
What am I doing wrong here?
-Jason
-- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- - - - Jason Pyeron PD Inc. http://www.pdinc.us - - Principal Consultant 10 West 24th Street #100 - - +1 (443) 269-1555 x333 Baltimore, Maryland 21218 - - - -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- This message is copyright PD Inc, subject to license 20080407P00.
On 8/26/2014 5:03 PM, Jason Pyeron wrote:
What am I doing wrong here?
A) you don't create anything in /dev, the driver should be using devfs to create its own devnodes on the fly as needed.
B) you apparently never loaded the driver. see http://www.atcomputing.nl/Tools/cowloop/loadunload.html
-----Original Message----- From: centos-bounces@centos.org [mailto:centos-bounces@centos.org] On Behalf Of John R Pierce Sent: Tuesday, August 26, 2014 20:11 To: centos@centos.org Subject: Re: [CentOS] Copy on write loop block driver
On 8/26/2014 5:03 PM, Jason Pyeron wrote:
What am I doing wrong here?
A) you don't create anything in /dev, the driver should be using devfs to create its own devnodes on the fly as needed.
I assumed such, but it did not work.
B) you apparently never loaded the driver. see http://www.atcomputing.nl/Tools/cowloop/loadunload.html
3.2.0.1 says:
root@localhost ~/cowloop-3.2.0.1 # cat RELEASENOTES.3.2.0 This is version 3.2 of the Copy on Write loop driver 'cowloop' by ATComputing in Nijmegen, The Netherlands. Release date: September 2009. ----
Cowloop wil be part of the 2.6.31 kernel. This has lead to some changes in the cowloop utils. Obviously the kernel module has been removed from the distribution, only the utilities remain.
root@localhost ~/cowloop-3.2.0.1 # modprobe cowloop FATAL: Module cowloop not found.
root@localhost ~/cowloop-3.2.0.1 # find | grep loop ./man/man4/cowloop.4 ./doc/cowloop.ps.bz2 ./doc/README.cowloop.doc ./src/cowloop.h
So there is no loop driver compiled from this source, but the docs say it is supposed to be included in
root@localhost ~/cowloop-3.2.0.1 # yum whatprovides *cowloop* Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile No Matches found
root@localhost ~ # rpm -iv kernel-2.6.32-431.el6.src.rpm
It looks like the kernel does not have it set
root@localhost ~/rpmbuild/BUILD # grep -ri cowloop kernel-2.6.32-431.el6/ kernel-2.6.32-431.el6/linux-2.6.32-431.el6.x86_64/temp-i686-debug-final:# CONFIG_COWLOOP is not set kernel-2.6.32-431.el6/linux-2.6.32-431.el6.x86_64/.config.old:# CONFIG_COWLOOP is not set kernel-2.6.32-431.el6/linux-2.6.32-431.el6.x86_64/temp-i686-final:# CONFIG_COWLOOP is not set kernel-2.6.32-431.el6/linux-2.6.32-431.el6.x86_64/config-generic:# CONFIG_COWLOOP is not set
I cannot make this a module:
root@localhost ~/rpmbuild/BUILD/kernel-2.6.32-431.el6/linux-2.6.32-431.el6.x86_64 # make HOSTLD scripts/kconfig/conf scripts/kconfig/conf -s arch/x86/Kconfig .config:1304:warning: symbol value 'm' invalid for BLK_DEV_COW_COMMON # # configuration written to .config #
-----Original Message----- From: Jason Pyeron Sent: Wednesday, August 27, 2014 0:09
-----Original Message----- From: John R Pierce Sent: Tuesday, August 26, 2014 20:11
On 8/26/2014 5:03 PM, Jason Pyeron wrote:
What am I doing wrong here?
A) you don't create anything in /dev, the driver should be using devfs to create its own devnodes on the fly as needed.
I assumed such, but it did not work.
B) you apparently never loaded the driver. see http://www.atcomputing.nl/Tools/cowloop/loadunload.html
3.2.0.1 says:
root@localhost ~/cowloop-3.2.0.1 # cat RELEASENOTES.3.2.0 This is version 3.2 of the Copy on Write loop driver 'cowloop' by ATComputing in Nijmegen, The Netherlands. Release date: September 2009.
Cowloop wil be part of the 2.6.31 kernel. This has lead to some changes in the cowloop utils. Obviously the kernel module has been removed from the distribution, only the utilities remain.
Per http://en.wikipedia.org/wiki/Cowloop
Cowloop (copy-on-write loop driver) was a Linux kernel driver ... Cowloop is now largely deprecated in favor of the device-mapper snapshot target which provides the same functionality.
On to learning device mapper, https://www.kernel.org/doc/Documentation/device-mapper/snapshot.txt
-- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- - - - Jason Pyeron PD Inc. http://www.pdinc.us - - Principal Consultant 10 West 24th Street #100 - - +1 (443) 269-1555 x333 Baltimore, Maryland 21218 - - - -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- This message is copyright PD Inc, subject to license 20080407P00.
Solved!
-----Original Message----- From: Jason Pyeron Sent: Wednesday, August 27, 2014 0:43
-----Original Message----- From: Jason Pyeron Sent: Wednesday, August 27, 2014 0:09
-----Original Message----- From: John R Pierce Sent: Tuesday, August 26, 2014 20:11
On 8/26/2014 5:03 PM, Jason Pyeron wrote:
What am I doing wrong here?
A) you don't create anything in /dev, the driver should be using devfs to create its own devnodes on the fly as needed.
I assumed such, but it did not work.
B) you apparently never loaded the driver. see http://www.atcomputing.nl/Tools/cowloop/loadunload.html
3.2.0.1 says:
root@localhost ~/cowloop-3.2.0.1 # cat RELEASENOTES.3.2.0 This is version 3.2 of the Copy on Write loop driver 'cowloop' by ATComputing in Nijmegen, The Netherlands. Release date: September 2009.
Cowloop wil be part of the 2.6.31 kernel. This has lead to some changes in the cowloop utils. Obviously the kernel module has been removed from the distribution, only the utilities remain.
Per http://en.wikipedia.org/wiki/Cowloop
Cowloop (copy-on-write loop driver) was a Linux kernel driver ... Cowloop is now largely deprecated in favor of the device-mapper snapshot target which provides the same functionality.
On to learning device mapper, https://www.kernel.org/doc/Documentation/device-mapper/snapshot.txt
IMGLOOP=$(losetup -fr --show /root/oldhd.img) dd if=/dev/zero of=/root/oldhd.cow bs=1 count=0 seek=$(wc -c < /root/oldhd.img) COWLOOP=$(losetup -f --show /root/oldhd.cow) echo 0 `blockdev --getsz $IMGLOOP` snapshot $IMGLOOP $COWLOOP p 4 | dmsetup create cowimg kpartx -av /dev/mapper/cowimg
-- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- - - - Jason Pyeron PD Inc. http://www.pdinc.us - - Principal Consultant 10 West 24th Street #100 - - +1 (443) 269-1555 x333 Baltimore, Maryland 21218 - - - -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- This message is copyright PD Inc, subject to license 20080407P00.