Discussion:
After device resize in DOM-0, DOM-U disklabel unchanged
Louis Guillaume
2014-10-12 21:12:58 UTC
Permalink
Hi!

I have a DOM0 NetBSD system (netbsd-6 branch from Jan 2014).

LVM is used to manage the disk resources for the DOM-Us.

I have resized an LV in DOM-0 and everything looks good there.

But in the DOM-U, while the device looks to be the right size, disklabel
doesn't see the correct number of sectors; it thinks everything was as
it was before...


DOM-0

# lvdisplay vg1/lv2
--- Logical volume ---
LV Name /dev/vg1/lv2
VG Name vg1
LV UUID kfgY4S-cc9S-YMVF-euUV-DTTh-9Wwu-OedDgD
LV Write Access read/write
LV Status available
# open 0
LV Size 32.00 GiB
Current LE 8192
Segments 2
Allocation inherit
Read ahead sectors auto
- currently set to 0
Block device 169:4


DOM-U

# dmesg | grep xbd0
xbd0 at xenbus0 id 1: Xen Virtual Block Device Interface
xbd0: using event channel 6
xbd0: 32768 MB, 512 bytes/sect x 67108864 sectors
boot device: xbd0
root on xbd0a dumps on xbd0b

# disklabel xbd0 | egrep "(total sectors| d:)"
total sectors: 33554432
d: 33554432 0 unused 0 0 # (Cyl. 0 - 16383)



How do I get disklabel to know about the new device info?

Louis
Gary Duzan
2014-10-12 22:27:47 UTC
Permalink
In Message <***@zabrico.com>,
Louis Guillaume <***@zabrico.com>wrote:

=>DOM-U
=>
=># dmesg | grep xbd0
=>xbd0 at xenbus0 id 1: Xen Virtual Block Device Interface
=>xbd0: using event channel 6
=>xbd0: 32768 MB, 512 bytes/sect x 67108864 sectors
=>boot device: xbd0
=>root on xbd0a dumps on xbd0b
=>
=># disklabel xbd0 | egrep "(total sectors| d:)"
=>total sectors: 33554432
=> d: 33554432 0 unused 0 0 # (Cyl. 0 - 16383)
=>
=>
=>
=>How do I get disklabel to know about the new device info?

I expect you could simply fix it using "disklabel -e" in the
DOMU.

Gary Duzan
Christos Zoulas
2014-10-13 01:12:25 UTC
Permalink
Post by Louis Guillaume
Hi!
I have a DOM0 NetBSD system (netbsd-6 branch from Jan 2014).
LVM is used to manage the disk resources for the DOM-Us.
I have resized an LV in DOM-0 and everything looks good there.
But in the DOM-U, while the device looks to be the right size, disklabel
doesn't see the correct number of sectors; it thinks everything was as
it was before...
DOM-0
# lvdisplay vg1/lv2
--- Logical volume ---
LV Name /dev/vg1/lv2
VG Name vg1
LV UUID kfgY4S-cc9S-YMVF-euUV-DTTh-9Wwu-OedDgD
LV Write Access read/write
LV Status available
# open 0
LV Size 32.00 GiB
Current LE 8192
Segments 2
Allocation inherit
Read ahead sectors auto
- currently set to 0
Block device 169:4
DOM-U
# dmesg | grep xbd0
xbd0 at xenbus0 id 1: Xen Virtual Block Device Interface
xbd0: using event channel 6
xbd0: 32768 MB, 512 bytes/sect x 67108864 sectors
boot device: xbd0
root on xbd0a dumps on xbd0b
# disklabel xbd0 | egrep "(total sectors| d:)"
total sectors: 33554432
d: 33554432 0 unused 0 0 # (Cyl. 0 - 16383)
How do I get disklabel to know about the new device info?
disklabel -i xbd0
disklabel>A

christos

Loading...