rbd-nbd mapped device online resize failed with ext4 filesystem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,

I run into a problem, that is when I mapped a nbd device with rbd-nbd
map CLI, the reproduce steps are:
1. rbd-nbd map test # 'test' size is 5G
2. mkfs.ext4 /dev/nbd0  # nbd0 is the mapped device
3. mount /dev/nbd0 /mnt #
4. rbd resize test 6G # resize 'test' to 6G in ceph cluster
5. lsblk  # nbd0 has new size 6G
6. ls /mnt # the ls proc will hang forever, 'kill -9' on it cann't kill it.
the stack of ls proc is:
[<ffffffff8d1304ce>] radix_tree_lookup_slot+0x1e/0x50
[<ffffffff8cf7d27b>] find_get_entry+0x1b/0x100
[<ffffffff8cf7d750>] pagecache_get_page+0x30/0x2b0
[<ffffffff8d1304ce>] radix_tree_lookup_slot+0x1e/0x50
[<ffffffff8cf7d27b>] find_get_entry+0x1b/0x100
[<ffffffff8cf7d750>] pagecache_get_page+0x30/0x2b0
[<ffffffff8d03b7a1>] __getblk_gfp+0x101/0x310
[<ffffffffc0586818>] ext4_getblk+0xa8/0x190 [ext4]
[<ffffffffc058691f>] ext4_bread+0x1f/0xb0 [ext4]
[<ffffffff8d01be68>] dput+0x38/0x250
[<ffffffffc0590680>] __ext4_read_dirblock+0x30/0x350 [ext4]
[<ffffffffc057ec15>] ext4_file_open+0xa5/0x270 [ext4]
[<ffffffffc0590fb9>] htree_dirblock_to_tree+0x69/0x2b0 [ext4]
[<ffffffff8cf85f48>] get_page_from_freelist+0x908/0xb40
[<ffffffff8d00d8c9>] terminate_walk+0x89/0xf0
[<ffffffffc05921f6>] ext4_htree_fill_tree+0xa6/0x2e0 [ext4]
[<ffffffff8cf87206>] __alloc_pages_nodemask+0xf6/0x260
[<ffffffff8cfe147b>] kmem_cache_alloc_trace+0x11b/0x530
[<ffffffffc057e5b2>] ext4_readdir+0x6f2/0xa20 [ext4]
[<ffffffff8d01819b>] iterate_dir+0x16b/0x190
[<ffffffff8d018688>] SyS_getdents+0x98/0x120
[<ffffffff8d0183f0>] fillonedir+0xe0/0xe0
[<ffffffff8d40861e>] system_call_fast_compare_end+0xc/0xb7
[<ffffffffffffffff>] 0xffffffffffffffff

and I can see an error log in rbd-nbd client log file:
2018-11-28 14:30:19.020284 7f7aa27fc700 -1 rbd-nbd: rescan of
partition table failed: (16) Device or resource busy

If I don't mount nbd0 and run resize2fs on nbd0, all things ok, then I
mount nbd0 after resize2fs is ok, too.
If I map test vol with 'rbd map test' CLI, then the steps 1~6 above
are all ok, the ext4 fs on rbd0 is resized correctly.
If I use xfs filesystem on nbd0 with rbd-nbd mapped, the steps 1~6
above are all ok with a resized filesystem, even there is an error log
in rbd-nbd client log file.

The ceph version is 12.2.5, with kernel 4.9.65.

Thanks a lot for any help.



[Index of Archives]     [CEPH Users]     [Ceph Large]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux