Specifiy fs type in mount commands
This commit is contained in:
parent
2fb84efb6d
commit
c651f69e9c
@ -43,11 +43,11 @@ def be_mounted(dev, mountpoint):
|
|||||||
|
|
||||||
fs = current_fs(dev)
|
fs = current_fs(dev)
|
||||||
if fs == "ext4":
|
if fs == "ext4":
|
||||||
run(f"mount {dev} {mountpoint}")
|
run(f"mount -t ext4 {dev} {mountpoint}")
|
||||||
elif fs == "btrfs":
|
elif fs == "btrfs":
|
||||||
run(f"mount -o flushoncommit {dev} {mountpoint}")
|
run(f"mount -t btrfs -o flushoncommit {dev} {mountpoint}")
|
||||||
elif fs == "xfs":
|
elif fs == "xfs":
|
||||||
run(f"mount {dev} {mountpoint}")
|
run(f"mount -t xfs {dev} {mountpoint}")
|
||||||
else:
|
else:
|
||||||
raise Exception(f"Unsupported fs type: {fs}")
|
raise Exception(f"Unsupported fs type: {fs}")
|
||||||
|
|
||||||
@ -79,7 +79,7 @@ def be_formatted(dev, fs):
|
|||||||
f"""
|
f"""
|
||||||
set -ex
|
set -ex
|
||||||
mkdir -p {tmp_mnt}
|
mkdir -p {tmp_mnt}
|
||||||
mount {device} {tmp_mnt}
|
mount -t btrfs {device} {tmp_mnt}
|
||||||
btrfs subvolume create {default_subvol}
|
btrfs subvolume create {default_subvol}
|
||||||
btrfs subvolume set-default {default_subvol}
|
btrfs subvolume set-default {default_subvol}
|
||||||
umount {tmp_mnt}
|
umount {tmp_mnt}
|
||||||
|
Loading…
Reference in New Issue
Block a user