diff options
author | imp <imp@FreeBSD.org> | 2010-10-09 07:45:24 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 2010-10-09 07:45:24 +0000 |
commit | 77a8584fd98601764683b95454ea91ac9d1050de (patch) | |
tree | ed7fdacbcc85d380f75897c2702839a352846069 /usr.sbin | |
parent | 6dc6856e334aa81abad9a95e6efe87e9d697c7aa (diff) | |
download | FreeBSD-src-77a8584fd98601764683b95454ea91ac9d1050de.zip FreeBSD-src-77a8584fd98601764683b95454ea91ac9d1050de.tar.gz |
Enable softupdate + journals support.
PR: 150862
Submitted by: Kris Moore
Diffstat (limited to 'usr.sbin')
5 files changed, 29 insertions, 5 deletions
diff --git a/usr.sbin/pc-sysinstall/backend/functions-bsdlabel.sh b/usr.sbin/pc-sysinstall/backend/functions-bsdlabel.sh index 1604148..04bd0b4 100755 --- a/usr.sbin/pc-sysinstall/backend/functions-bsdlabel.sh +++ b/usr.sbin/pc-sysinstall/backend/functions-bsdlabel.sh @@ -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 diff --git a/usr.sbin/pc-sysinstall/backend/functions-mountdisk.sh b/usr.sbin/pc-sysinstall/backend/functions-mountdisk.sh index 4d8d4a4..57d70ec 100755 --- a/usr.sbin/pc-sysinstall/backend/functions-mountdisk.sh +++ b/usr.sbin/pc-sysinstall/backend/functions-mountdisk.sh @@ -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) diff --git a/usr.sbin/pc-sysinstall/backend/functions-newfs.sh b/usr.sbin/pc-sysinstall/backend/functions-newfs.sh index 3963ef7..5ac9ebe 100755 --- a/usr.sbin/pc-sysinstall/backend/functions-newfs.sh +++ b/usr.sbin/pc-sysinstall/backend/functions-newfs.sh @@ -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 diff --git a/usr.sbin/pc-sysinstall/backend/functions-unmount.sh b/usr.sbin/pc-sysinstall/backend/functions-unmount.sh index a87d901..aaf8b68 100755 --- a/usr.sbin/pc-sysinstall/backend/functions-unmount.sh +++ b/usr.sbin/pc-sysinstall/backend/functions-unmount.sh @@ -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 diff --git a/usr.sbin/pc-sysinstall/examples/README b/usr.sbin/pc-sysinstall/examples/README index 1031375..345cca2 100644 --- a/usr.sbin/pc-sysinstall/examples/README +++ b/usr.sbin/pc-sysinstall/examples/README @@ -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: |