Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F3768579
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
View Options
diff --git a/scripts/byOS/Fedora/new-partition b/scripts/byOS/Fedora/new-partition
index d4c4907..abf249d 100755
--- a/scripts/byOS/Fedora/new-partition
+++ b/scripts/byOS/Fedora/new-partition
@@ -1,34 +1,34 @@
#!/bin/sh
#
# Adds a new partition to a device mapper volume group
#
# Usage ..... new-partition <device> <volume group> <logical volume name> [mounting point]
# Example ... new-partition /dev/sdb1 centos_dwellers wharf /wharf
# (or) new-partition /dev/sdb1 centos_dwellers wharf
#
# If mounting point is omitted, disk is mounted in /<logical volume name>
#
# Parses arguments
if [ $# -lt 3 ] || [ $# -gt 4 ]; then
echo 'Usage: new-partition <device> <volume group> <logical volume name> [mounting point]'
exit 1
fi
DEVICE=$1
VG=$2
LVNAME=$3
if [ $# -eq 4 ]; then
MOUNTING_POINT=$4
else
MOUNTING_POINT=/$LVNAME
fi
-pvcreate $DEVICE
-vgextend $VG $DEVICE
-lvcreate -l 100%FREE -n $LVNAME $VG
-mkfs -t xfs /dev/$VG/$LVNAME
+pvcreate "$DEVICE"
+vgextend "$VG" "$DEVICE"
+lvcreate -l 100%FREE -n "$LVNAME" "$VG"
+mkfs -t xfs "/dev/$VG/$LVNAME"
cat "/dev/mapper/$VG-$LVNAME $MOUNTING_POINT xfs defaults 1 2" >> /etc/ftab
-mount $MOUNTING_POINT
+mount "$MOUNTING_POINT"
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Mon, Nov 25, 08:54 (1 d, 14 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2259882
Default Alt Text
(1 KB)
Attached To
Mode
rOPS Nasqueron Operations
Attached
Detach File
Event Timeline
Log In to Comment