Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
Applications
manjaro-architect
Commits
c9d0ab99
Commit
c9d0ab99
authored
Feb 28, 2020
by
Matti Hyttinen
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
ssh://gitlab.manjaro.org:22277/applications/manjaro-architect
parents
1a4a059b
c76a1e76
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
4 deletions
+15
-4
lib/util-disk.sh
lib/util-disk.sh
+15
-4
No files found.
lib/util-disk.sh
View file @
c9d0ab99
...
...
@@ -1008,7 +1008,13 @@ lvm_del_all() {
# returns a list of devices containing zfs members
zfs_list_devs
()
{
zpool status
-PL
2>/dev/null |
awk
'{print $1}'
|
grep
"^/"
# get a list of devices with zpools on them
for
device
in
$(
zpool status
-PL
2>/dev/null |
awk
'{print $1}'
|
grep
"^/"
)
;
do
# add the device
echo
$device
# now lets add any other forms of those devices
find
-L
/dev/
-xtype
l
-samefile
${
device
}
2>/dev/null
done
}
zfs_list_datasets
()
{
...
...
@@ -1064,9 +1070,14 @@ zfs_create_zpool() {
# Find the UUID of the partition
PARTUUID
=
$(
lsblk
-lno
PATH,PARTUUID |
grep
"^
${
PARTITION
}
"
|
awk
'{print $2}'
)
# Create the zpool
zpool create
-m
none
${
ZFS_ZPOOL_NAME
}
${
PARTUUID
}
2>
$ERR
check_for_error
"Creating zpool
${
ZFS_ZPOOL_NAME
}
on device
${
PARTITION
}
using partuuid
${
PARTUUID
}
"
# See if the partition has a partuuid, if not use the device name
if
[[
-n
${
PARTUUID
}
]]
;
then
zpool create
-m
none
${
ZFS_ZPOOL_NAME
}
${
PARTUUID
}
2>
$ERR
check_for_error
"Creating zpool
${
ZFS_ZPOOL_NAME
}
on device
${
PARTITION
}
using partuuid
${
PARTUUID
}
"
else
zpool create
-m
none
${
ZFS_ZPOOL_NAME
}
${
PARTITION
}
2>
$ERR
check_for_error
"Creating zpool
${
ZFS_ZPOOL_NAME
}
on device
${
PARTITION
}
"
fi
ZFS
=
1
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment