Commit f92c0080 authored by Nikos Skalkotos's avatar Nikos Skalkotos
Browse files

Merge pull request #69 from skalkoto/feature-xfs-support

Feature xfs support
parents b3ee0d57 b9a53090
......@@ -37,9 +37,10 @@ DUMPFS_OPENBSD=dumpfs.openbsd
DATE="date -u" # Time in UTC
EATMYDATA=eatmydata
MOUNT="mount -n"
HIVEXGET="hivexget"
HIVEXREGEDIT="hivexregedit"
BTRFS="btrfs"
HIVEXGET=hivexget
HIVEXREGEDIT=hivexregedit
BTRFS=btrfs
XFS_GROWFS=xfs_growfs
CLEANUP=( )
ERRORS=( )
......@@ -526,7 +527,7 @@ mount_all() {
case "$osfamily" in
linux)
fs="ext[234]|msdos|vfat|ntfs|btrfs"
fs="ext[234]|msdos|vfat|ntfs|btrfs|xfs"
;;
freebsd)
fs="ufs|msdosfs|ntfs"
......
......@@ -85,7 +85,7 @@ if [[ "$ptype" == ext[234] ]]; then
elif [[ "$ptype" == "freebsd-ufs" ]]; then
$GROWFS_UFS -y "$device"
else
warn "Don't know how to resize partition \`$id' with file system \`$ptype'."
warn "Don't know how to resize unmounted partition \`$id' with file system \`$ptype'."
fi
exit 0
......
......@@ -61,19 +61,23 @@ select volume $id
extend filesystem
exit
EOF
elif [ "$ptype" = "btrfs" ]; then
elif [[ "$ptype" =~ ^(btrfs|xfs)$ ]]; then
target=$(find_mount_target "$device")
if [ -z "$target" ]; then
warn "Can't enlarge btrfs file system in device: \`$device'. File system not mounted"
warn "Can't enlarge $ptype file system in device: \`$device'. File system not mounted."
exit 0
fi
set $($BTRFS filesystem show "$device" | grep "$device")
if [ "$ptype" = btrfs ]; then
set $($BTRFS filesystem show "$device" | grep "$device")
$BTRFS filesystem resize "$2":max "$target"
$BTRFS filesystem resize "$2":max "$target"
else # "$ptype" = xfs
$XFS_GROWFS "$target"
fi
else
warn "Don't know how to resize \`$device'"
warn "Don't know how to resize mounted device: \`$device'"
fi
exit 0
......
......@@ -21,7 +21,7 @@ debootstrap=Debian GRNet Helper
aptsources=Debian
[Debian]
packages=socat iproute xenstore-utils ntfsprogs xmlstarlet python parted python-support eatmydata gdisk ntfs-3g python-passlib libhivex-bin libwin-hivex-perl btrfs-tools
packages=socat iproute xenstore-utils ntfsprogs xmlstarlet python parted python-support eatmydata gdisk ntfs-3g python-passlib libhivex-bin libwin-hivex-perl btrfs-tools xfsprogs
source=http://ftp.gr.debian.org/debian
suite=wheezy
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment