forked from openzfs/zfs
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
While the autoexpand property may seem like a small feature it depends on a significant amount of system infrastructure. Enough of that infrastructure is now in place with a few customizations for Linux the autoexpand property for whole disk configurations can be supported. Autoexpand works as follows; when a block device is resized a change event is generated by udev with the DISK_MEDIA_CHANGE key. The ZED, which is monitoring udev events detects the event for disks (but not partitions) and hands it off to zfs_deliver_dle(). The zfs_deliver_dle() function appends the exected whole disk partition suffix, and if the partition can be matched against a known pool vdev it re-opens it. Re-opening the vdev with trigger a re-reading of the partition table so the maximum possible expansion size can be reported. Next if the property autoexpand is set to "on" a vdev expansion will be attempted. After performing some sanity checks on the disk to verify it's safe to expand the ZFS partition (-part1) it will be expanded an the partition table updated. The partition is then re-opened again to detect the updated size which allows the new capacity to be used. Added PHYS_PATH="/dev/zvol/dataset" to vdev configuration for ZFS volumes. This was required for the test cases which test expansion by layering a new pool on top of ZFS volumes. Enable the zpool_expand_001_pos and /zpool_expand_003_pos test cases which excercise the autoexpand property. Fixed zfs_zevent_wait() signal handling which could result in the ZED spinning when a signal was not handled. Removed vdev_disk_rrpart() functionality which can be abandoned in favour of re-opening the device which trigger a re-read of the partition table as long no other partitions are in use. This will be true as long as we're working with hole disks. As a bonus this allows us to remove to Linux kernel API checks. Signed-off-by: Brian Behlendorf <[email protected]> Issue openzfs#120 Issue openzfs#2437 Issue openzfs#5771 Issue openzfs#7582
- Loading branch information
1 parent
e4a3297
commit 4fb5d63
Showing
13 changed files
with
217 additions
and
207 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.