Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LVM #83 #87

Open
wants to merge 8 commits into
base: develop
Choose a base branch
from
Open

LVM #83 #87

wants to merge 8 commits into from

Conversation

popindavibe
Copy link

Hello,

I have worked on this and tested it manually on RHEL 7 device with following structure:

  • /boot on separate FS
  • no other separate FS

This will need further testing, but this is a first working script.

Copy link
Contributor

@reaperzn reaperzn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are some changes that need to be made then we can start testing.

# Minimum free space on the VG in percentage to allow snapshot creation.
# This will also define maximum snapshot size.
# If the snapshot consumes all its reserved space, you won't be able to revert,
# so please exerce caution when changing this.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo: exerce should be exercise

# space it is likely to consume.
readonly DAYS=3
# Where to log messages
readonly LOGDIR=/var/log/auter-lvm
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rather than recreating additional logs, we should add these entries to the default system log. See the logit function in the main auter script. If there is a requirement to create a separate log file for auter then this can be done in the systems syslog config file. This ensures that all related auter logs are kept together otherwise a tech would need to follow multiple logs to follow a single process. As per the logit function, we should use the appropriate priority (-p) with the same tag (-t auter)

readonly DAYS=3
# Where to log messages
readonly LOGDIR=/var/log/auter-lvm
readonly LOGFILE=${LOGDIR}/$(basename $0).log
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See previous comment on line 45

readonly LV_SNAP="snap_root_auter_$(date +%Y-%m-%d_%H%M%S)"

# Journal fonction
jnl() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See previous comment on line 45

[ $UID -eq 0 ] || { echo "ERROR: Requires root privileges"; exit 1; }

# Create log dir if needed
[ -d ${LOGDIR} ] || mkdir -p ${LOGDIR}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See previous comment on line 45

@popindavibe
Copy link
Author

Hi @reaperzn
I have done requested modifications. I am assessing the extra value of implementing a 'dry-run' option to the script in order to be able to check manually before activating it into Auter.

@reaperzn reaperzn added Enhancement Feature requests and existing code improvements Contrib Issues and PRs for the contrib directory labels Feb 1, 2018
@reaperzn reaperzn changed the base branch from master to develop March 16, 2018 13:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Contrib Issues and PRs for the contrib directory Enhancement Feature requests and existing code improvements Testing Required
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants