This looks mostly OK to me. Do you need to invoke parted at all though? I guess if you let sfdisk do it all, you have to do the resizefs calls downs before the sfdisk invocation and the resize ups after. I think I'd still prefer that though. WDYT?
Also this clearly only works for ext{2,3,4} filesystems. What's the long term plan there?
This looks mostly OK to me. Do you need to invoke parted at all though? I guess if you let sfdisk do it all, you have to do the resizefs calls downs before the sfdisk invocation and the resize ups after. I think I'd still prefer that though. WDYT?
Also this clearly only works for ext{2,3,4} filesystems. What's the long term plan there?