Discussion:
[Qemu-discuss] Issue related to mounting /dev/nbd0p1
ramakanth varala
2018-11-29 10:10:43 UTC
Permalink
Hi All,

I have two partitions it's listing when i do fdisk -l as below.

[***@localhost ~]# fdisk /dev/nbd0 -l

Disk /dev/nbd0: 21.4 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/nbd0p1 * 1 13 104391 83 Linux
/dev/nbd0p2 14 2610 20860402+ 8e Linux LVM


It's failing same , when i try use mount command as below.

[***@localhost ~]# mount /dev/nbd0p1 /home/test.1.3.debug/mnt/boot
mount: special device /dev/nbd0p1 does not exist

Can any body help here like what is being missed out..?

Thanks
Rama Kanth
Nerijus Baliūnas
2018-11-29 10:32:15 UTC
Permalink
Post by ramakanth varala
mount: special device /dev/nbd0p1 does not exist
partx -a /dev/nbd0
ramakanth varala
2018-11-29 10:38:44 UTC
Permalink
thanks for the reply ..

But i get below error when i do ..


[***@localhost ~]# partx -a /dev/nbd0
HDIO_GETGEO: Inappropriate ioctl for device

On Thu, Nov 29, 2018 at 4:04 PM Nerijus Baliūnas <
Post by Nerijus Baliūnas
Post by ramakanth varala
mount: special device /dev/nbd0p1 does not exist
partx -a /dev/nbd0
Nerijus Baliūnas
2018-11-29 10:50:38 UTC
Permalink
Please try kpartx -a /dev/nbd0
Post by ramakanth varala
thanks for the reply ..
But i get below error when i do ..
HDIO_GETGEO: Inappropriate ioctl for device
On Thu, Nov 29, 2018 at 4:04 PM Nerijus Baliūnas <
Post by Nerijus Baliūnas
Post by ramakanth varala
mount: special device /dev/nbd0p1 does not exist
partx -a /dev/nbd0
ramakanth varala
2018-11-29 11:46:47 UTC
Permalink
Still with some errors..

[***@localhost ~]# kpartx -a /dev/nbd0
read error, sector 0
read error, sector 1
read error, sector 29
[***@localhost ~]# ls /dev/nbd
nbd0 nbd1 nbd10 nbd11 nbd12 nbd13 nbd14 nbd15 nbd2 nbd3 nbd4
nbd5 nbd6 nbd7 nbd8 nbd9



On Thu, Nov 29, 2018 at 4:22 PM Nerijus Baliūnas <
Post by Nerijus Baliūnas
Please try kpartx -a /dev/nbd0
Post by ramakanth varala
thanks for the reply ..
But i get below error when i do ..
HDIO_GETGEO: Inappropriate ioctl for device
On Thu, Nov 29, 2018 at 4:04 PM Nerijus Baliūnas <
Post by Nerijus Baliūnas
Post by ramakanth varala
mount: special device /dev/nbd0p1 does not exist
partx -a /dev/nbd0
Jakob Bohm
2018-11-29 16:31:46 UTC
Permalink
Check

   cat /proc/partitions

If the partitions are not listed there, the kernel does not
recognize them, perhaps the kernel doesn't recognize that
nbd0 is a "partitionable disk", and thus does not create the
internal nbd0p1 and ndb0p2 devices.

If the partitions are listed there, you just need to create the
actual /dev/nbd0p1 and /dev/nbd0p2 file names with mknod or
figure out why your "/dev/" management software (maybe udev,
maybe something better) doesn't do that for you.
Post by ramakanth varala
Still with some errors..
read error, sector 0
read error, sector 1
read error, sector 29
nbd0 nbd1 nbd10 nbd11 nbd12 nbd13 nbd14 nbd15 nbd2 nbd3 nbd4
nbd5 nbd6 nbd7 nbd8 nbd9
On Thu, Nov 29, 2018 at 4:22 PM Nerijus Baliūnas <
Post by Nerijus Baliūnas
Please try kpartx -a /dev/nbd0
Post by ramakanth varala
thanks for the reply ..
But i get below error when i do ..
HDIO_GETGEO: Inappropriate ioctl for device
On Thu, Nov 29, 2018 at 4:04 PM Nerijus Baliūnas <
Post by Nerijus Baliūnas
Post by ramakanth varala
mount: special device /dev/nbd0p1 does not exist
partx -a /dev/nbd0
Enjoy

Jakob
--
Jakob Bohm, CIO, Partner, WiseMo A/S. https://www.wisemo.com
Transformervej 29, 2860 Søborg, Denmark. Direct +45 31 13 16 10
This public discussion message is non-binding and may contain errors.
WiseMo - Remote Service Management for PCs, Phones and Embedded
Pascal
2018-11-30 08:19:06 UTC
Permalink
restart from zero if possible...

# qemu-nbd -d /dev/nbd0
# modprobe -rv nbd

# modprobe nbd
# qemu-nbd -c /dev/nbd0 /the/file
# blockdev --rereadpt /dev/nbd0
# fdisk -l /dev/nbd0
# mount /dev/nbd0p1 /mount/point
Post by Jakob Bohm
Check
cat /proc/partitions
If the partitions are not listed there, the kernel does not
recognize them, perhaps the kernel doesn't recognize that
nbd0 is a "partitionable disk", and thus does not create the
internal nbd0p1 and ndb0p2 devices.
If the partitions are listed there, you just need to create the
actual /dev/nbd0p1 and /dev/nbd0p2 file names with mknod or
figure out why your "/dev/" management software (maybe udev,
maybe something better) doesn't do that for you.
Post by ramakanth varala
Still with some errors..
read error, sector 0
read error, sector 1
read error, sector 29
nbd0 nbd1 nbd10 nbd11 nbd12 nbd13 nbd14 nbd15 nbd2 nbd3
nbd4
Post by ramakanth varala
nbd5 nbd6 nbd7 nbd8 nbd9
On Thu, Nov 29, 2018 at 4:22 PM Nerijus Baliūnas <
Post by Nerijus Baliūnas
Please try kpartx -a /dev/nbd0
Post by ramakanth varala
thanks for the reply ..
But i get below error when i do ..
HDIO_GETGEO: Inappropriate ioctl for device
On Thu, Nov 29, 2018 at 4:04 PM Nerijus Baliūnas <
Post by Nerijus Baliūnas
Post by ramakanth varala
mount: special device /dev/nbd0p1 does not exist
partx -a /dev/nbd0
Enjoy
Jakob
--
Jakob Bohm, CIO, Partner, WiseMo A/S. https://www.wisemo.com
Transformervej 29, 2860 Søborg, Denmark. Direct +45 31 13 16 10
This public discussion message is non-binding and may contain errors.
WiseMo - Remote Service Management for PCs, Phones and Embedded
ramakanth varala
2018-11-30 13:04:33 UTC
Permalink
Hi Pascal & Jakob,

I started from first .

I created manully the partitions as below

27 mknod /dev/nbd0p1 b 1 4
28 mknod /dev/nbd0p2 b 1 4

still in /proc/partitions i don't see any info , it shows as below

[***@localhost ~]# cat /proc/partitions
major minor #blocks name

8 0 62914560 sda
8 1 104391 sda1
8 2 62806117 sda2
253 0 56655872 dm-0
253 1 6127616 dm-1

[***@localhost ~]# fdisk -l /dev/nbd0

Disk /dev/nbd0: 21.4 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/nbd0p1 * 1 13 104391 83 Linux
/dev/nbd0p2 14 2610 20860402+ 8e Linux LVM


when i try for mount , i see below error


[***@localhost ~]# mount /dev/nbd0p1 /home/test/test.3.5.1b.debug/mnt/boot
mount: you must specify the filesystem type

i tried to give file system type as below, still issues.

[***@localhost ~]# mount -t ext3 /dev/nbd0p1
/home/test/test.3.5.1b.debug/mnt/boot
mount: wrong fs type, bad option, bad superblock on /dev/nbd0p1,
missing codepage or other error
In some cases useful info is found in syslog - try
dmesg | tail or so


Any inputs would be really helpfull..


Thanks
Rama Kanth
Post by Pascal
restart from zero if possible...
# qemu-nbd -d /dev/nbd0
# modprobe -rv nbd
# modprobe nbd
# qemu-nbd -c /dev/nbd0 /the/file
# blockdev --rereadpt /dev/nbd0
# fdisk -l /dev/nbd0
# mount /dev/nbd0p1 /mount/point
Post by Jakob Bohm
Check
cat /proc/partitions
If the partitions are not listed there, the kernel does not
recognize them, perhaps the kernel doesn't recognize that
nbd0 is a "partitionable disk", and thus does not create the
internal nbd0p1 and ndb0p2 devices.
If the partitions are listed there, you just need to create the
actual /dev/nbd0p1 and /dev/nbd0p2 file names with mknod or
figure out why your "/dev/" management software (maybe udev,
maybe something better) doesn't do that for you.
Post by ramakanth varala
Still with some errors..
read error, sector 0
read error, sector 1
read error, sector 29
nbd0 nbd1 nbd10 nbd11 nbd12 nbd13 nbd14 nbd15 nbd2 nbd3
nbd4
Post by ramakanth varala
nbd5 nbd6 nbd7 nbd8 nbd9
On Thu, Nov 29, 2018 at 4:22 PM Nerijus Baliūnas <
Post by Nerijus Baliūnas
Please try kpartx -a /dev/nbd0
Post by ramakanth varala
thanks for the reply ..
But i get below error when i do ..
HDIO_GETGEO: Inappropriate ioctl for device
On Thu, Nov 29, 2018 at 4:04 PM Nerijus Baliūnas <
/home/test.1.3.debug/mnt/boot
Post by Jakob Bohm
Post by ramakanth varala
Post by Nerijus Baliūnas
Post by ramakanth varala
Post by Nerijus Baliūnas
Post by ramakanth varala
mount: special device /dev/nbd0p1 does not exist
partx -a /dev/nbd0
Enjoy
Jakob
--
Jakob Bohm, CIO, Partner, WiseMo A/S. https://www.wisemo.com
Transformervej 29, 2860 Søborg, Denmark. Direct +45 31 13 16 10
This public discussion message is non-binding and may contain errors.
WiseMo - Remote Service Management for PCs, Phones and Embedded
Pascal
2018-11-30 13:17:40 UTC
Permalink
do not create nodes manually but with fdisk on nbd0 :

# fdisk /dev/nbd0
## now create your partitions in fdisk
## use w to write changes and q to quit fdisk

# blocdev --rereadpt /dev/nbd0

# ls /dev/nbd0*
## you will now have /dev/nbd0, /dev/nbd0p1 and /dev/nbd0p2

if this is not the case while the fdisk command ended without error :

# sync
# qemu-nbd -d /dev/nbd0
# qemu-nbd -c /dev/nbd0 /the/target
Post by ramakanth varala
Hi Pascal & Jakob,
I started from first .
I created manully the partitions as below
27 mknod /dev/nbd0p1 b 1 4
28 mknod /dev/nbd0p2 b 1 4
still in /proc/partitions i don't see any info , it shows as below
major minor #blocks name
8 0 62914560 sda
8 1 104391 sda1
8 2 62806117 sda2
253 0 56655872 dm-0
253 1 6127616 dm-1
Disk /dev/nbd0: 21.4 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/nbd0p1 * 1 13 104391 83 Linux
/dev/nbd0p2 14 2610 20860402+ 8e Linux LVM
when i try for mount , i see below error
/home/test/test.3.5.1b.debug/mnt/boot
mount: you must specify the filesystem type
i tried to give file system type as below, still issues.
/home/test/test.3.5.1b.debug/mnt/boot
mount: wrong fs type, bad option, bad superblock on /dev/nbd0p1,
missing codepage or other error
In some cases useful info is found in syslog - try
dmesg | tail or so
Any inputs would be really helpfull..
Thanks
Rama Kanth
Post by Pascal
restart from zero if possible...
# qemu-nbd -d /dev/nbd0
# modprobe -rv nbd
# modprobe nbd
# qemu-nbd -c /dev/nbd0 /the/file
# blockdev --rereadpt /dev/nbd0
# fdisk -l /dev/nbd0
# mount /dev/nbd0p1 /mount/point
Post by Jakob Bohm
Check
cat /proc/partitions
If the partitions are not listed there, the kernel does not
recognize them, perhaps the kernel doesn't recognize that
nbd0 is a "partitionable disk", and thus does not create the
internal nbd0p1 and ndb0p2 devices.
If the partitions are listed there, you just need to create the
actual /dev/nbd0p1 and /dev/nbd0p2 file names with mknod or
figure out why your "/dev/" management software (maybe udev,
maybe something better) doesn't do that for you.
Post by ramakanth varala
Still with some errors..
read error, sector 0
read error, sector 1
read error, sector 29
nbd0 nbd1 nbd10 nbd11 nbd12 nbd13 nbd14 nbd15 nbd2 nbd3
nbd4
Post by ramakanth varala
nbd5 nbd6 nbd7 nbd8 nbd9
On Thu, Nov 29, 2018 at 4:22 PM Nerijus Baliūnas <
Post by Nerijus Baliūnas
Please try kpartx -a /dev/nbd0
Post by ramakanth varala
thanks for the reply ..
But i get below error when i do ..
HDIO_GETGEO: Inappropriate ioctl for device
On Thu, Nov 29, 2018 at 4:04 PM Nerijus Baliūnas <
/home/test.1.3.debug/mnt/boot
Post by Jakob Bohm
Post by ramakanth varala
Post by Nerijus Baliūnas
Post by ramakanth varala
Post by Nerijus Baliūnas
Post by ramakanth varala
mount: special device /dev/nbd0p1 does not exist
partx -a /dev/nbd0
Enjoy
Jakob
--
Jakob Bohm, CIO, Partner, WiseMo A/S. https://www.wisemo.com
Transformervej 29, 2860 Søborg, Denmark. Direct +45 31 13 16 10
This public discussion message is non-binding and may contain errors.
WiseMo - Remote Service Management for PCs, Phones and Embedded
ramakanth varala
2018-12-03 15:16:58 UTC
Permalink
Hi ,

I tried below steps .. still with some errors..


[***@localhost ~]# fdisk /dev/nbd0

The number of cylinders for this disk is set to 2610.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)

Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
Partition 1 is already defined. Delete it before re-adding it.

Command (m for help): d
Partition number (1-4): 1

Command (m for help): d
Selected partition 2

Command (m for help): p

Disk /dev/nbd0: 21.4 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System

Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-2610, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-2610, default 2610): 4

Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 2
First cylinder (5-2610, default 5):
Using default value 5
Last cylinder or +size or +sizeM or +sizeK (5-2610, default 2610):
Using default value 2610

Command (m for help): p

Disk /dev/nbd0: 21.4 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/nbd0p1 1 4 32098+ 83 Linux
/dev/nbd0p2 5 2610 20932695 83 Linux

Command (m for help): q

[***@localhost ~]# blockdev --rereadpt /dev/nbd0
BLKRRPART: Invalid argument
[***@localhost ~]# ls /dev/nbd0
/dev/nbd0
[***@localhost ~]# ls /dev/nbd0*
/dev/nbd0



Thanks
Rama Kanth
Post by ramakanth varala
# fdisk /dev/nbd0
## now create your partitions in fdisk
## use w to write changes and q to quit fdisk
# blocdev --rereadpt /dev/nbd0
# ls /dev/nbd0*
## you will now have /dev/nbd0, /dev/nbd0p1 and /dev/nbd0p2
# sync
# qemu-nbd -d /dev/nbd0
# qemu-nbd -c /dev/nbd0 /the/target
Post by ramakanth varala
Hi Pascal & Jakob,
I started from first .
I created manully the partitions as below
27 mknod /dev/nbd0p1 b 1 4
28 mknod /dev/nbd0p2 b 1 4
still in /proc/partitions i don't see any info , it shows as below
major minor #blocks name
8 0 62914560 sda
8 1 104391 sda1
8 2 62806117 sda2
253 0 56655872 dm-0
253 1 6127616 dm-1
Disk /dev/nbd0: 21.4 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/nbd0p1 * 1 13 104391 83 Linux
/dev/nbd0p2 14 2610 20860402+ 8e Linux LVM
when i try for mount , i see below error
/home/test/test.3.5.1b.debug/mnt/boot
mount: you must specify the filesystem type
i tried to give file system type as below, still issues.
/home/test/test.3.5.1b.debug/mnt/boot
mount: wrong fs type, bad option, bad superblock on /dev/nbd0p1,
missing codepage or other error
In some cases useful info is found in syslog - try
dmesg | tail or so
Any inputs would be really helpfull..
Thanks
Rama Kanth
Post by Pascal
restart from zero if possible...
# qemu-nbd -d /dev/nbd0
# modprobe -rv nbd
# modprobe nbd
# qemu-nbd -c /dev/nbd0 /the/file
# blockdev --rereadpt /dev/nbd0
# fdisk -l /dev/nbd0
# mount /dev/nbd0p1 /mount/point
Post by Jakob Bohm
Check
cat /proc/partitions
If the partitions are not listed there, the kernel does not
recognize them, perhaps the kernel doesn't recognize that
nbd0 is a "partitionable disk", and thus does not create the
internal nbd0p1 and ndb0p2 devices.
If the partitions are listed there, you just need to create the
actual /dev/nbd0p1 and /dev/nbd0p2 file names with mknod or
figure out why your "/dev/" management software (maybe udev,
maybe something better) doesn't do that for you.
Post by ramakanth varala
Still with some errors..
read error, sector 0
read error, sector 1
read error, sector 29
nbd0 nbd1 nbd10 nbd11 nbd12 nbd13 nbd14 nbd15 nbd2 nbd3
nbd4
Post by ramakanth varala
nbd5 nbd6 nbd7 nbd8 nbd9
On Thu, Nov 29, 2018 at 4:22 PM Nerijus Baliūnas <
Post by Nerijus Baliūnas
Please try kpartx -a /dev/nbd0
Post by ramakanth varala
thanks for the reply ..
But i get below error when i do ..
HDIO_GETGEO: Inappropriate ioctl for device
On Thu, Nov 29, 2018 at 4:04 PM Nerijus Baliūnas <
/home/test.1.3.debug/mnt/boot
Post by Jakob Bohm
Post by ramakanth varala
Post by Nerijus Baliūnas
Post by ramakanth varala
Post by Nerijus Baliūnas
Post by ramakanth varala
mount: special device /dev/nbd0p1 does not exist
partx -a /dev/nbd0
Enjoy
Jakob
--
Jakob Bohm, CIO, Partner, WiseMo A/S. https://www.wisemo.com
Transformervej 29, 2860 Søborg, Denmark. Direct +45 31 13 16 10
This public discussion message is non-binding and may contain errors.
WiseMo - Remote Service Management for PCs, Phones and Embedded
Pascal
2018-12-04 09:37:11 UTC
Permalink
hi,

you left fdisk without saving the changes (w before q), so there can't be
two partitions.
on the other hand, we should find the existing partition...
there is a strange warning when fdisk starts: what is on the over side of
nbd0 ?
is /dev/nbd0 rw ?
if you can't re-read the partitions table, can you disconnect /dev/nbd0 and
then reconnect it ?
Post by ramakanth varala
Hi ,
I tried below steps .. still with some errors..
The number of cylinders for this disk is set to 2610.
There is nothing wrong with that, but this is larger than 1024,
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
Partition 1 is already defined. Delete it before re-adding it.
Command (m for help): d
Partition number (1-4): 1
Command (m for help): d
Selected partition 2
Command (m for help): p
Disk /dev/nbd0: 21.4 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-2610, default 2610): 4
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 2
Using default value 5
Using default value 2610
Command (m for help): p
Disk /dev/nbd0: 21.4 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/nbd0p1 1 4 32098+ 83 Linux
/dev/nbd0p2 5 2610 20932695 83 Linux
Command (m for help): q
BLKRRPART: Invalid argument
/dev/nbd0
/dev/nbd0
Thanks
Rama Kanth
Post by ramakanth varala
# fdisk /dev/nbd0
## now create your partitions in fdisk
## use w to write changes and q to quit fdisk
# blocdev --rereadpt /dev/nbd0
# ls /dev/nbd0*
## you will now have /dev/nbd0, /dev/nbd0p1 and /dev/nbd0p2
# sync
# qemu-nbd -d /dev/nbd0
# qemu-nbd -c /dev/nbd0 /the/target
Le ven. 30 nov. 2018 à 14:04, ramakanth varala <
Post by ramakanth varala
Hi Pascal & Jakob,
I started from first .
I created manully the partitions as below
27 mknod /dev/nbd0p1 b 1 4
28 mknod /dev/nbd0p2 b 1 4
still in /proc/partitions i don't see any info , it shows as below
major minor #blocks name
8 0 62914560 sda
8 1 104391 sda1
8 2 62806117 sda2
253 0 56655872 dm-0
253 1 6127616 dm-1
Disk /dev/nbd0: 21.4 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/nbd0p1 * 1 13 104391 83 Linux
/dev/nbd0p2 14 2610 20860402+ 8e Linux LVM
when i try for mount , i see below error
/home/test/test.3.5.1b.debug/mnt/boot
mount: you must specify the filesystem type
i tried to give file system type as below, still issues.
/home/test/test.3.5.1b.debug/mnt/boot
mount: wrong fs type, bad option, bad superblock on /dev/nbd0p1,
missing codepage or other error
In some cases useful info is found in syslog - try
dmesg | tail or so
Any inputs would be really helpfull..
Thanks
Rama Kanth
Post by Pascal
restart from zero if possible...
# qemu-nbd -d /dev/nbd0
# modprobe -rv nbd
# modprobe nbd
# qemu-nbd -c /dev/nbd0 /the/file
# blockdev --rereadpt /dev/nbd0
# fdisk -l /dev/nbd0
# mount /dev/nbd0p1 /mount/point
Post by Jakob Bohm
Check
cat /proc/partitions
If the partitions are not listed there, the kernel does not
recognize them, perhaps the kernel doesn't recognize that
nbd0 is a "partitionable disk", and thus does not create the
internal nbd0p1 and ndb0p2 devices.
If the partitions are listed there, you just need to create the
actual /dev/nbd0p1 and /dev/nbd0p2 file names with mknod or
figure out why your "/dev/" management software (maybe udev,
maybe something better) doesn't do that for you.
Post by ramakanth varala
Still with some errors..
read error, sector 0
read error, sector 1
read error, sector 29
nbd0 nbd1 nbd10 nbd11 nbd12 nbd13 nbd14 nbd15 nbd2 nbd3
nbd4
Post by ramakanth varala
nbd5 nbd6 nbd7 nbd8 nbd9
On Thu, Nov 29, 2018 at 4:22 PM Nerijus Baliūnas <
Post by Nerijus Baliūnas
Please try kpartx -a /dev/nbd0
Post by ramakanth varala
thanks for the reply ..
But i get below error when i do ..
HDIO_GETGEO: Inappropriate ioctl for device
On Thu, Nov 29, 2018 at 4:04 PM Nerijus Baliūnas <
/home/test.1.3.debug/mnt/boot
Post by Jakob Bohm
Post by ramakanth varala
Post by Nerijus Baliūnas
Post by ramakanth varala
Post by Nerijus Baliūnas
Post by ramakanth varala
mount: special device /dev/nbd0p1 does not exist
partx -a /dev/nbd0
Enjoy
Jakob
--
Jakob Bohm, CIO, Partner, WiseMo A/S. https://www.wisemo.com
Transformervej 29, 2860 Søborg, Denmark. Direct +45 31 13 16 10
This public discussion message is non-binding and may contain errors.
WiseMo - Remote Service Management for PCs, Phones and Embedded
ramakanth varala
2018-12-04 10:35:15 UTC
Permalink
Hi Pascal..

