use chattr to make parent dirs of mount points immutable #1414

Closed
schakrava opened this Issue Aug 1, 2016 · 0 comments

Projects

None yet

1 participant

@schakrava
Member

More details to follow, but got a couple of e-mails about users running into issues as data could get written inadvertently to /mnt2/ or /export.

One suggestion that came up is to set the directory immutable with chattr.

@schakrava schakrava added this to the Looney Bean milestone Aug 1, 2016
@schakrava schakrava self-assigned this Aug 1, 2016
@schakrava schakrava added a commit to schakrava/rockstor-core that referenced this issue Nov 19, 2016
@schakrava schakrava Make top level mount directories read-only when unmounted. Fixes #1414
Shares and Pools are mounted as /mnt2/<name>. Sometimes they may fail to
mount but applications write to these directories assuming the writes
are going to a Share. But rootfs fills up instead and can cause major
problems later on. To fix this problem, set the read-only
attribute(chattr +i) on Pool, Share and export directories when they are
created. With this change, these directores stay read-only unless the
corresponding Share, Pool or nfs export is mounted.
75f9d05
@schakrava schakrava added a commit to schakrava/rockstor-core that referenced this issue Nov 19, 2016
@schakrava schakrava Sort constant declarations. #1414 5738c23
@schakrava schakrava added a commit that closed this issue Nov 19, 2016
@schakrava schakrava Make top level mount directories read-only when unmounted. Fixes #1414
Shares and Pools are mounted as /mnt2/<name>. Sometimes they may fail to
mount but applications write to these directories assuming the writes
are going to a Share. But rootfs fills up instead and can cause major
problems later on. To fix this problem, set the read-only
attribute(chattr +i) on Pool, Share and export directories when they are
created. With this change, these directores stay read-only unless the
corresponding Share, Pool or nfs export is mounted.

Sort constant declarations.

Remove Shares properly when force deleting the parent Pool
5836560
@schakrava schakrava closed this in 5836560 Nov 19, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment