An open community 
of Macintosh users,
for Macintosh users.

FineTunedMac Dashboard widget now available! Download Here

Previous Thread
Next Thread
Print Thread
Scripting Diskutil Repairvolume to run on it's own
#14053 02/04/11 07:07 PM
Joined: Feb 2011
ph8tel Offline OP
OP Offline

Joined: Feb 2011
Does anyone have an idea on how to do this? I would like to write a script that will reboot the computer after hours, run Repairvolume on the OS drive, copy the results onto a public folder and then reboot the system normally.

Is this even possible?

Normally I would do all this with a Linux usb thumb or the OS install disks, but this time it needs to be done through scripting.

Any ideas would be helpful, including: "That's just not possible mate."

Cheers,
ph8

Re: Scripting Diskutil Repairvolume to run on it's own
ph8tel #14056 02/04/11 10:13 PM
Joined: Aug 2009
Offline

Joined: Aug 2009
In most cases a volume has to be unmounted to repair it. I believe disk utility can do most repairs now live, but I still don't think I trust that completely. It still worries me seeing boot camp assistant live-repartition the boot drive. (which uses diskutility, which is the heavy lifter for Disk Utility)

Look up your options with diskutility in terminal.


I work for the Department of Redundancy Department
Re: Scripting Diskutil Repairvolume to run on it's own
Virtual1 #14057 02/04/11 11:30 PM
Joined: Aug 2009
Likes: 3
Moderator
Offline
Moderator

Joined: Aug 2009
Likes: 3

Just to be picky, it's actually diskutil, which, judging by the title of the thread, ph8tel is already aware of: diskutil repairVolume device is the relevant command.

As long as you're not attempting to repair the boot volume, and assuming the volume in question can be unmounted, diskutil repairVolume unmounts it automatically, just like Disk Utility.



dkmarsh—member, FineTunedMac Co-op Board of Directors

Moderated by  alternaut, dianne, MacManiac 

Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.4
(Release build 20200307)
Responsive Width:

PHP: 7.4.33 Page Time: 0.027s Queries: 20 (0.022s) Memory: 0.5758 MB (Peak: 0.6317 MB) Data Comp: Zlib Server Time: 2024-03-29 07:21:23 UTC
Valid HTML 5 and Valid CSS