purgezfs is created to purge/delete ZFS snapshot of a user (Solaris 10+, Linux ZOL project, tested EL/RHEL 6x, 7x, 8x) (C) Rejean Lepage, from April 2008 to April 2023. lepage (at) grm.polymtl.ca GRM, Ecole Polytechnique de Montreal. ================================================== Latest devel in progress... version purgezfs 2.74 (April 04, 2023) 2023-04-04: can find nextcloud in mypool/home2/nextcloud if getent home is not local and set in /users2/nextcloud version purgezfs 2.73 (August 26, 2022) - # version 2.73: 2022-08-26: ## BUG EL6: df will not show /usr/local in the mount list - EL6 # % df -l -h /usr/local == df: no file systems processed version purgezfs 2.72 (Mars 30, 2021) - # version 2.72: 2021-03-30: '/users/nnnnnn': not a ZFS filesystem - bug apres update zfs ??? back to df ligne 474 version purgezfs 2.71 (June 20, 2019) - add option -D to disable auto snapshot @purgezfs_auto version purgezfs 2.70 (June 19, 2019) - add option -P to select zpool version purgezfs 2.68 (oct 29, 2018) - add option --nc | -nocheck | --nocheck will not check for updates - el6 /bin/tail missing while el7 /usr/bin/tail and /bin/tail exist - modif echo and Echo - add option -n | --dry | --dry-run will actually do nothing version purgezfs 2.67 (oct 25, 2018) - sudoer user message - versose forgot to shift - ignore mounted snapshot home@snapshot - test for params in while with quote "" = "unary operator expected" - test for params -h as user fail to display usage version purgezfs 2.66 (Aug 16, 2018) - bug fix with EL6, EL7 does not react the same with df - bug fix when no getent = quit. - add verbose for debug - bug fix when reply is n (ok y or q) return 0 (-1 fail on linux) version purgezfs 2.65 (Aug 15, 2018) - bug fix BUG: confused zfs et nfs (nfs:/mypool/users vs /mypool/users) - better explain what is what. display of msg. version purgezfs 2.64 (July 11, 2018) - bug fix BUG: /CMC trouve pas... - Add a requirement: each FS/ZFS should have a username assiated with version purgezfs 2.63 (July 11, 2018) - bug fix BUG: because of user 4205_1 having a home in 4205/1 version purgezfs 2.62 (March 18, 2014) - bug fix looking for user lepage will also find user lepage2 - fixed with egrep end of word '\>' version purgezfs 2.61 (March 18, 2014) - bug fix looking for user lepage will also find user lepage2 - fixed version purgezfs 2.60 (March 17, 2014) - now support ZOL and Linux - added support for ZOL (ZFS on Linux) and little clean up version purgezfs 2.52 (March 17, 2014) - minor bug when find several home zfs - adding warning and messages updates version 2.51: May 27, 2013 - set auto snapshot name to purgezfs_auto - delete it before creation. version 2.5: March 4, 2013 - decide to name 2.5 since it's a big change - add month snapshot after purge - message update - version text typo version 2.4: August 25, 2009. - added a more specific message to go on the ZFS server. - performance fixed issue with sorting zfs list while searching for the home directory. version 2.3: April 9, 2009. - added a message that it could take a while to search for snapshot. version 2.2: Sept 11, 2008. - bug fix, when no snapshot available do nothing. version 2.1: June 9, 2008. - add GPL - bug fix, grep something that does not exist will return all snapshot. - display header to snapshot size only if we are in validation mode. - Snapshot deletion message change. version 2.0: June 6, 2008. - auto find the user zfs pool if user_zpool not defined - display snapshot refering size and referer in a format - bug fixed with error display when unkown user "cannot open '': dataset does not exist" - mod using zfs command with correct option to get zpool, zfs, size - optimizing speed to display snapshot and size with zfs command - Defining all shell command thru vars - remove message about no new version - addind size info header version 1.4: June 5, 2008. - automatically relaunch with sudo when user forget to type sudo - renaming of some vars - split version into (purgezfs version_no version date) version 1.3.1: Mai 22, 2008. - minor testing for auto find the user zfs pool - typo Download it... version 1.3: Mai 20, 2008. - just "sudo purgezfs" will cause missing parameter for normal users, fixed. - check for latest version with wget - --update | -u | -update option added - add project web page in usage - typo on date - typo on option detected. - version number modif - web site must have 2 files for wget to work. version and purgezfs - user must have wget installed version 1.2: Mai 12, 2008. - typo - change quote in grep string - when in user mode with sudo do not require a username, do only the current user version 1.1: Mai 9, 2008. - add --version option - modify usage - detect sudo - allow user to remove their own snapshot only when using sudo - tcsh script can be setuid but bash and sh script cannot be setuid, not sure why? - force bash directory version 1.0.3: April 17, 2008. - set full path for whoami - ajusting usage version 1.0.2: April 16, 2008. - trap unknown option and only '-' as an option - trap -- option to treat rest as a user version 1.0.1: April 14, 2008. - change grep for egrep so we ca use '(str1|str2)' - set full path - change usage for egrep and version version 1.0: April 11, 2008. - first working release ========================= No Known critical Bugs No Known Bugs Future feature - any suggestions ? Please feel free to ask.