ibroxy wrote:Solaris doesn't make this easy today.
I have a volume from SAN which is managed by ZFS (zpool) on solaris 10 box. There is need to increase the voulme, this was done on the SAN and this reflect on solaris format command.
I export the zpool and try to create a slice using the extra volume but it give me an error that the size specified is out of range.The likely issue is that the label on the disk remains in place with the old size. So ZFS isn't seeing the increase yet. (And you don't have to do anything with ZFS... If the existing pool is on the whole disk, it'll pick up the increase automatically).
is it not possible to increase a pool by exporting the zpool and using format to increase it then import it back?
Darren_Dunham wrote:This method destroys data. Is there a method available which keeps the data? At least you should mention this crucial point in your post.
*) Export the pool*
) Examine the LUN with format or prtvtoc. Should have slice0 taking up the whole disk (sector 34 to end)
*) Increase the LUN size*
) Destroy the label on the disk (format -e -> label -> go to SMI, then label -> go to EFI)
*) With EFI label, recreate slice 0, now bigger (again, take all the space available)*
) Now that slice is larger, import the pool. ZFS should show more space available on the disk.
If you are using slices instead of the whole disk, or if you are using SMI labels, then this procedure changes somewhat.
This method destroys data. Is there a method available which keeps the data? At least you should mention this crucial point in your post.At what point do you think data is destroyed? This method should not destroy data. (That doesn't mean I'd want to try this without having a backup, but it should work.) I don't have easy access to a real resizable LUN to try this.
Calamity wrote:That only rewrites the label on disk. This whole section in my post is under "if you have an EFI label..." Did you have an EFI label? You weren't trying to do this on a VTOC disk, were you?
I think at that point my data was destroyed:
Destroy the label on the disk (format -e -> label -> go to SMI,
then label -> go to EFI)
I had a backup and I always do such things on a test machine first, so no damage occurred. But I don't know exactly what to do on a production machine and I can't find an exact description how it works without data loss.The "label" on the disk tells the OS where the data lives. As long as you know the details, you can destroy the label and put a new one in place and point things back to where they are. The relabel doesn't touch the actual filesystem data on the disk. When you're using ZFS and an EFI label, this is very simple. You just have to create one slice that encompasses the entire disk. ZFS will find the ZFS headers at the beginning of the slice and pull in the data.