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

Free space not calculated when LVM is in use #88

Open
ascheel opened this issue Apr 14, 2013 · 0 comments
Open

Free space not calculated when LVM is in use #88

ascheel opened this issue Apr 14, 2013 · 0 comments

Comments

@ascheel
Copy link

ascheel commented Apr 14, 2013

Free space on the destination filesystem is not calculated properly if an LVM setup is in use. The logic used is 'df -k $DEST' which in my case is:

df -k /media/AV/Movies | tail -1 | awk '{print $4*1024}'

On a standard filesystem, this works just dandy. In LVM, it does not for this reason:

user@host:/media/AV/Movies$ df -k /media/AV/Movies
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/mapper/vg_av_main-lv_av_main
7691417892 5133398648 2167346336 71% /media/AV

So the logic will grab the '71%' and parse that as free blocks instead of the proper column indicating free space. I do not have a proper solution to fix this. Perhaps if a '%' is found in the number, then use $3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant