Hard drives filling up due to amount of user accounts

Chuey
Contributor III

I have carts of MacBook Airs that get heavy use and their hard drives are filling up stating "Startup disk is almost full". I was previously combating a similar issue using a logout hook and removing all accounts and private/var/folders/ contents. Although this works, it's slow and I do not like doing it on logout because students shut the computers and throw them back into the cart and I have not tested if that logout hook still gets executed.

I was wondering if anyone was having similar issues and how you handle it ?

9 REPLIES 9

millersc
Valued Contributor

@Chuey What OS are you seeing this on?

Also are you doing any User purging at periodic times? e.g 30 days not logged in.

Chuey
Contributor III

@millersc Seeing this on 10.10.X and 10.11.X. I am not purging after any amount of days of inactivity. Are you doing this by script?

CasperSally
Valued Contributor II

@Chuey In shared environments (labs and carts), I run a script to delete user accounts older than 1 day once hard drive gets to 80% utilization. See this other thread for some ideas.

millersc
Valued Contributor

I have a Self Service script I've given to ONLY our Media Teachers to use based on the following criteria:

  1. They have to log into Self Service on the specific computer they wish to purge.
  2. The computer in question needs to meet 1 of 2 high water marks. Either have more than 30 users or HD more than 90% full.
  3. Every Media Teacher has been shown this personally so they understand this is a destructive script.

This gives them the control back. They no longer need to request from IT to do this for them. We've been working to give back more controls to our Media folks via Self Service. Many felt "dismissed" when they lost control prior to me.

Chuey
Contributor III

@CasperSally Is this a script that is automatically triggered or are you manually doing this when a request comes in stating hard drive is full?

@millersc Unfortunately this is happening on my mobile carts of 30 that hang out in the library or get utilized in a classroom when checked out. Most of the time no one can even log in due to how little space is left so the self service option probably would not be best. I'm thinking of having a script check inactivity of user accounts and purge those accounts. Just wondering how to best do it automatically.

I think there is an option within the Profiles to delete accounts after 30 days of inactivity. I believe we used it in past until it removed a staff account and then we abandoned ship. Anyone utilize this currently?

CasperSally
Valued Contributor II

@Chuey auto triggered based on machines falling into smart group that's "machine name like lab & hard drive utilization is > 80%" - don't forget to add an update inventory to the policy so machines that run the script fall out of the group.

The profiles to delete accounts after X days of inactivity works on some OS versions and not others. I believe it wasn't working on 10.10 last summer when I tested. You could test with a test profile scoped to one group where the days of inactivity is 0 or 1.

millersc
Valued Contributor

@Chuey When I have that happen on some of our devices, the only way to fix it is reboot and I use ARD to send the same command that Self Service has then force a reboot. Since giving this back to the teachers I've only had to do it twice this school year.

Have you analyzed what is filling the drive? Just each user account or data they are saving locally?

Chuey
Contributor III

@CasperSally That's what I was thinking. I've done that in the past to remove accounts and private/var/folders so I still have the SmartGroup displaying whose HDD is > 80% so that should be no problem. Thanks for your insight.

@millersc I believe it's just the volume of people logging into these computers on a daily basis. The MacBook Airs have 128GB SSDs, 20GB is taken up by our image / software and when I remove accounts there are at least 150 accounts on the machine.

blackholemac
Valued Contributor III

The config profile seems to work for us, but with new MacBook Air labs going out this summer I will follow this thread with interest. I like the idea of handing over to the media teachers. If anyone feels like posting their script, I'm all for checking it out.