Description:
I noticed that if i pass a disk partition (phy) through to a solaris guest, the guest sees the whole disk rather than the specific partition handed through. example:
disk = [ 'phy:sdb3,5,w' ]
with this example, other guests (NetBSD, various linuxes) front end block driver presents the sdb3 partition as a "virtual disk", which can then be partitioned, etc as if it were a complete disk. the solaris xvbd, however, presents all of sdb to the guest, rather than just sdb3:
# devfsadm -c disk -i xvbd
# ls /devices/xendev/xvbd@5*
/devices/xendev/xvbd@5:a /devices/xendev/xvbd@5:k,raw
[...]
# fdisk /dev/rdsk/c0d5p0
Total disk size is 3149 cylinders
Cylinder size is 4096 (512 byte) blocks
Cylinders
Partition Status Type Start End Length %
====== ===== =========== ==== === ===== ====
1 Active Linux native 0 62 63 2
2 Linux native 62 1658 1597 51
3 Linux native 1659 2172 514 16
4 EXT-DOS 2172 3148 977 31
[...]
Is this expected behavior, or is it a bug?
tia,
Sherry
ps: i'm using a redhat dom0 on Xen 3.1
Explanation:
There could be some stale fdisk info on sdb3 which is read and
interpreted in Solaris domU.
Please try to clear the first 8k space on sdb3 by dd'ing '/0' to it,
then try it again.
Discussion:
Your suggestion worked (dd if=/dev/zero of=/dev/sdb3 bs=1K count=8). i didn't notice that the size of the disk reported was correct (it was the size of the partition handed through), however as you pointed out, fdisk was getting confused about some data in the first 8K.
i went ahead and used fdisk to create a solaris2 partition for the whole "disk" (100%), and then had fun creating slices using fmthard. luckily, our CTO is an old unix hack who helped me ensure the slices fell on cylinder boundaries. is there a more user-friendly way to create slices on a x86 disk partition than fmthard?
Yes. You may want to use 'format', then choose the disk you want to
create slice on by inputing the number with it, then input 'partition'
command. OK, now you can see the menu to play with partitions(slices).
Don't forget to use 'label' command to flush all your changes onto the
disk(virtual disk), when you're done ;-).
I noticed that if i pass a disk partition (phy) through to a solaris guest, the guest sees the whole disk rather than the specific partition handed through. example:
disk = [ 'phy:sdb3,5,w' ]
with this example, other guests (NetBSD, various linuxes) front end block driver presents the sdb3 partition as a "virtual disk", which can then be partitioned, etc as if it were a complete disk. the solaris xvbd, however, presents all of sdb to the guest, rather than just sdb3:
# devfsadm -c disk -i xvbd
# ls /devices/xendev/xvbd@5*
/devices/xendev/xvbd@5:a /devices/xendev/xvbd@5:k,raw
[...]
# fdisk /dev/rdsk/c0d5p0
Total disk size is 3149 cylinders
Cylinder size is 4096 (512 byte) blocks
Cylinders
Partition Status Type Start End Length %
====== ===== =========== ==== === ===== ====
1 Active Linux native 0 62 63 2
2 Linux native 62 1658 1597 51
3 Linux native 1659 2172 514 16
4 EXT-DOS 2172 3148 977 31
[...]
Is this expected behavior, or is it a bug?
tia,
Sherry
ps: i'm using a redhat dom0 on Xen 3.1
Explanation:
There could be some stale fdisk info on sdb3 which is read and
interpreted in Solaris domU.
Please try to clear the first 8k space on sdb3 by dd'ing '/0' to it,
then try it again.
Discussion:
Your suggestion worked (dd if=/dev/zero of=/dev/sdb3 bs=1K count=8). i didn't notice that the size of the disk reported was correct (it was the size of the partition handed through), however as you pointed out, fdisk was getting confused about some data in the first 8K.
i went ahead and used fdisk to create a solaris2 partition for the whole "disk" (100%), and then had fun creating slices using fmthard. luckily, our CTO is an old unix hack who helped me ensure the slices fell on cylinder boundaries. is there a more user-friendly way to create slices on a x86 disk partition than fmthard?
Yes. You may want to use 'format', then choose the disk you want to
create slice on by inputing the number with it, then input 'partition'
command. OK, now you can see the menu to play with partitions(slices).
Don't forget to use 'label' command to flush all your changes onto the
disk(virtual disk), when you're done ;-).
Xen中Solaris分区映射问题
本文探讨了在Xen虚拟化环境中将特定磁盘分区传递给Solaris来宾时遇到的问题。原本期望Solaris仅能看到指定的分区,但实际上却显示了整个磁盘。通过清除分区头部数据解决了这一问题,并介绍了如何在Solaris中创建分区。

1万+

被折叠的 条评论
为什么被折叠?