yes its RW ...

[***@localhost ~]# fdisk -l /dev/nbd0

Disk /dev/nbd0: 21.4 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/nbd0p1 1 13 104391 83 Linux
/dev/nbd0p2 2610 2610 8032+ 83 Linux

[***@localhost ~]# ls -ltr /dev/nbd0*
brw-r----- 1 root disk 43, 0 Dec 4 11:06 /dev/nbd0

[***@localhost ~]# mount /dev/nbd0p1 /home/test/test.3.5.1b.debug/mnt/boot/
mount: special device /dev/nbd0p1 does not exist

[***@localhost ~]# cat /proc/partitions
major minor #blocks name

8 0 62914560 sda
8 1 104391 sda1
8 2 62806117 sda2
253 0 56655872 dm-0
253 1 6127616 dm-1
253 2 104391 dm-2
253 3 20860402 dm-3


--Not sure..what's missing..

Thanks
Rama Kanth
Post by Pascal
hi,
you left fdisk without saving the changes (w before q), so there can't be
two partitions.
on the other hand, we should find the existing partition...
there is a strange warning when fdisk starts: what is on the over side of
nbd0 ?
is /dev/nbd0 rw ?
if you can't re-read the partitions table, can you disconnect /dev/nbd0 and
then reconnect it ?
Post by ramakanth varala
Hi ,
I tried below steps .. still with some errors..
The number of cylinders for this disk is set to 2610.
There is nothing wrong with that, but this is larger than 1024,
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
Partition 1 is already defined. Delete it before re-adding it.
Command (m for help): d
Partition number (1-4): 1
Command (m for help): d
Selected partition 2
Command (m for help): p
Disk /dev/nbd0: 21.4 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-2610, default 2610): 4
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 2
Using default value 5
Using default value 2610
Command (m for help): p
Disk /dev/nbd0: 21.4 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/nbd0p1 1 4 32098+ 83 Linux
/dev/nbd0p2 5 2610 20932695 83 Linux
Command (m for help): q
BLKRRPART: Invalid argument
/dev/nbd0
/dev/nbd0
Thanks
Rama Kanth
Post by ramakanth varala
# fdisk /dev/nbd0
## now create your partitions in fdisk
## use w to write changes and q to quit fdisk
# blocdev --rereadpt /dev/nbd0
# ls /dev/nbd0*
## you will now have /dev/nbd0, /dev/nbd0p1 and /dev/nbd0p2
# sync
# qemu-nbd -d /dev/nbd0
# qemu-nbd -c /dev/nbd0 /the/target
Le ven. 30 nov. 2018 à 14:04, ramakanth varala <
Post by ramakanth varala
Hi Pascal & Jakob,
I started from first .
I created manully the partitions as below
27 mknod /dev/nbd0p1 b 1 4
28 mknod /dev/nbd0p2 b 1 4
still in /proc/partitions i don't see any info , it shows as below
major minor #blocks name
8 0 62914560 sda
8 1 104391 sda1
8 2 62806117 sda2
253 0 56655872 dm-0
253 1 6127616 dm-1
Disk /dev/nbd0: 21.4 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/nbd0p1 * 1 13 104391 83 Linux
/dev/nbd0p2 14 2610 20860402+ 8e Linux LVM
when i try for mount , i see below error
/home/test/test.3.5.1b.debug/mnt/boot
mount: you must specify the filesystem type
i tried to give file system type as below, still issues.
/home/test/test.3.5.1b.debug/mnt/boot
mount: wrong fs type, bad option, bad superblock on /dev/nbd0p1,
missing codepage or other error
In some cases useful info is found in syslog - try
dmesg | tail or so
Any inputs would be really helpfull..
Thanks
Rama Kanth
Post by Pascal
restart from zero if possible...
# qemu-nbd -d /dev/nbd0
# modprobe -rv nbd
# modprobe nbd
# qemu-nbd -c /dev/nbd0 /the/file
# blockdev --rereadpt /dev/nbd0
# fdisk -l /dev/nbd0
# mount /dev/nbd0p1 /mount/point
Post by Jakob Bohm
Check
cat /proc/partitions
If the partitions are not listed there, the kernel does not
recognize them, perhaps the kernel doesn't recognize that
nbd0 is a "partitionable disk", and thus does not create the
internal nbd0p1 and ndb0p2 devices.
If the partitions are listed there, you just need to create the
actual /dev/nbd0p1 and /dev/nbd0p2 file names with mknod or
figure out why your "/dev/" management software (maybe udev,
maybe something better) doesn't do that for you.
Post by ramakanth varala
Still with some errors..
read error, sector 0
read error, sector 1
read error, sector 29
nbd0 nbd1 nbd10 nbd11 nbd12 nbd13 nbd14 nbd15 nbd2
nbd3
Post by ramakanth varala
Post by ramakanth varala
Post by ramakanth varala
Post by Pascal
Post by Jakob Bohm
nbd4
Post by ramakanth varala
nbd5 nbd6 nbd7 nbd8 nbd9
On Thu, Nov 29, 2018 at 4:22 PM Nerijus Baliūnas <
Post by Nerijus Baliūnas
Please try kpartx -a /dev/nbd0
Post by ramakanth varala
thanks for the reply ..
But i get below error when i do ..
HDIO_GETGEO: Inappropriate ioctl for device
On Thu, Nov 29, 2018 at 4:04 PM Nerijus Baliūnas <
/home/test.1.3.debug/mnt/boot
Post by Jakob Bohm
Post by ramakanth varala
Post by Nerijus Baliūnas
Post by ramakanth varala
Post by Nerijus Baliūnas
Post by ramakanth varala
mount: special device /dev/nbd0p1 does not exist
partx -a /dev/nbd0
Enjoy
Jakob
--
Jakob Bohm, CIO, Partner, WiseMo A/S. https://www.wisemo.com
Transformervej 29, 2860 Søborg, Denmark. Direct +45 31 13 16 10
This public discussion message is non-binding and may contain
errors.
Post by ramakanth varala
Post by ramakanth varala
Post by ramakanth varala
Post by Pascal
Post by Jakob Bohm
WiseMo - Remote Service Management for PCs, Phones and Embedded
Jan Schermer
2018-12-04 10:53:20 UTC
Permalink
Partigion is missing :-)
try:
kpartx -a /dev/ndb0
Post by ramakanth varala
Hi Pascal..
yes its RW ...
Disk /dev/nbd0: 21.4 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/nbd0p1 1 13 104391 83 Linux
/dev/nbd0p2 2610 2610 8032+ 83 Linux
brw-r----- 1 root disk 43, 0 Dec 4 11:06 /dev/nbd0
mount: special device /dev/nbd0p1 does not exist
major minor #blocks name
8 0 62914560 sda
8 1 104391 sda1
8 2 62806117 sda2
253 0 56655872 dm-0
253 1 6127616 dm-1
253 2 104391 dm-2
253 3 20860402 dm-3
--Not sure..what's missing..
Thanks
Rama Kanth
Post by Pascal
hi,
you left fdisk without saving the changes (w before q), so there can't be
two partitions.
on the other hand, we should find the existing partition...
there is a strange warning when fdisk starts: what is on the over side of
nbd0 ?
is /dev/nbd0 rw ?
if you can't re-read the partitions table, can you disconnect /dev/nbd0 and
then reconnect it ?
Post by ramakanth varala
Hi ,
I tried below steps .. still with some errors..
The number of cylinders for this disk is set to 2610.
There is nothing wrong with that, but this is larger than 1024,
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
Partition 1 is already defined. Delete it before re-adding it.
Command (m for help): d
Partition number (1-4): 1
Command (m for help): d
Selected partition 2
Command (m for help): p
Disk /dev/nbd0: 21.4 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-2610, default 2610): 4
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 2
Using default value 5
Using default value 2610
Command (m for help): p
Disk /dev/nbd0: 21.4 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/nbd0p1 1 4 32098+ 83 Linux
/dev/nbd0p2 5 2610 20932695 83 Linux
Command (m for help): q
BLKRRPART: Invalid argument
/dev/nbd0
/dev/nbd0
Thanks
Rama Kanth
Post by ramakanth varala
# fdisk /dev/nbd0
## now create your partitions in fdisk
## use w to write changes and q to quit fdisk
# blocdev --rereadpt /dev/nbd0
# ls /dev/nbd0*
## you will now have /dev/nbd0, /dev/nbd0p1 and /dev/nbd0p2
# sync
# qemu-nbd -d /dev/nbd0
# qemu-nbd -c /dev/nbd0 /the/target
Le ven. 30 nov. 2018 à 14:04, ramakanth varala <
Post by ramakanth varala
Hi Pascal & Jakob,
I started from first .
I created manully the partitions as below
27 mknod /dev/nbd0p1 b 1 4
28 mknod /dev/nbd0p2 b 1 4
still in /proc/partitions i don't see any info , it shows as below
major minor #blocks name
8 0 62914560 sda
8 1 104391 sda1
8 2 62806117 sda2
253 0 56655872 dm-0
253 1 6127616 dm-1
Disk /dev/nbd0: 21.4 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/nbd0p1 * 1 13 104391 83 Linux
/dev/nbd0p2 14 2610 20860402+ 8e Linux LVM
when i try for mount , i see below error
/home/test/test.3.5.1b.debug/mnt/boot
mount: you must specify the filesystem type
i tried to give file system type as below, still issues.
/home/test/test.3.5.1b.debug/mnt/boot
mount: wrong fs type, bad option, bad superblock on /dev/nbd0p1,
missing codepage or other error
In some cases useful info is found in syslog - try
dmesg | tail or so
Any inputs would be really helpfull..
Thanks
Rama Kanth
Post by Pascal
restart from zero if possible...
# qemu-nbd -d /dev/nbd0
# modprobe -rv nbd
# modprobe nbd
# qemu-nbd -c /dev/nbd0 /the/file
# blockdev --rereadpt /dev/nbd0
# fdisk -l /dev/nbd0
# mount /dev/nbd0p1 /mount/point
Post by Jakob Bohm
Check
cat /proc/partitions
If the partitions are not listed there, the kernel does not
recognize them, perhaps the kernel doesn't recognize that
nbd0 is a "partitionable disk", and thus does not create the
internal nbd0p1 and ndb0p2 devices.
If the partitions are listed there, you just need to create the
actual /dev/nbd0p1 and /dev/nbd0p2 file names with mknod or
figure out why your "/dev/" management software (maybe udev,
maybe something better) doesn't do that for you.
Post by ramakanth varala
Still with some errors..
read error, sector 0
read error, sector 1
read error, sector 29
nbd0 nbd1 nbd10 nbd11 nbd12 nbd13 nbd14 nbd15 nbd2
nbd3
Post by ramakanth varala
Post by ramakanth varala
Post by ramakanth varala
Post by Pascal
Post by Jakob Bohm
nbd4
Post by ramakanth varala
nbd5 nbd6 nbd7 nbd8 nbd9
On Thu, Nov 29, 2018 at 4:22 PM Nerijus Baliūnas <
Post by Nerijus Baliūnas
Please try kpartx -a /dev/nbd0
Post by ramakanth varala
thanks for the reply ..
But i get below error when i do ..
HDIO_GETGEO: Inappropriate ioctl for device
On Thu, Nov 29, 2018 at 4:04 PM Nerijus Baliūnas <
/home/test.1.3.debug/mnt/boot
Post by Jakob Bohm
Post by ramakanth varala
Post by Nerijus Baliūnas
Post by ramakanth varala
Post by Nerijus Baliūnas
Post by ramakanth varala
mount: special device /dev/nbd0p1 does not exist
partx -a /dev/nbd0
Enjoy
Jakob
--
Jakob Bohm, CIO, Partner, WiseMo A/S. https://www.wisemo.com
Transformervej 29, 2860 Søborg, Denmark. Direct +45 31 13 16 10
This public discussion message is non-binding and may contain
errors.
Post by ramakanth varala
Post by ramakanth varala
Post by ramakanth varala
Post by Pascal
Post by Jakob Bohm
WiseMo - Remote Service Management for PCs, Phones and Embedded
Pascal
2018-12-04 11:12:43 UTC
Permalink
try to disconnect and then re-connect the exported (network) device (eg.
the over side)...
Post by Jan Schermer
Partigion is missing :-)
kpartx -a /dev/ndb0
Post by ramakanth varala
Hi Pascal..
yes its RW ...
Disk /dev/nbd0: 21.4 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/nbd0p1 1 13 104391 83 Linux
/dev/nbd0p2 2610 2610 8032+ 83 Linux
brw-r----- 1 root disk 43, 0 Dec 4 11:06 /dev/nbd0
/home/test/test.3.5.1b.debug/mnt/boot/
Post by ramakanth varala
mount: special device /dev/nbd0p1 does not exist
major minor #blocks name
8 0 62914560 sda
8 1 104391 sda1
8 2 62806117 sda2
253 0 56655872 dm-0
253 1 6127616 dm-1
253 2 104391 dm-2
253 3 20860402 dm-3
--Not sure..what's missing..
Thanks
Rama Kanth
Post by Pascal
hi,
you left fdisk without saving the changes (w before q), so there can't
be
Post by ramakanth varala
Post by Pascal
two partitions.
on the other hand, we should find the existing partition...
there is a strange warning when fdisk starts: what is on the over side
of
Post by ramakanth varala
Post by Pascal
nbd0 ?
is /dev/nbd0 rw ?
if you can't re-read the partitions table, can you disconnect /dev/nbd0
and
Post by ramakanth varala
Post by Pascal
then reconnect it ?
Le lun. 3 déc. 2018 à 16:17, ramakanth varala <
Post by ramakanth varala
Hi ,
I tried below steps .. still with some errors..
The number of cylinders for this disk is set to 2610.
There is nothing wrong with that, but this is larger than 1024,
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
Partition 1 is already defined. Delete it before re-adding it.
Command (m for help): d
Partition number (1-4): 1
Command (m for help): d
Selected partition 2
Command (m for help): p
Disk /dev/nbd0: 21.4 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-2610, default 2610): 4
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 2
Using default value 5
Using default value 2610
Command (m for help): p
Disk /dev/nbd0: 21.4 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/nbd0p1 1 4 32098+ 83 Linux
/dev/nbd0p2 5 2610 20932695 83 Linux
Command (m for help): q
BLKRRPART: Invalid argument
/dev/nbd0
/dev/nbd0
Thanks
Rama Kanth
Post by ramakanth varala
# fdisk /dev/nbd0
## now create your partitions in fdisk
## use w to write changes and q to quit fdisk
# blocdev --rereadpt /dev/nbd0
# ls /dev/nbd0*
## you will now have /dev/nbd0, /dev/nbd0p1 and /dev/nbd0p2
# sync
# qemu-nbd -d /dev/nbd0
# qemu-nbd -c /dev/nbd0 /the/target
Le ven. 30 nov. 2018 à 14:04, ramakanth varala <
Post by ramakanth varala
Hi Pascal & Jakob,
I started from first .
I created manully the partitions as below
27 mknod /dev/nbd0p1 b 1 4
28 mknod /dev/nbd0p2 b 1 4
still in /proc/partitions i don't see any info , it shows as below
major minor #blocks name
8 0 62914560 sda
8 1 104391 sda1
8 2 62806117 sda2
253 0 56655872 dm-0
253 1 6127616 dm-1
Disk /dev/nbd0: 21.4 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/nbd0p1 * 1 13 104391 83 Linux
/dev/nbd0p2 14 2610 20860402+ 8e Linux LVM
when i try for mount , i see below error
/home/test/test.3.5.1b.debug/mnt/boot
mount: you must specify the filesystem type
i tried to give file system type as below, still issues.
/home/test/test.3.5.1b.debug/mnt/boot
mount: wrong fs type, bad option, bad superblock on /dev/nbd0p1,
missing codepage or other error
In some cases useful info is found in syslog - try
dmesg | tail or so
Any inputs would be really helpfull..
Thanks
Rama Kanth
Post by Pascal
restart from zero if possible...
# qemu-nbd -d /dev/nbd0
# modprobe -rv nbd
# modprobe nbd
# qemu-nbd -c /dev/nbd0 /the/file
# blockdev --rereadpt /dev/nbd0
# fdisk -l /dev/nbd0
# mount /dev/nbd0p1 /mount/point
a
Post by ramakanth varala
Post by Pascal
Post by ramakanth varala
Post by ramakanth varala
Post by ramakanth varala
Post by Pascal
Post by Jakob Bohm
Check
cat /proc/partitions
If the partitions are not listed there, the kernel does not
recognize them, perhaps the kernel doesn't recognize that
nbd0 is a "partitionable disk", and thus does not create the
internal nbd0p1 and ndb0p2 devices.
If the partitions are listed there, you just need to create the
actual /dev/nbd0p1 and /dev/nbd0p2 file names with mknod or
figure out why your "/dev/" management software (maybe udev,
maybe something better) doesn't do that for you.
Post by ramakanth varala
Still with some errors..
read error, sector 0
read error, sector 1
read error, sector 29
nbd0 nbd1 nbd10 nbd11 nbd12 nbd13 nbd14 nbd15 nbd2
nbd3
Post by ramakanth varala
Post by ramakanth varala
Post by ramakanth varala
Post by Pascal
Post by Jakob Bohm
nbd4
Post by ramakanth varala
nbd5 nbd6 nbd7 nbd8 nbd9
On Thu, Nov 29, 2018 at 4:22 PM Nerijus Baliūnas <
Post by Nerijus Baliūnas
Please try kpartx -a /dev/nbd0
Post by ramakanth varala
thanks for the reply ..
But i get below error when i do ..
HDIO_GETGEO: Inappropriate ioctl for device
On Thu, Nov 29, 2018 at 4:04 PM Nerijus Baliūnas <
/home/test.1.3.debug/mnt/boot
Post by Jakob Bohm
Post by ramakanth varala
Post by Nerijus Baliūnas
Post by ramakanth varala
Post by Nerijus Baliūnas
Post by ramakanth varala
mount: special device /dev/nbd0p1 does not exist
partx -a /dev/nbd0
Enjoy
Jakob
--
Jakob Bohm, CIO, Partner, WiseMo A/S. https://www.wisemo.com
Transformervej 29, 2860 Søborg, Denmark. Direct +45 31 13 16 10
This public discussion message is non-binding and may contain
errors.
Post by ramakanth varala
Post by ramakanth varala
Post by ramakanth varala
Post by Pascal
Post by Jakob Bohm
WiseMo - Remote Service Management for PCs, Phones and Embedded
ramakanth varala
2018-12-04 11:25:45 UTC
Permalink
first time i got below..

[***@localhost ~]# kpartx -a /dev/ndb0
failed to stat() /dev/ndb0

from second time onwards like below..

[***@localhost ~]# kpartx -a /dev/nbd0
device-mapper: resume ioctl failed: Invalid argument
Post by Jan Schermer
Partigion is missing :-)
kpartx -a /dev/ndb0
Post by ramakanth varala
Hi Pascal..
yes its RW ...
Disk /dev/nbd0: 21.4 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/nbd0p1 1 13 104391 83 Linux
/dev/nbd0p2 2610 2610 8032+ 83 Linux
brw-r----- 1 root disk 43, 0 Dec 4 11:06 /dev/nbd0
/home/test/test.3.5.1b.debug/mnt/boot/
Post by ramakanth varala
mount: special device /dev/nbd0p1 does not exist
major minor #blocks name
8 0 62914560 sda
8 1 104391 sda1
8 2 62806117 sda2
253 0 56655872 dm-0
253 1 6127616 dm-1
253 2 104391 dm-2
253 3 20860402 dm-3
--Not sure..what's missing..
Thanks
Rama Kanth
Post by Pascal
hi,
you left fdisk without saving the changes (w before q), so there can't
be
Post by ramakanth varala
Post by Pascal
two partitions.
on the other hand, we should find the existing partition...
there is a strange warning when fdisk starts: what is on the over side
of
Post by ramakanth varala
Post by Pascal
nbd0 ?
is /dev/nbd0 rw ?
if you can't re-read the partitions table, can you disconnect /dev/nbd0
and
Post by ramakanth varala
Post by Pascal
then reconnect it ?
Le lun. 3 déc. 2018 à 16:17, ramakanth varala <
Post by ramakanth varala
Hi ,
I tried below steps .. still with some errors..
The number of cylinders for this disk is set to 2610.
There is nothing wrong with that, but this is larger than 1024,
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
Partition 1 is already defined. Delete it before re-adding it.
Command (m for help): d
Partition number (1-4): 1
Command (m for help): d
Selected partition 2
Command (m for help): p
Disk /dev/nbd0: 21.4 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-2610, default 2610): 4
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 2
Using default value 5
Using default value 2610
Command (m for help): p
Disk /dev/nbd0: 21.4 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/nbd0p1 1 4 32098+ 83 Linux
/dev/nbd0p2 5 2610 20932695 83 Linux
Command (m for help): q
BLKRRPART: Invalid argument
/dev/nbd0
/dev/nbd0
Thanks
Rama Kanth
Post by ramakanth varala
# fdisk /dev/nbd0
## now create your partitions in fdisk
## use w to write changes and q to quit fdisk
# blocdev --rereadpt /dev/nbd0
# ls /dev/nbd0*
## you will now have /dev/nbd0, /dev/nbd0p1 and /dev/nbd0p2
# sync
# qemu-nbd -d /dev/nbd0
# qemu-nbd -c /dev/nbd0 /the/target
Le ven. 30 nov. 2018 à 14:04, ramakanth varala <
Post by ramakanth varala
Hi Pascal & Jakob,
I started from first .
I created manully the partitions as below
27 mknod /dev/nbd0p1 b 1 4
28 mknod /dev/nbd0p2 b 1 4
still in /proc/partitions i don't see any info , it shows as below
major minor #blocks name
8 0 62914560 sda
8 1 104391 sda1
8 2 62806117 sda2
253 0 56655872 dm-0
253 1 6127616 dm-1
Disk /dev/nbd0: 21.4 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/nbd0p1 * 1 13 104391 83 Linux
/dev/nbd0p2 14 2610 20860402+ 8e Linux LVM
when i try for mount , i see below error
/home/test/test.3.5.1b.debug/mnt/boot
mount: you must specify the filesystem type
i tried to give file system type as below, still issues.
/home/test/test.3.5.1b.debug/mnt/boot
mount: wrong fs type, bad option, bad superblock on /dev/nbd0p1,
missing codepage or other error
In some cases useful info is found in syslog - try
dmesg | tail or so
Any inputs would be really helpfull..
Thanks
Rama Kanth
Post by Pascal
restart from zero if possible...
# qemu-nbd -d /dev/nbd0
# modprobe -rv nbd
# modprobe nbd
# qemu-nbd -c /dev/nbd0 /the/file
# blockdev --rereadpt /dev/nbd0
# fdisk -l /dev/nbd0
# mount /dev/nbd0p1 /mount/point
a
Post by ramakanth varala
Post by Pascal
Post by ramakanth varala
Post by ramakanth varala
Post by ramakanth varala
Post by Pascal
Post by Jakob Bohm
Check
cat /proc/partitions
If the partitions are not listed there, the kernel does not
recognize them, perhaps the kernel doesn't recognize that
nbd0 is a "partitionable disk", and thus does not create the
internal nbd0p1 and ndb0p2 devices.
If the partitions are listed there, you just need to create the
actual /dev/nbd0p1 and /dev/nbd0p2 file names with mknod or
figure out why your "/dev/" management software (maybe udev,
maybe something better) doesn't do that for you.
Post by ramakanth varala
Still with some errors..
read error, sector 0
read error, sector 1
read error, sector 29
nbd0 nbd1 nbd10 nbd11 nbd12 nbd13 nbd14 nbd15 nbd2
nbd3
Post by ramakanth varala
Post by ramakanth varala
Post by ramakanth varala
Post by Pascal
Post by Jakob Bohm
nbd4
Post by ramakanth varala
nbd5 nbd6 nbd7 nbd8 nbd9
On Thu, Nov 29, 2018 at 4:22 PM Nerijus Baliūnas <
Post by Nerijus Baliūnas
Please try kpartx -a /dev/nbd0
Post by ramakanth varala
thanks for the reply ..
But i get below error when i do ..
HDIO_GETGEO: Inappropriate ioctl for device
On Thu, Nov 29, 2018 at 4:04 PM Nerijus Baliūnas <
/home/test.1.3.debug/mnt/boot
Post by Jakob Bohm
Post by ramakanth varala
Post by Nerijus Baliūnas
Post by ramakanth varala
Post by Nerijus Baliūnas
Post by ramakanth varala
mount: special device /dev/nbd0p1 does not exist
partx -a /dev/nbd0
Enjoy
Jakob
--
Jakob Bohm, CIO, Partner, WiseMo A/S. https://www.wisemo.com
Transformervej 29, 2860 Søborg, Denmark. Direct +45 31 13 16 10
This public discussion message is non-binding and may contain
errors.
Post by ramakanth varala
Post by ramakanth varala
Post by ramakanth varala
Post by Pascal
Post by Jakob Bohm
WiseMo - Remote Service Management for PCs, Phones and Embedded
ramakanth varala
2018-12-04 11:31:50 UTC
Permalink
Hi Pascal..

I tried like below..

[***@localhost ~]# qemu-nbd -d /dev/nbd0
/dev/nbd0 disconnected

[***@localhost ~]# qemu-nbd --connect /dev/nbd0p1
/home/test/test.3.5.1b.debug/test.3.5.1b.debug.raw
qemu-nbd: Could not access '/dev/nbd0p1': No such file or directory
Post by ramakanth varala
first time i got below..
failed to stat() /dev/ndb0
from second time onwards like below..
device-mapper: resume ioctl failed: Invalid argument
Post by Jan Schermer
Partigion is missing :-)
kpartx -a /dev/ndb0
Post by ramakanth varala
Hi Pascal..
yes its RW ...
Disk /dev/nbd0: 21.4 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/nbd0p1 1 13 104391 83 Linux
/dev/nbd0p2 2610 2610 8032+ 83 Linux
brw-r----- 1 root disk 43, 0 Dec 4 11:06 /dev/nbd0
/home/test/test.3.5.1b.debug/mnt/boot/
Post by ramakanth varala
mount: special device /dev/nbd0p1 does not exist
major minor #blocks name
8 0 62914560 sda
8 1 104391 sda1
8 2 62806117 sda2
253 0 56655872 dm-0
253 1 6127616 dm-1
253 2 104391 dm-2
253 3 20860402 dm-3
--Not sure..what's missing..
Thanks
Rama Kanth
Post by Pascal
hi,
you left fdisk without saving the changes (w before q), so there can't
be
Post by ramakanth varala
Post by Pascal
two partitions.
on the other hand, we should find the existing partition...
there is a strange warning when fdisk starts: what is on the over side
of
Post by ramakanth varala
Post by Pascal
nbd0 ?
is /dev/nbd0 rw ?
if you can't re-read the partitions table, can you disconnect
/dev/nbd0 and
Post by ramakanth varala
Post by Pascal
then reconnect it ?
Le lun. 3 déc. 2018 à 16:17, ramakanth varala <
Post by ramakanth varala
Hi ,
I tried below steps .. still with some errors..
The number of cylinders for this disk is set to 2610.
There is nothing wrong with that, but this is larger than 1024,
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
Partition 1 is already defined. Delete it before re-adding it.
Command (m for help): d
Partition number (1-4): 1
Command (m for help): d
Selected partition 2
Command (m for help): p
Disk /dev/nbd0: 21.4 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-2610, default 2610): 4
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 2
Using default value 5
Using default value 2610
Command (m for help): p
Disk /dev/nbd0: 21.4 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/nbd0p1 1 4 32098+ 83 Linux
/dev/nbd0p2 5 2610 20932695 83 Linux
Command (m for help): q
BLKRRPART: Invalid argument
/dev/nbd0
/dev/nbd0
Thanks
Rama Kanth
Post by ramakanth varala
# fdisk /dev/nbd0
## now create your partitions in fdisk
## use w to write changes and q to quit fdisk
# blocdev --rereadpt /dev/nbd0
# ls /dev/nbd0*
## you will now have /dev/nbd0, /dev/nbd0p1 and /dev/nbd0p2
# sync
# qemu-nbd -d /dev/nbd0
# qemu-nbd -c /dev/nbd0 /the/target
Le ven. 30 nov. 2018 à 14:04, ramakanth varala <
Post by ramakanth varala
Hi Pascal & Jakob,
I started from first .
I created manully the partitions as below
27 mknod /dev/nbd0p1 b 1 4
28 mknod /dev/nbd0p2 b 1 4
still in /proc/partitions i don't see any info , it shows as below
major minor #blocks name
8 0 62914560 sda
8 1 104391 sda1
8 2 62806117 sda2
253 0 56655872 dm-0
253 1 6127616 dm-1
Disk /dev/nbd0: 21.4 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/nbd0p1 * 1 13 104391 83 Linux
/dev/nbd0p2 14 2610 20860402+ 8e Linux LVM
when i try for mount , i see below error
/home/test/test.3.5.1b.debug/mnt/boot
mount: you must specify the filesystem type
i tried to give file system type as below, still issues.
/home/test/test.3.5.1b.debug/mnt/boot
mount: wrong fs type, bad option, bad superblock on /dev/nbd0p1,
missing codepage or other error
In some cases useful info is found in syslog - try
dmesg | tail or so
Any inputs would be really helpfull..
Thanks
Rama Kanth
Post by Pascal
restart from zero if possible...
# qemu-nbd -d /dev/nbd0
# modprobe -rv nbd
# modprobe nbd
# qemu-nbd -c /dev/nbd0 /the/file
# blockdev --rereadpt /dev/nbd0
# fdisk -l /dev/nbd0
# mount /dev/nbd0p1 /mount/point
a
Post by ramakanth varala
Post by Pascal
Post by ramakanth varala
Post by ramakanth varala
Post by ramakanth varala
Post by Pascal
Post by Jakob Bohm
Check
cat /proc/partitions
If the partitions are not listed there, the kernel does not
recognize them, perhaps the kernel doesn't recognize that
nbd0 is a "partitionable disk", and thus does not create the
internal nbd0p1 and ndb0p2 devices.
If the partitions are listed there, you just need to create the
actual /dev/nbd0p1 and /dev/nbd0p2 file names with mknod or
figure out why your "/dev/" management software (maybe udev,
maybe something better) doesn't do that for you.
Post by ramakanth varala
Still with some errors..
read error, sector 0
read error, sector 1
read error, sector 29
nbd0 nbd1 nbd10 nbd11 nbd12 nbd13 nbd14 nbd15 nbd2
nbd3
Post by ramakanth varala
Post by ramakanth varala
Post by ramakanth varala
Post by Pascal
Post by Jakob Bohm
nbd4
Post by ramakanth varala
nbd5 nbd6 nbd7 nbd8 nbd9
On Thu, Nov 29, 2018 at 4:22 PM Nerijus Baliūnas <
Post by Nerijus Baliūnas
Please try kpartx -a /dev/nbd0
Post by ramakanth varala
thanks for the reply ..
But i get below error when i do ..
HDIO_GETGEO: Inappropriate ioctl for device
On Thu, Nov 29, 2018 at 4:04 PM Nerijus Baliūnas <
/home/test.1.3.debug/mnt/boot
Post by Jakob Bohm
Post by ramakanth varala
Post by Nerijus Baliūnas
Post by ramakanth varala
Post by Nerijus Baliūnas
Post by ramakanth varala
mount: special device /dev/nbd0p1 does not exist
partx -a /dev/nbd0
Enjoy
Jakob
--
Jakob Bohm, CIO, Partner, WiseMo A/S. https://www.wisemo.com
Transformervej 29, 2860 Søborg, Denmark. Direct +45 31 13 16 10
This public discussion message is non-binding and may contain
errors.
Post by ramakanth varala
Post by ramakanth varala
Post by ramakanth varala
Post by Pascal
Post by Jakob Bohm
WiseMo - Remote Service Management for PCs, Phones and Embedded
Pascal
2018-12-04 11:35:12 UTC
Permalink
there is an underlying problem : try to disconnect and then re-connect the
exported (network) device (eg. the over side)...

