mirror of
git://sourceware.org/git/lvm2.git
synced 2025-03-10 16:58:47 +03:00
tests: lvcreate thin-pool support --name
This commit is contained in:
parent
4baf4b8cf9
commit
de0e6029f1
@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Copyright (C) 2011-2013 Red Hat, Inc. All rights reserved.
|
||||
# Copyright (C) 2011-2014 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
|
||||
@ -50,6 +50,30 @@ lvremove -ff $vg/pool1 $vg/pool2 $vg/pool3 $vg/pool4 $vg/pool5 $vg/pool6 $vg/poo
|
||||
check vg_field $vg lv_count 0
|
||||
|
||||
|
||||
# Let's pretend pool is like normal LV when using --type thin-pool support --name
|
||||
# Reject ambigous thin pool names
|
||||
invalid lvcreate --type thin-pool -l1 --name pool1 $vg/pool2
|
||||
invalid lvcreate --type thin-pool -l1 --name pool3 --thinpool pool4 $vg
|
||||
invalid lvcreate --type thin-pool -l1 --name pool5 --thinpool pool6 $vg/pool7
|
||||
invalid lvcreate --type thin-pool -l1 --name pool8 --thinpool pool8 $vg/pool9
|
||||
check vg_field $vg lv_count 0
|
||||
|
||||
lvcreate --type thin-pool -l1 --name pool1 $vg
|
||||
lvcreate --type thin-pool -l1 --name $vg/pool2
|
||||
# If the thin pool name is unambigous let it proceed
|
||||
lvcreate --type thin-pool -l1 --name pool3 $vg/pool3
|
||||
lvcreate --type thin-pool -l1 --name pool4 --thinpool $vg/pool4
|
||||
lvcreate --type thin-pool -l1 --name pool5 --thinpool $vg/pool5 $vg/pool5
|
||||
|
||||
check lv_field $vg/pool1 segtype "thin-pool"
|
||||
check lv_field $vg/pool2 segtype "thin-pool"
|
||||
check lv_field $vg/pool3 segtype "thin-pool"
|
||||
check lv_field $vg/pool4 segtype "thin-pool"
|
||||
check lv_field $vg/pool5 segtype "thin-pool"
|
||||
|
||||
lvremove -ff $vg
|
||||
|
||||
|
||||
# Create default pool name
|
||||
lvcreate -l1 -T $vg
|
||||
lvcreate -l1 --type thin $vg
|
||||
|
Loading…
x
Reference in New Issue
Block a user