Sample Header Ad - 728x90

Edit VTOC label in Linux as guest LDom in Solaris after resizing vdisk zvol

1 vote
1 answer
139 views
I've got a Solaris 10 system on SPARC hosting multiple Linux guest LDoms which were installed on ZFS zvols. After resizing the zvol though, the Linux doesn't "detect" that disk resized, and from what I can gather this is probably due to the VTOC on the disk still specifying the old disk size. This is the mapping of the ldom using the primary virtual disk: ldadm@ldom0> ldm list -o disk ldom1 NAME ldom1 DISK NAME VOLUME TOUT ID DEVICE SERVER MPGROUP osdisk0 ldom1osdisk0@p-vds0 0 disk@0 primary Here's the corresponding zfs volume before the resize: root@ldom0> zfs list -t volume NAME USED AVAIL REFER MOUNTPOINT ldom0/LDom/ldom1/osdisk0 13.5G 71.3G 3.10G - I then resized the volume: root@ldom0> zfs set volsize=40g ldom0/LDom/ldom1/osdisk0 This is the zvol afterwards: root@ldom0> zfs list -t volume NAME USED AVAIL REFER MOUNTPOINT ldom0/LDom/ldom1/osdisk0 42.5G 101G 3.10G - However, when I start the Linux: ldadm@ldom0> telnet localhost 5000 ldom1 login: root Password: root@ldom1> fdisk -l Disk /dev/vdiska: 12 GiB, 12884901888 bytes, 25165824 sectors Geometry: 255 heads, 63 sectors/track, 1566 cylinders Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 8192 bytes I/O size (minimum/optimal): 8192 bytes / 8192 bytes Disklabel type: sun Device Start End Sectors Size Id Type Flags /dev/vdiska1 0 192779 192780 94.1M 1 Boot /dev/vdiska2 192780 8482319 8289540 4G 83 Linux native /dev/vdiska3 0 25157789 25157790 12G 5 Whole disk /dev/vdiska4 8482320 12466439 3984120 1.9G 82 Linux swap /dev/vdiska5 12466440 25157789 12691350 6.1G 83 Linux native As already mentioned, I assume that this is normal behavior due to the VTOC label containing the size as explained here 1 . There's documentation on how to edit or print the label on Solaris eg. here 2 , but I didn't find anything for Linux. Am I right in assuming I need to edit the VTOCs, and if, how? Or did I miss something else?
Asked by ElleJay (631 rep)
Dec 11, 2019, 09:18 PM
Last activity: Jan 15, 2020, 09:15 PM