http://www.microhowto.info/howto/connect_to_a_remote_block_device_using_nbd.html
Post by ramakanth varala
first time i got below..
failed to stat() /dev/ndb0
from second time onwards like below..
device-mapper: resume ioctl failed: Invalid argument
Post by Jan Schermer
Partigion is missing :-)
kpartx -a /dev/ndb0
Post by ramakanth varala
Hi Pascal..
yes its RW ...
Disk /dev/nbd0: 21.4 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/nbd0p1 1 13 104391 83 Linux
/dev/nbd0p2 2610 2610 8032+ 83 Linux
brw-r----- 1 root disk 43, 0 Dec 4 11:06 /dev/nbd0
/home/test/test.3.5.1b.debug/mnt/boot/
Post by ramakanth varala
mount: special device /dev/nbd0p1 does not exist
major minor #blocks name
8 0 62914560 sda
8 1 104391 sda1
8 2 62806117 sda2
253 0 56655872 dm-0
253 1 6127616 dm-1
253 2 104391 dm-2
253 3 20860402 dm-3
--Not sure..what's missing..
Thanks
Rama Kanth
Post by Pascal
hi,
you left fdisk without saving the changes (w before q), so there can't
be
Post by ramakanth varala
Post by Pascal
two partitions.
on the other hand, we should find the existing partition...
there is a strange warning when fdisk starts: what is on the over side
of
Post by ramakanth varala
Post by Pascal
nbd0 ?
is /dev/nbd0 rw ?
if you can't re-read the partitions table, can you disconnect
/dev/nbd0 and
Post by ramakanth varala
Post by Pascal
then reconnect it ?
Le lun. 3 déc. 2018 à 16:17, ramakanth varala <
Post by ramakanth varala
Hi ,
I tried below steps .. still with some errors..
The number of cylinders for this disk is set to 2610.
There is nothing wrong with that, but this is larger than 1024,
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
Partition 1 is already defined. Delete it before re-adding it.
Command (m for help): d
Partition number (1-4): 1
Command (m for help): d
Selected partition 2
Command (m for help): p
Disk /dev/nbd0: 21.4 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-2610, default 2610): 4
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 2
Using default value 5
Using default value 2610
Command (m for help): p
Disk /dev/nbd0: 21.4 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/nbd0p1 1 4 32098+ 83 Linux
/dev/nbd0p2 5 2610 20932695 83 Linux
Command (m for help): q
BLKRRPART: Invalid argument
/dev/nbd0
/dev/nbd0
Thanks
Rama Kanth
Post by ramakanth varala
# fdisk /dev/nbd0
## now create your partitions in fdisk
## use w to write changes and q to quit fdisk
# blocdev --rereadpt /dev/nbd0
# ls /dev/nbd0*
## you will now have /dev/nbd0, /dev/nbd0p1 and /dev/nbd0p2
# sync
# qemu-nbd -d /dev/nbd0
# qemu-nbd -c /dev/nbd0 /the/target
Le ven. 30 nov. 2018 à 14:04, ramakanth varala <
Post by ramakanth varala
Hi Pascal & Jakob,
I started from first .
I created manully the partitions as below
27 mknod /dev/nbd0p1 b 1 4
28 mknod /dev/nbd0p2 b 1 4
still in /proc/partitions i don't see any info , it shows as below
major minor #blocks name
8 0 62914560 sda
8 1 104391 sda1
8 2 62806117 sda2
253 0 56655872 dm-0
253 1 6127616 dm-1
Disk /dev/nbd0: 21.4 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/nbd0p1 * 1 13 104391 83 Linux
/dev/nbd0p2 14 2610 20860402+ 8e Linux LVM
when i try for mount , i see below error
/home/test/test.3.5.1b.debug/mnt/boot
mount: you must specify the filesystem type
i tried to give file system type as below, still issues.
/home/test/test.3.5.1b.debug/mnt/boot
mount: wrong fs type, bad option, bad superblock on /dev/nbd0p1,
missing codepage or other error
In some cases useful info is found in syslog - try
dmesg | tail or so
Any inputs would be really helpfull..
Thanks
Rama Kanth
Post by Pascal
restart from zero if possible...
# qemu-nbd -d /dev/nbd0
# modprobe -rv nbd
# modprobe nbd
# qemu-nbd -c /dev/nbd0 /the/file
# blockdev --rereadpt /dev/nbd0
# fdisk -l /dev/nbd0
# mount /dev/nbd0p1 /mount/point
a
Post by ramakanth varala
Post by Pascal
Post by ramakanth varala
Post by ramakanth varala
Post by ramakanth varala
Post by Pascal
Post by Jakob Bohm
Check
cat /proc/partitions
If the partitions are not listed there, the kernel does not
recognize them, perhaps the kernel doesn't recognize that
nbd0 is a "partitionable disk", and thus does not create the
internal nbd0p1 and ndb0p2 devices.
If the partitions are listed there, you just need to create the
actual /dev/nbd0p1 and /dev/nbd0p2 file names with mknod or
figure out why your "/dev/" management software (maybe udev,
maybe something better) doesn't do that for you.
Post by ramakanth varala
Still with some errors..
read error, sector 0
read error, sector 1
read error, sector 29
nbd0 nbd1 nbd10 nbd11 nbd12 nbd13 nbd14 nbd15 nbd2
nbd3
Post by ramakanth varala
Post by ramakanth varala
Post by ramakanth varala
Post by Pascal
Post by Jakob Bohm
nbd4
Post by ramakanth varala
nbd5 nbd6 nbd7 nbd8 nbd9
On Thu, Nov 29, 2018 at 4:22 PM Nerijus Baliūnas <
Post by Nerijus Baliūnas
Please try kpartx -a /dev/nbd0
Post by ramakanth varala
thanks for the reply ..
But i get below error when i do ..
HDIO_GETGEO: Inappropriate ioctl for device
On Thu, Nov 29, 2018 at 4:04 PM Nerijus Baliūnas <
/home/test.1.3.debug/mnt/boot
Post by Jakob Bohm
Post by ramakanth varala
Post by Nerijus Baliūnas
Post by ramakanth varala
Post by Nerijus Baliūnas
Post by ramakanth varala
mount: special device /dev/nbd0p1 does not exist
partx -a /dev/nbd0
Enjoy
Jakob
--
Jakob Bohm, CIO, Partner, WiseMo A/S. https://www.wisemo.com
Transformervej 29, 2860 Søborg, Denmark. Direct +45 31 13 16 10
This public discussion message is non-binding and may contain
errors.
Post by ramakanth varala
Post by ramakanth varala
Post by ramakanth varala
Post by Pascal
Post by Jakob Bohm
WiseMo - Remote Service Management for PCs, Phones and Embedded
Loading...