summaryrefslogtreecommitdiffstats
path: root/scripts/fsadm.sh
Commit message (Collapse)AuthorAgeFilesLines
* Fix string parsingZdenek Kabelac2012-03-161-8/+12
| | | | | | | | | Fix propagation of -e option - pass it via internal shell variable. Fix parsing of /proc/mounts files (don't check for substrings). as reported by O.Mangold with suggested patch: https://www.redhat.com/archives/linux-lvm/2012-February/msg00030.html Properly pass arguments with spaces ("$@") Add validation for YES and EXTOFF variable content.
* Add support for DM_DEV_DIRZdenek Kabelac2011-09-191-10/+13
| | | | | Follow other commands support this directory setting. Useful for test suite.
* Add support for non /dev devicesZdenek Kabelac2011-09-191-1/+1
| | | | Since test suite is not using /dev - add support for such dirs into fsadm.
* Support different PATH settingZdenek Kabelac2011-09-191-1/+3
| | | | | | | | | When fsadm is test - it needs to execute lvm and fsadm from non-standard path setting. So adding a support in fsadm script when user set LVM_BINARY, then the lvm command invoced from fsadm will have the same PATH setting as before entering fsadm command. Needed for testing.
* Surround all executed commands with quotesZdenek Kabelac2011-09-191-41/+41
| | | | | | | In case someone would use filename paths with spaces when changing this script surround commands with '"'. With default settings there is no change in behavior.
* Fix missing '$' in testZdenek Kabelac2011-09-191-1/+1
|
* Add date configurable variable DATEZdenek Kabelac2010-11-111-2/+4
| | | | | Follow the rule to run every command through variable dereference. Add a runtime check of translated date to seconds.
* fsadm fix for downsize of unmounted fsZdenek Kabelac2010-11-101-9/+52
| | | | | | | | | | | | | | | | | Fix for the last commit as $MOUNTED is not only used as bool flag, but also store mounted location for remount - so parsing output from mount differently then from /proc/mounts. Prefix calls of 'tunefs' tools with LANG=C to be sure we always do get some nonlocalized strings. Avoid using forced 'resize2fs' for cleanly unmounted filesystems and run regular fsck -f for this case as required by resize2fs. 'fsadm check' uses date difference for extX filesystems between the last mount and last check of 'fsck -f' execution and if the mount was later run 'fsck' with -f so resize2fs is happy and user does not need to pass '-f' flag.
* Scan also 'mount' output for mounted filesystem.Zdenek Kabelac2010-11-101-0/+4
| | | | | | | | | | | | | | | As util-linux package seems to give all the time different names, try harder to figure out, where is the given lv possible mounted and scan /proc/mounts and if not found there, test also 'mount' output. /dev/dm-xxx /dev/mapper/vg-lv /dev/vg/lv All of them could be used different combination in /proc/mount and mount output. Patch fixes regression for older systems where new detection code failed to find valid combination.
* Return different status code for fsadm check of mounted filesystemZdenek Kabelac2010-11-011-2/+12
| | | | | | | | Return status code 3 for fsadm check of mounted filesystem - used later with lvresize update patch to better support online filesystem resize. Also makes a more consistent user interruption and returns status code 2 in this case.
* Add support for noninterctive shell executionZdenek Kabelac2010-10-081-1/+5
| | | | | | Try to distinguish between the case of using interactive shell and non interactive running - different combinations of '-y' and '-p' option needs to be used for fsck.
* Fix usage of --yes flag for ReiserFS resizeZdenek Kabelac2010-10-081-1/+1
| | | | Put 'dry' before resize command - using dry for echo had no use.
* Fix detection of mounted filesystem.Zdenek Kabelac2010-10-081-7/+21
| | | | | | | | | | | | | Update the way how fsadm detects mounted filesystem. With udev /dev/dm-XXX paths are now returned - but mount or /proc/mounts prints names in form of /dev/mapper/vg-lv - so the match was not found. Fixex RHBZ #638050. Current solution uses same trick as mount and detects vg-lv name through /sys where available - this should be reasonable safe. Instead of calling mount without parameter to get actual mount table, switch to use /proc/mounts directly.
* Fix assignment of default LVM variableZdenek Kabelac2010-10-081-1/+1
| | | | | Fix a typo which does not work in case LVM_BINARY is empty string. Using proper :- syntax.
* Support for passing --yes flag recursively.Zdenek Kabelac2010-10-081-1/+3
|
* Correctly respect --dry-run option for fsadmZdenek Kabelac2010-10-081-4/+7
| | | | | | | | Fix missing 'dry' execution of lvresize - fixing problem where resize command were 'dry-run' executed - but lvresize has been executed for real. Also adapt code slightly to support better recursive execution of fsadm through lvresize call.
* Fix a serious bug in the behavior of fasdm tool when breaked.Zdenek Kabelac2010-10-081-2/+3
| | | | | | | | | Under certain conditions it was possible to break (^C) fsadm before actually resizing filesystem, but lvresize which executed fsadm will think resize was succesful and shrinks partitions with unresized filesystem on it. Fix by returning error (1) for this case - this stops lvresize from futher proceding in resize operation.
* Replace "can not" with "cannot"Zdenek Kabelac2010-10-081-3/+3
|
* Use /bin/bash for scripts with bashismsZdenek Kabelac2010-05-141-1/+1
|
* Use 'lvm lvresize' instead of 'lvresize' in fsadm.Zdenek Kabelac2009-06-091-7/+13
| | | | Do not use '-n' realine option in fsadm for busybox compatiblity.
* Fixed bug where lvresize option -t was not properly passed to fsadm.Zdenek Kabelac2009-02-241-33/+32
| | | | | | | Using argv[] list in exec_cmd() to allow more params for external commands. Fsadm does not allow checking mounted filesystem. Fsadm no longer accepts 'any other key' as 'no' answer to y/n. Fsadm improved handling of command line options.
* Remove external dependency on the 'cut' command in fsadmZdenek Kabelac2009-02-061-4/+5
|
* add support for ext4 resize in fsadmZdenek Kabelac2009-02-041-4/+4
|
* pre-release (bug fixes only - enhancements excluded)Alasdair Kergon2008-04-291-1/+1
|
* fixing fsadm usage with older blockdev,blkid,readline toolsZdenek Kabelac2008-04-291-5/+17
| | | | fixing lvresize extension code path where size was not set for fsadm
* Fix lvresize to support /dev/mapper prefix in the lvnameZdenek Kabelac2008-02-061-8/+31
| | | | | | Fix unfilled paramater passed to fsadm from lvresize Update fsadm to call lvresize if the partition size differs (with option -l) Fix fsadm to support vg/lv name (like the rest of lv-tools)
* added more safety checksZdenek Kabelac2008-01-081-13/+33
| | | | | fixed error reporting commands extended with Exa and Peta support
* Major restructuring of pvmove and lvconvert layer manipulation codeAlasdair Kergon2007-12-201-3/+3
|
* tweak usage textAlasdair Kergon2007-12-171-18/+20
|
* replace fsadm.c with fsadm.shAlasdair Kergon2007-12-171-0/+343