1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-22 17:35:59 +03:00
lvm2/test/shell/large-physical-sector-size.sh

45 lines
1.2 KiB
Bash
Raw Normal View History

2019-07-30 23:59:11 +03:00
#!/usr/bin/env bash
# Copyright (C) 2019 Red Hat, Inc. All rights reserved.
#
# This copyrighted material is made available to anyone wishing to use,
# modify, copy, or redistribute it subject to the terms and conditions
# of the GNU General Public License v.2.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
SKIP_WITH_LVMPOLLD=1
. lib/inittest
LOGICAL_BLOCK_SIZE=4096
# PHYSICAL_BLOCK_SIZE is set with physblk_exp which
# shifts the logical block size value.
# 4096 << 9 = 2MB physical block size
PHYSICAL_BLOCK_SHIFT=9
aux prepare_scsi_debug_dev 256 sector_size=$LOGICAL_BLOCK_SIZE physblk_exp=$PHYSICAL_BLOCK_SHIFT || skip
2019-07-30 23:59:11 +03:00
check sysfs "$(< SCSI_DEBUG_DEV)" queue/logical_block_size "$LOGICAL_BLOCK_SIZE"
# Eventually we may fail here on 'page allocation failure' if kernel is low on sequential memory
aux prepare_pvs 1 256 || skip "Cannot handle large logical block size"
2019-07-30 23:59:11 +03:00
get_devs
vgcreate $SHARED $vg "$dev1"
for i in $(seq 1 40); do lvcreate -an -l1 $vg; done;
2019-07-30 23:59:11 +03:00
lvs $vg
lvremove -y $vg
vgremove $vg
aux cleanup_scsi_debug_dev