Skip to content
  • Mike Hibler's avatar
    Add TRIM support to clientside of frisbee MFS. · 2f3b1c67
    Mike Hibler authored
    Currently this is done using the -E (erase) option to zapdisk to
    erase a partition or the entire disk.
    
    We run zapdisk before starting a frisbee load. Ultimately, I want
    TRIM support in frisbee proper (to erase rather than skip or zero
    free blocks), but erasing the entire disk might be a better option
    anyway (frisbee itself will benefit from the TRIMed disk).
    
    Notes:
    
    We only trim the disk when a node is in reloading. Didn't want to take
    a chance on having a user reload a partition on their disk and wind up
    getting the entire disk erased. That should not happen, but I didn't
    want to think through all the possibilities right now.
    
    Only works on FreeBSD right now. Linux MFS will still need to be modified.
    Just didn't want to track down how Linux does block erase right now.
    
    The clientside here is different than what is used on the Moonshots.
    On the Linux-based Moonshot MFS, we TRIM in slicefix by running fstrim
    on the root FS we just layed down. This used to be...
    2f3b1c67