Enable softupdate + journals support.
PR: 150862 Submitted by: Kris Moore
This commit is contained in:
parent
9b6cb52091
commit
6f0ebf473d
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=213647
@ -217,7 +217,7 @@ setup_mbr_partitions()
|
||||
|
||||
# Now check that these values are sane
|
||||
case $FS in
|
||||
UFS|UFS+S|UFS+J|ZFS|SWAP) ;;
|
||||
UFS|UFS+S|UFS+J||UFS+SUJ|ZFS|SWAP) ;;
|
||||
*) exit_err "ERROR: Invalid file system specified on $line" ;;
|
||||
esac
|
||||
|
||||
@ -261,7 +261,7 @@ setup_mbr_partitions()
|
||||
check_for_mount "${MNT}" "/boot"
|
||||
if [ "${?}" = "0" ] ; then
|
||||
USINGBOOTPART="0" ; export USINGBOOTPART
|
||||
if [ "${FS}" != "UFS" -a "${FS}" != "UFS+S" -a "${FS}" != "UFS+J" ]
|
||||
if [ "${FS}" != "UFS" -a "${FS}" != "UFS+S" -a "${FS}" != "UFS+J" -a "${FS}" != "UFS+SUJ" ]
|
||||
then
|
||||
exit_err "/boot partition must be formatted with UFS"
|
||||
fi
|
||||
@ -401,7 +401,7 @@ setup_gpt_partitions()
|
||||
|
||||
# Now check that these values are sane
|
||||
case $FS in
|
||||
UFS|UFS+S|UFS+J|ZFS|SWAP) ;;
|
||||
UFS|UFS+S|UFS+J|UFS+SUJ|ZFS|SWAP) ;;
|
||||
*) exit_err "ERROR: Invalid file system specified on $line" ;;
|
||||
esac
|
||||
|
||||
@ -438,7 +438,7 @@ setup_gpt_partitions()
|
||||
if [ "${?}" = "0" ] ; then
|
||||
if [ "${CURPART}" = "2" ] ; then
|
||||
USINGBOOTPART="0" ; export USINGBOOTPART
|
||||
if [ "${FS}" != "UFS" -a "${FS}" != "UFS+S" -a "${FS}" != "UFS+J" ]
|
||||
if [ "${FS}" != "UFS" -a "${FS}" != "UFS+S" -a "${FS}" != "UFS+J" -a "${FS}" != "UFS+SUJ" ]
|
||||
then
|
||||
exit_err "/boot partition must be formatted with UFS"
|
||||
fi
|
||||
|
@ -124,6 +124,7 @@ mount_all_filesystems()
|
||||
case ${PARTFS} in
|
||||
UFS) mount_partition ${PART}${EXT} ${PARTFS} ${PARTMNT} "noatime" ;;
|
||||
UFS+S) mount_partition ${PART}${EXT} ${PARTFS} ${PARTMNT} "noatime" ;;
|
||||
UFS+SUJ) mount_partition ${PART}${EXT} ${PARTFS} ${PARTMNT} "noatime" ;;
|
||||
UFS+J) mount_partition ${PART}${EXT}.journal ${PARTFS} ${PARTMNT} "async,noatime" ;;
|
||||
ZFS) mount_partition ${PART} ${PARTFS} ${PARTMNT} ;;
|
||||
*) exit_err "ERROR: Got unknown file-system type $PARTFS" ;;
|
||||
@ -158,6 +159,7 @@ mount_all_filesystems()
|
||||
case ${PARTFS} in
|
||||
UFS) mount_partition ${PART}${EXT} ${PARTFS} ${PARTMNT} "noatime" ;;
|
||||
UFS+S) mount_partition ${PART}${EXT} ${PARTFS} ${PARTMNT} "noatime" ;;
|
||||
UFS+SUJ) mount_partition ${PART}${EXT} ${PARTFS} ${PARTMNT} "noatime" ;;
|
||||
UFS+J) mount_partition ${PART}${EXT}.journal ${PARTFS} ${PARTMNT} "async,noatime" ;;
|
||||
ZFS) mount_partition ${PART} ${PARTFS} ${PARTMNT} ;;
|
||||
SWAP)
|
||||
|
@ -154,6 +154,25 @@ setup_filesystems()
|
||||
sleep 2
|
||||
;;
|
||||
|
||||
UFS+SUJ)
|
||||
echo_log "NEWFS: /dev/${PART} - ${PARTFS}"
|
||||
sleep 2
|
||||
rc_halt "newfs -U /dev/${PART}${EXT}"
|
||||
sleep 2
|
||||
rc_halt "sync"
|
||||
rc_halt "tunefs -j enable /dev/${PART}${EXT}"
|
||||
sleep 2
|
||||
rc_halt "sync"
|
||||
rc_halt "glabel label ${PARTLABEL} /dev/${PART}${EXT}"
|
||||
rc_halt "sync"
|
||||
# Set flag that we've found a boot partition
|
||||
if [ "$PARTMNT" = "/boot" -o "${PARTMNT}" = "/" ] ; then
|
||||
HAVEBOOT="YES"
|
||||
fi
|
||||
sleep 2
|
||||
;;
|
||||
|
||||
|
||||
UFS+J)
|
||||
echo_log "NEWFS: /dev/${PART} - ${PARTFS}"
|
||||
sleep 2
|
||||
|
@ -99,6 +99,7 @@ unmount_all_filesystems()
|
||||
case ${PARTFS} in
|
||||
UFS) glabel label ${PARTLABEL} /dev/${PART}${EXT} ;;
|
||||
UFS+S) glabel label ${PARTLABEL} /dev/${PART}${EXT} ;;
|
||||
UFS+SUJ) glabel label ${PARTLABEL} /dev/${PART}${EXT} ;;
|
||||
UFS+J) glabel label ${PARTLABEL} /dev/${PART}${EXT}.journal ;;
|
||||
*) ;;
|
||||
esac
|
||||
@ -113,6 +114,7 @@ unmount_all_filesystems()
|
||||
case ${PARTFS} in
|
||||
UFS) ROOTRELABEL="glabel label ${PARTLABEL} /dev/${PART}${EXT}" ;;
|
||||
UFS+S) ROOTRELABEL="glabel label ${PARTLABEL} /dev/${PART}${EXT}" ;;
|
||||
UFS+SUJ) ROOTRELABEL="glabel label ${PARTLABEL} /dev/${PART}${EXT}" ;;
|
||||
UFS+J) ROOTRELABEL="glabel label ${PARTLABEL} /dev/${PART}${EXT}.journal" ;;
|
||||
*) ;;
|
||||
esac
|
||||
|
@ -189,13 +189,14 @@ The notation is as follows:
|
||||
Available FileSystems:
|
||||
UFS - Standard UFS2 FileSystem
|
||||
UFS+S - UFS2 + Softupdates enabled
|
||||
UFS+SUJ - UFS2 + Soft Updates + Journaling enabled
|
||||
UFS+J - UFS2 + Journaling through gjournal
|
||||
ZFS - Z File System, pools / mounts created automatically
|
||||
SWAP - BSD Swap space partition, mountpoint should be set to "none"
|
||||
|
||||
Adding the ".eli" extension to any of the above file systems
|
||||
will enable disk encryption via geli
|
||||
(UFS.eli, UFS+S.eli, UFS+J.eli, ZFS.eli, SWAP.eli)
|
||||
(UFS.eli, UFS+S.eli, UFS+SUJ.eli, UFS+J.eli, ZFS.eli, SWAP.eli)
|
||||
|
||||
If you with to use a passphrase with this encrypted partition, on the next line
|
||||
the flag "encpass=" should be entered:
|
||||
|
Loading…
Reference in New Issue
Block a user