
Damn. Should have been kpartx not partx. Just pretend the following never existed :)
-----Original Message----- From: luv-main-bounces@luv.asn.au [mailto:luv-main-bounces@luv.asn.au] On Behalf Of James Harper Sent: Saturday, 23 June 2012 2:19 PM To: luv-main@luv.asn.au Subject: partx in modern kernels
I get the following when I try and partx an lvm volume containing a Windows 7 machine:
root@hostname:~# partx /dev/vg-fast/virt-capture1-0 # 1: 2048-125827071 (125825024 sectors, 64422 MB)
The above is the correct dimensions of the partition.
root@hostname:~# partx -a /dev/vg-fast/virt-capture1-0 partx: /dev/vg-fast/virt-capture1-0: error adding partition 1
The interesting bits from an strace:
open("/sys/dev/block/254:26", O_RDONLY) = 3 newfstatat(3, "partition", 0x7ffff554a660, 0) = -1 ENOENT (No such file or directory) openat(3, "dm/uuid", O_RDONLY) = 4 fcntl(4, F_GETFL) = 0x8000 (flags O_RDONLY|O_LARGEFILE) fstat(4, {st_mode=S_IFREG|0444, st_size=4096, ...}) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f83f10b0000 lseek(4, 0, SEEK_CUR) = 0 read(4, "LVM-QUSNncQ5s6iHG1gMD7g9dNFQGV6Y"..., 4096) = 69 close(4) = 0 munmap(0x7f83f10b0000, 4096) = 0 close(3) = 0 ... stat("/dev/vg-fast/virt-capture1-0", {st_mode=S_IFBLK|S_ISVTX|0660, st_rdev=makedev(254, 26), ...}) = 0 open("/dev/vg-fast/virt-capture1-0", O_RDONLY) = 3 fadvise64(3, 0, 0, POSIX_FADV_RANDOM) = 0 fstat(3, {st_mode=S_IFBLK|S_ISVTX|0660, st_rdev=makedev(254, 26), ...}) = 0 uname({sys="Linux", node="keechvs3", ...}) = 0 ioctl(3, BLKGETSIZE64, 0x12ef0e0) = 0 ioctl(3, CDROM_GET_CAPABILITY, 0) = -1 ENOTTY (Inappropriate ioctl for device) lseek(3, 0, SEEK_SET) = 0 read(3, "3\300\216\320\274\0|\216\300\216\330\276\0|\277\0\6\271\0\2\374\363\2 44Ph\34\6\313\373\271\4\0"..., 1024) = 1024 ioctl(3, BLKSSZGET, 0x12ef0f8) = 0 ioctl(3, BLKPG, 0x7ffff554b880) = -1 EINVAL (Invalid argument) ... close(3)
Any suggestions?
Kernel is debian 3.2.0-2-amd64
Thanks
James _______________________________________________ luv-main mailing list luv-main@luv.asn.au http://lists.luv.asn.au/listinfo/luv-main