Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cannot expand pool after disk resizing #8529

Closed
drook opened this issue Mar 23, 2019 · 5 comments
Closed

cannot expand pool after disk resizing #8529

drook opened this issue Mar 23, 2019 · 5 comments
Labels
Type: Defect Incorrect behavior (e.g. crash, hang)

Comments

@drook
Copy link

drook commented Mar 23, 2019

System information

Type Version/Name
Distribution Name Centos
Distribution Version 7.5.1804
Linux Kernel 3.10.0-862.3.3.el7
Architecture x86_64
ZFS Version 0.7.12-1
SPL Version 0.7.12-1

Describe the problem you're observing

Once again, what is dull and routine on Solaris and FreeBSD, is tricky, obscured and overcomplicated on Linux. I have resized the disk under the zpool doubledata, but system just doesn't see the new size as EXPANDSZ. Pool remains like the disk hasn't been resized. I cannot resize it using any possible trick I'm aware of.

Describe how to reproduce the problem

[root@db3 etc]# zpool status
  pool: data
 state: ONLINE
  scan: none requested
config:

        NAME        STATE     READ WRITE CKSUM
        data        ONLINE       0     0     0
          sdb       ONLINE       0     0     0

errors: No known data errors

  pool: doubledata
 state: ONLINE
  scan: scrub repaired 0B in 0h50m with 0 errors on Fri Nov 30 16:04:17 2018
config:

        NAME        STATE     READ WRITE CKSUM
        doubledata  ONLINE       0     0     0
          sdc       ONLINE       0     0     0

errors: No known data errors
[root@db3 etc]# zpool list
NAME         SIZE  ALLOC   FREE  EXPANDSZ   FRAG    CAP  DEDUP  HEALTH  ALTROOT
data         398G  56.2G   342G         -    83%    14%  1.00x  ONLINE  -
doubledata   298G   264G  34.0G         -    75%    88%  1.00x  ONLINE  -
[root@db3 etc]# parted /dev/sdc
GNU Parted 3.1
Using /dev/sdc
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) p
Model: QEMU QEMU HARDDISK (scsi)
Disk /dev/sdc: 408GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:

Number  Start   End    Size    File system  Name                  Flags
 1      1049kB  322GB  322GB                zfs-a1787aff0eb8073d
 9      322GB   322GB  8389kB

(parted) q
[root@db3 etc]# zpool offline doubledata sdc
cannot offline sdc: no valid replicas
[root@db3 etc]# zpool online -e doubledata sdc
[root@db3 etc]# zpool online doubledata sdc
[root@db3 etc]# zpool list
NAME         SIZE  ALLOC   FREE  EXPANDSZ   FRAG    CAP  DEDUP  HEALTH  ALTROOT
data         398G  56.2G   342G         -    83%    14%  1.00x  ONLINE  -
doubledata   298G   264G  34.0G         -    75%    88%  1.00x  ONLINE  -
[root@db3 etc]# zpool set autoexpand=on doubledata
[root@db3 etc]# zpool list
NAME         SIZE  ALLOC   FREE  EXPANDSZ   FRAG    CAP  DEDUP  HEALTH  ALTROOT
data         398G  56.2G   342G         -    83%    14%  1.00x  ONLINE  -
doubledata   298G   264G  34.0G         -    75%    88%  1.00x  ONLINE  -
[root@db3 etc]# zpool online doubledata sdc
[root@db3 etc]# zpool list
NAME         SIZE  ALLOC   FREE  EXPANDSZ   FRAG    CAP  DEDUP  HEALTH  ALTROOT
data         398G  56.2G   342G         -    83%    14%  1.00x  ONLINE  -
doubledata   298G   264G  34.0G         -    75%    88%  1.00x  ONLINE  -
[root@db3 etc]# zpool set autoexpand=on doubledata
[root@db3 etc]# zpool export doubledata
[root@db3 etc]# zpool import doubledata
[root@db3 etc]# zpool list
NAME         SIZE  ALLOC   FREE  EXPANDSZ   FRAG    CAP  DEDUP  HEALTH  ALTROOT
data         398G  56.2G   342G         -    83%    14%  1.00x  ONLINE  -
doubledata   298G   264G  34.0G         -    75%    88%  1.00x  ONLINE  -
[root@db3 etc]# zpool online doubledata sdc
[root@db3 etc]# zpool list
NAME         SIZE  ALLOC   FREE  EXPANDSZ   FRAG    CAP  DEDUP  HEALTH  ALTROOT
data         398G  56.2G   342G         -    83%    14%  1.00x  ONLINE  -
doubledata   298G   264G  34.0G         -    75%    88%  1.00x  ONLINE  -
[root@db3 etc]# zpool export doubledata
[root@db3 etc]# zpool import doubledata -o autoexpand=on doubledata
[root@db3 etc]# zpool list
NAME         SIZE  ALLOC   FREE  EXPANDSZ   FRAG    CAP  DEDUP  HEALTH  ALTROOT
data         398G  56.3G   342G         -    83%    14%  1.00x  ONLINE  -
doubledata   298G   264G  34.0G         -    75%    88%  1.00x  ONLINE  -
[root@db3 etc]# zpool set autoexpand=off doubledata
[root@db3 etc]# zpool export doubledata
[root@db3 etc]# zpool import doubledata
[root@db3 etc]# zpool get autoexpand doubledata
NAME        PROPERTY    VALUE   SOURCE
doubledata  autoexpand  off     default
[root@db3 etc]# zpool list
NAME         SIZE  ALLOC   FREE  EXPANDSZ   FRAG    CAP  DEDUP  HEALTH  ALTROOT
data         398G  56.3G   342G         -    83%    14%  1.00x  ONLINE  -
doubledata   298G   264G  34.0G         -    75%    88%  1.00x  ONLINE  -
[root@db3 etc]#

Include any warning/errors/backtraces from the system logs

@drook

This comment has been minimized.

@drook

This comment has been minimized.

@ahrens ahrens reopened this Mar 23, 2019
@behlendorf
Copy link
Contributor

behlendorf commented Mar 25, 2019

You've unfortunately run in to a known issue with the 0.7.x series. There are a surprising number of small differences between Illumos, FreeBSD, and Linux which can end up leading to problems like this. We've been working hard to improve the test coverage to prevent regressions, and also to systematically address every issue we find.

This particular issue has been fixed in master by #7546 and #7629. There was work was done to back port both of these fixes for the 0.7.10 tag, but those changes needed to reverted in 0.7.11 after it was discovered they accidentally introduced a subtle bug. You can expect this to work properly in the 0.8 release.

@behlendorf behlendorf added the Type: Defect Incorrect behavior (e.g. crash, hang) label Mar 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Defect Incorrect behavior (e.g. crash, hang)
Projects
None yet
Development

No branches or pull requests

5 participants
@behlendorf @ahrens @drook and others