Skip to content

Commit

Permalink
Merge pull request #9193 from aaannz/no-partition-for-storage
Browse files Browse the repository at this point in the history
Do not create partition on extra storage disk
  • Loading branch information
deneb-alpha authored Sep 26, 2024
2 parents 90f1a87 + 16595b7 commit 72d0d53
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 27 deletions.
3 changes: 0 additions & 3 deletions uyuni/uyuni-storage-setup/scripts/mgr-storage-proxy
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,6 @@ check_mountpoint $storage_location
info "Checking disk for content signature"
check_content_signature $storage_disk

info "Creating partition on disk $storage_disk"
create_partition $storage_disk

info "Creating $storage_fs filesystem"
create_filesystem $storage_disk $storage_fs

Expand Down
6 changes: 0 additions & 6 deletions uyuni/uyuni-storage-setup/scripts/mgr-storage-server
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,6 @@ fi
info "Checking disk for content signature"
check_content_signature $storage_disk

info "Creating partition on disk $storage_disk"
create_partition $storage_disk

info "Creating $storage_fs filesystem"
create_filesystem $storage_disk $storage_fs

Expand All @@ -97,9 +94,6 @@ if [ "$database_disk" != "$storage_disk" ]; then
info "Checking data base disk for content signature"
check_content_signature $database_disk

info "Creating partition on disk $database_disk"
create_partition $database_disk

info "Creating $storage_fs filesystem"
create_filesystem $database_disk $storage_fs

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ linux_device() {
test -z "$1" && die "linux_device called without argument"
local device=$(readlink $1 2>/dev/null)
if [ -z "$device" ];then
echo $1
device=$(basename $1)
device=/dev/$device
echo $device
return
fi
device=$(basename $device)
Expand Down Expand Up @@ -65,8 +67,6 @@ is_btrfs_subvolume() {
return 1
}



check_mountpoint() {
test -z "$1" && die "check_mountpoint called without argument"
local mount_point=${1%/}
Expand Down Expand Up @@ -94,22 +94,14 @@ get_first_partition_device() {
echo $partition
return
fi
# If we are not on NVMe it just shows up as a scsi device
echo ${device}1
}

create_partition() {
test -z "$1" && die "create_parition called without argument"
local disk=$1
local result=$(parted -s $disk mklabel GPT 2>&1)
if [ $? != 0 ]; then
die "Creating new GPT label failed: $result"
fi
local result=$(parted -s $disk mkpart primary 2048s 100% 2>&1)
if [ $? != 0 ]; then
die "Partition setup failed: $result"
# If we are not on NVMe it may be a scsi device
partition=${device}1
if [ -e $partition ]; then
echo $partition
return
fi
rm -f $cmd_sequence
# no partition available, FS might be directly on the block device
echo ${device}
}

create_filesystem() {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- do not create partition on extra storage disk

0 comments on commit 72d0d53

Please sign in to comment.