Forcing the disk cache to be written to disk

Hi all. We are looking for a way to insure the content of the icommon in the ufs on disk as we need to read it. However, calling sync is async and does not seem to provide what we're looking for. When a file is updated, created all the information is not immediately written to disk. It is kept in the unified memory and later flushed to the disk cache which then writes it down on the media. However, since we're reading the hot FS we need to force ALL file metadata AND data to be written to the media.
Seems like when I run the command 'ff', probably as a side-effect, this is happening. ff takes too long and is at the FS level. Is it a side-effect, or does 'ff' calls a specific func (truss did not reveal anything useful).
Thanks all and best regards.

I. What is really happening under the hood?
1.sync(2) passes execution into kernel mode
2.kernel function syssync() is called then
3.then vfs_sync(0)
4.eventually ufs_sync(vfsp,�) is called with NULL as a first argument
in case of NULL(as a 1st arg) ufs_sync() just schedules but does not necessarily completes the writing of ufs metadata before returning.
So, this behavior completely matches with one described in man section for sync(2).
II. directio does not solve your problem because it affects only the way the file data( not metadata) goes to disk. ( read directio(3C) and mount_ufs(1M) carefully )
III. What you really need
May be it seems to be a heavy weapon for you but one of the possibilities is:
     To write a loadable system call (loadable kernel module) that will
invoke ufs_sync() with proper arguments (non NULL vfsp) for mounted file
system of interest.

Similar Messages

  • How can I force the Disk Cache on with Apple Raid Card?

    I have an apple raid card in my mac pro that has now had it's battery fail twice. I don't really want to keep putting money into this and would rather just force the disk cache on and hope my UPS works, I don't use this box for real work anymore anyway and it's all backed up.
    There used to be a force on button next to the Write Cahce Status section, but that seems to have gone away. Does anyone know how to force the cache on? Permanently if possible.

    OK, Command Line fun, use at your own risk:
    sudo raidutil modify controller -E

  • I need help doing a clean install.( keyboard shortcuts?).Macbook will not read any of the disks/ turns off

    I installed a new 'used' Logic board, im my macbook 13.3 and it turned right on!..( i was out of warrenty)
    Apple logo and spiing wheel, then turns off..
    After reading several forums, I went into self mode, did the 2 checks within in and got an error which pointed to the OS software being currupted..
    so I have  inserted the Os disk, the disk-repair disk and a disk warrior disk, but none of them are being read. I hear the Macbook starting to read the disk then the disks are ejected and the systen turns off.
    Is there a way i can do a clean install on the HD? shortcut keyboard shortcuts?
    or force the disks to be read as the first boot device like of that  in a PC's bios settup?
    I have no data on the computer that I wish to save btw.. just want a fresh install..
    thanks for any help in advance.

    Unfortunately the necessary software to reinstall your OS is not located on the hard drive. If your MacBook will not accept the disks you have you are going to need a hardware repair, probably the optical drive.
    If you have access to another MacBook you may be able to install the OS on an external hard drive and use that to boot your MacBook. You may then be able to get any data off of your hard drive.
    Best of luck.

  • IPod Error Message: "The disk could not be read from or written to."

    Hello!
    I was syncing my sister's video iPod (30GB) and this error message pops up "Attempting to copy to the disk. "SARAH'S IPO" failed. The disk could not be read from or written to."
    I have restored it three times already, but once it starts putting the music and files back onto the iPod it pops up with that error message. I have updated to the latest version of iTunes and iPod software available. My OS is Windows XP.
    Is this something serious? Will I be able to fix it myself or will I need to send it in to be fixed by Apple? Will that be expensive? We didn’t get the Apple replacement plan. D=
    Any help would be greatly appreciated. Thank you in advance. ^_^
    PowerBook G4   Mac OS X (10.4.3)   15" PowerBook 1.5 GHz PowerPC G4, 1.5GB RAM - Windows XP with iPod 5 Generation

    Okay I went thru that entire list and here's what I got...
    (1) My OS is XP and is running fine.
    (2) I've updated my windows
    (3) I don't know of any software that might be interfering.
    (4) There are no damaged files.
    (5) My Windows hard-drive is not damaged and I've tried restoring my iPod's disk thru iTunes but it still doesn't work.
    (6) I don't have an iPod photo and I can't find the folder to delete the cache if if I did.
    (7) The USB cord is firmly connected into my USB port and my iPod
    (8) My music is on my external hard-drive so I need to keep 3rd-party hardware connected
    (9) I will try another USB cord to see if that works.
    Is there anything else that I can do? Can Apple fix this?
    Please let me know.

  • IPod cannot be synced. The disk could not be read or written to.

    I have...
    G5 ipod video 30Gb formated to PC
    iBook G3 600MHz
    iTunes 7.1 (59)
    iPhoto 4.03
    I use my ipod to contain all my videos, photos and music manually and nothing stored on the iBook itself, as it only has a small hard drive. I have a large amount of photos that I have in iphoto (a total of 3254 photos and 60 folders!) which I am using whilst travelling the world. I have recently started syncing photos to the ipod as a backup, also adding a copy of full res photos. This syncs fine and I have all photos on my ipod, but when I add more photos to iphoto and then plug in the ipod it will start to sync though itunes, but then will come up with an error stating "The ipod "NAME OF IPOD" cannot be synced. The disk could not be read from or written to."
    The ipod still has all the photos it originally had, but not the new ones.
    I have tried deleting the file that is in the library that contains the information file, this forces the ipod to re sync and start all over again with adding the photos, which it will add the new photos, but the probelm will happen again as soon as more photos are added through iphoto!
    Can anyone give any advice, I really can't format the ipod and start over agaian as I will lose all my music etc and I don't have enough room to store them elsewhere!!!
    Please any help please! I really need to back these files up incase something goes wrong with the computer, then I will lose all my pictures!
    Help!
    Thanks
    Rob

    Hi Rob!
    First off, it might be worth upgrading to the latest iTunes version, which is 7.1(15) (or at least I think that's what it is on a Mac... for Windows, it's 7.1.1.5).
    Regardless, you can install the latest version of iTunes here:
    Download iTunes - 7.1.1.5
    Also, if that doesn't seem to help with anything, have you seen the suggestions in this article?:
    "Disk cannot be read from or written to" when syncing iPod
    -Kylene

  • The disk could not be read from or written to.  Please help.

    I don't understand why this is not working for me. Let me explain... I have two iPods, one is a 1st Gen and the other one is a Video one. Every time I tried to add music to the 1st Gen iPod I get a message that says - "Attempting to copy to the disk "NameOfiPod" failed. This disk could not be read from or written to." - but when I add music to the iPod Video it goes really smooth without any problems.
    I read the following article and to be honest I didn't find an answer to this issue. http://docs.info.apple.com/article.html?artnum=301267
    I checked the list to make sure everything is on point:
    1. Outdated operating system software
    - I'm up to date
    2. Computer needs updates
    - Again, everything is up to date
    3. Software interference
    - No software has been installed lately
    4. Damaged files
    - I've tried many and same thing happenes
    5. Damaged disk structure
    - Everything appears to be OK.
    6. To repair your computer's hard disk
    - No errors or damaged files
    7. To repair an iPod disk
    - Restored it using latest iPod Updater
    8. Corrupt iPod photo Cache
    - Don't have that, this is a 1st Gen iPod
    9. Lost connection
    - No connection drop
    10. Bad hardware
    - I use the same USB cable for both iPods
    I just don't know what to do next. Let me know if anyone else has another idea.
    Thanks a lot in advance!

    OK! I found what the problem was. It seems that the 1st Gen iPod does not like to be plugged to the front USB port on my G5, weird because my iPod Video has not complained a bit about it. As soon as I plugged the USB cable to one of the back ports it worked flawless. Dragged and dropped my music on it and it went straight in without any errors. Nice, huh?
    Thanks though to those who tried to help me.

  • Ipod cannot be updated, the disk could not be read or written to

    I get the above mssg when I try to sync a photo folder with 5th gen ipod. the music syncs just fine and the ipod is "seen" by the computer. i have enabled the disk.
    Any suggestions???

    I get the above mssg when I try to sync a photo folder with 5th gen ipod. the music syncs just fine and the ipod is "seen" by the computer. i have enabled the disk.
    let's start with this document:
    "Disk cannot be read from or written to" when syncing iPod or "Firmware update failure" error when updating or restoring iPod
    given that you're getting this when you try to sync photos, perhaps start by checking on the suggestion in the "Corrupt iPod photo Cache" section of the document.

  • "The iPhone cannot be synced. The disk could not be read from or written to."  Any clue what that is due to.  Everything but photos seem to sync fine.

    when syncing, I get an error message stating: "The iPhone cannot be synced. The disk could not be read from or written to."  Any clue what that is due to.  Everything but photos seem to sync fine.

    I had the same problem when trying to sync my new ilPhone 4s and a fairly new iPad 2. I couldn't find anything in the forum about it. So, since my 4s was new, I called support and luckily I got a CSR with some knowledge. He at first thought it would be tough to fix but after thinking a minute he found the fix. The fix is:
    Click on finder, Go, Home, Pictures, then click on iPod photo cache and drag it to trash. Now try syncing again. It worked on both of mine. No problems since.

  • The iPhone cannot be synced. The disk could not be read or written to.

    +The iPhone cannot be synced. The disk could not be read or written to.+
    That's the message I get when I sync my iPhone now after flawless syncing since the second day they came on sale. I restarted, I repaired permissions. The iPhone is only half full. I have tried a couple of different usb to iPhone chords. After trouble shooting I have found that if I don't sync iPhoto it syncs everything else just fine. I have deleted the iPhoto prefs. I have reinstalled iLife. I have reinstalled iTunes and deleted the iTunes prefs. I have gotten a brand new iPhone from the Apple store. I have backed up and deleted every photo in iPhoto and it still gets the error message.
    Starting to get frustrated.

    Unfortunately, I'm an Outlook junkie, and I need to sync my iPhone (1st Gen) with Outlook. I had no problems under XP. I even synced my device to Vista Business running out of Boot Camp and via Fusion.
    When I upgraded to Vista Ultimate and Office 2007 (freshly installed) my iPhone refused to sync anything but my Contacts, Calendar, and Bookmarks. It didn't matter whether I was running under Fusion or natively via Boot Camp -- I would get a variety of errors, but mostly "the disk could not be read or written to" wtih the occassional "unknown error" thrown in to make my life even more miserable.
    It would occasionally sync an audio or video file, but 99 times out of 100 it would die in the middle of the sync, trash something on the phone, and force me to restore it.
    Restoration, though, was not possible under Windows. I would try repeatedly to restore the phone from Vista, with no success. In fact, I tried to install the updated 2.0 firmware last week, which "bricked" the phone for about 4 hours. The only way that I could restore the device was under OS X. Naturally, the error returned the first time I tried to sync on Windows again.
    I was almost to the point of declaring the iPhone toasted, smashing the overpriced little trinket that's caused me so much agony into iPieces and then dropping it into an envelope and mailing it to Steve J. with a letter stating that a $600.00+ "revoltionary internet device" shouldn't croak 1 year after purchase.
    <RANT>
    I mean think about it -- getting bent over on pricing 2 months after purchase, Apple releasing a 3G version barely one year later (and for significantly lower price than the original) and having to sign a 2 year contract with the baby Satan that is AT&T isn't exactly what I would call a GOOD experience. Not to mention the activation fiasco, etc.
    </RANT>
    At any rate, all the Windows jokes aside, I believe I've finally solved my problem and it may help the others having this same problem on dual-core or hyperthreading processors.
    With iTunes running, go to the Task Manager, select the Processes tab and find the iTunes processes (AppleMobileDeviceHelper.exe, iTunes.exe, and iTunesHelper.exe). Right-click on each and select "Set Affinity..." from the context menu.
    In the "Processor Affinity" dialog, you should see both CPU 0 and CPU 1 checked, which is the default. UN-CHECK CPU 1, so that only CPU 0 is checked, then click "OK".
    You may need to retstart iTunes and/or the services, but I didn't need to do that (and technically, you shouldn't have to do that).
    Try your sync again. I'm syncing flawlessly again after that little tweak. Perhaps this is something odd about iTunes under Windows on multi-core or hyperthreading processors (read: race condition or something similar)?
    I'm keeping my fingers crossed that this will continue to work, otherwise I go the smash-and-mail-to-Steve route.

  • A significant portion of the database buffer cache has been written out to the system paging file.

    Hi,
    We seem to get this error through SCOM every couple of weeks.  It doesn't correlate with the AV updates, so I'm not sure what's eating up the memory.  The server has been patched to the latest roll up and service pack.  The mailbox servers
    have been provisioned sufficiently with more than enough memory.  Currently they just slow down until the databases activate on another mailbox server.
    A significant portion of the database buffer cache has been written out to the system paging file.
    Any ideas?

    I've seen this with properly sized servers with very little Exchange load running. It could be a  number of different things.  Here are some items to check:
    Confirm that the server hardware has the latest BIOS, drivers, firmware, etc
    Confirm that the Windows OS is running the recommended hotfixes.  Here is an older post that might still apply to you
    http://blogs.technet.com/b/dblanch/archive/2012/02/27/a-few-hotfixes-to-consider.aspx
    http://support.microsoft.com/kb/2699780/en-us
    Setup a perfmon to capture data from the server. Look for disk performance, excessive paging, CPU/Processor spikes, and more.  Use the PAL tool to collect and analyze the perf data -
    http://pal.codeplex.com/
    Include looking for other applications or processes that might be consuming system resources (AV, Backup, security, etc)
    Be sure that the disk are properly aligned -
    http://blogs.technet.com/b/mikelag/archive/2011/02/09/how-fragmentation-on-incorrectly-formatted-ntfs-volumes-affects-exchange.aspx
    Check that the network is properly configured for Exchange server.  You might be surprise how the network config can cause perf & scom alerts.
    Make sure that you did not (improperly) statically set msExchESEParamCacheSizeMax and msExchESEParamCacheSizeMin attributes in Active Directory -
    http://technet.microsoft.com/en-us/library/ee832793(v=exchg.141).aspx
    Be sure that hyperthreading is NOT enabled -
    http://technet.microsoft.com/en-us/library/dd346699(v=exchg.141).aspx#Hyper
    Check that there are no hardware issues on the server (RAM, CPU, etc).  You might need to run some vendor specific utilities/tools to validate.
    Proper paging file configuration should be considered for Exchange servers.  You can use the perfmon to see just how much paging is occurring.
    These will usually lead you in the right direction. Good Luck!

  • Force the loading of a class from disk

    Is it possible to force the loading of a class from disk ? The assumption here is that the class we want to load will be continuously updated so we want the latest version of the class(on disk) rather than the one already in memory.
    Thank you.

    You have to implement a custom loader.
    public class MyLoader extends URLClassLoader
      public (URL[] urls)
        super(urls);
      public synchronized loadClass(String className) throws ClassNotFoundException
        // first check built in JDK 1.2 class cache
        Class clazz = findLoadedClass(className);
        if (null == clazz)
          // Didn't find it in cache, so check our custom
          // URL[] classpath, added at the constructor.
          clazz = findClass(className);
          if (null == clazz)
            // Didn't find it in our classpath, so either
            // throw a ClassNotFoundException, or call to
            // the parent if we want to go that way.
            throw new ClassNotFoundException();
        return clazz;
    }In the above, you can do all sort of things. We don't delegate to the parent at all, so if the class being looked for is NOT in any of the URL[] objects passed in when created, then a ClassNotFoundException is thrown. The normal delegation checks cache, then the parent loader, then the findClass(). We simply remove the check to the parent, and try the findClass() right away. Because URLClassLoader implements findClass() to look for a .class in ALL of the URL[] objects passed to it, we don't need to bother with that at all.
    Does that help? Ask away if you have more questions.

  • When I update my nano ipod I get an error message "User ipod cannot be updated.  The disk couldnot be read from or written to."   How can I overcome this error message.

    In the iTunes window, when I update my nano ipod, I get an error message "User ipod cannot be updated.  The disk could not be read from or written to."   How can I overcome this error message.

    Hello there dilip77707,
    It sounds like you are getting this error message that your iPod cannot be read from or written to when you are trying to update your iPod Nano. I recommend the troubleshooting from the following article to help you get that resolved. Its pretty straight forward, just start at the top and work your way down as needed:
     'Disk cannot be read from or written to' when syncing iPod or 'Firmware update failure' error when updating or restoring iPod
    Thank you for using Apple Support Communities.
    All the very best,
    Sterling

  • "The disk could not be read from or written to"??

    When I try to sync my ipod it gives me following error message "Attempting to copy to the disk 'My Ipod' failed. The disk could not be read from or written to."
    Have not reset or restored it yet, wondering if there is anything I can do that doesn't involve me deleting all the songs on my ipod.
    5th Gen 80g Ipod, G5 Imac   Mac OS X (10.4.9)  

    See if this troubleshooting article helps.
    Disk cannot be read from or written to error syncing iPod in iTunes.

  • 9.1.1 sync problems: "The disk could not be read from or written to."

    Using OSX 10.6.3 and upgraded to iTunes 9.1.1. Once I did, I keep getting the following error message: "Attempting to copy to the disk [my ipod] failed. The disk could not be read from or written to." This is followed by another error message: "iTunes could not copy {name of file} to the iPod {iPod name} because the file could not be read or written."
    I tried deleting the files mentioned in the error message, but then the message returns with the name of a different file. At this rate, I'll be deleting all my files!
    I tried checking everything on the Knowledge Base article: http://support.apple.com/kb/HT1207
    I tried restoring my iPod (twice), but it didn't help.
    All my software is up to date. I haven't added any new software since I upgraded iTunes.
    NOW...when I try to sync my iPhone, I get the same error message.
    What's going on, and can anyone help?
    This is very annoying since I can't sync my iPhone which I need or my iPod which I would like.

    ArizonaDAK wrote:
    "iTunes could not copy {name of file} to the iPod {iPod name} because the file could not be read or written."
    check if you have read & write permissions for your iTunes music folder. in finder, right-click on it and +get info+. unlock the little padlock (you may have to enter your admin password) and change the permission settings. next, click on the little gear-shaped icon and +apply to enclosed items+ like so
    you may also give everyone read & write access. if this doesn't help, try the same on your iTunes folder (not just the iTunes music folder).
    if that make no difference, try reinstalling iTunes. click here and follow the instructions. next, download a fresh copy from here: http://www.apple.com/itunes/download/.
    you might also try to _*remove and reinstall the Apple Mobile Device Service*_
    JGG
    edited by the Jolly Green Giant (where Green stands for environmentally friendly)

  • Error when syncing iPod: The disk could not be read from or written to!!

    I have an iPod mini which worked fine on my Windows XP.
    Recently got Windows Vista and I downloaded iTunes and my put my music in the library.
    When I plugged my iPod into the Vista, it said it was syncing all the songs to my iPod.
    After about 3 hours, whilst syncing the last song a notice came up saying, 'Attempting to copy to the disk failed. The disk could not be read from or written to.'
    I restored my iPod and reinstalled iTunes but the same thing happend.
    I decided to plug my iPod back into the Windows XP, where I've had no problems. When I did this and started snycing all the songs, I got the notice come up again.
    'Attempting to copy to the disk failed. The disk could not be read from or written to.'
    I haven't been able to use my iPod now for about 5 weeks because I cannot solve the problem so any help will be much appreciated!
    Thanks

    You have posted in the Mac forum for problems & questions usting the iTunes store. You will probably find more help in the following forum.
    http://discussions.apple.com/forum.jspa?forumID=800

Maybe you are looking for

  • HT2693 Has anyone managed to download the March 2013 update of Numbers on an iPad 1?

    I recently tried to update Numbers but it says download not available at this time and has just hung there every since. Has anyone managed to update Numbers and can they help please

  • OBIEE 11.1.1.5 VirtualBox Image....

    Hi, I've downloaded the VirtualBox Image for OBIEE 11.1.1.5 - Sample Applications v107. I have Windows 7 64 bit in one partition and Windows Server 2008 Standard Edition in another partition. 1. Which OS is good for installing this VirtulalBox Image?

  • Help! iPhone being recognized as a different phone! HELP!

    There are 2 iPhone 4 's synced to our computer. Ever since we both updated to iOS 5 when I plug my phone in it asks to Import HIS phone's photos. In iTunes it shows MY phone however. But when I open up My Computer it shows his phone is the one plugge

  • Remplir un document word balisé

    Bonjour, Dans le cadre du développement d'un logiciel, je cherche à remplir un tableau dans un document word. Les cellules du tableau du document word sont repérés par des balises type <emplacement_1>, <emplacement_2> etc. Je cherche à construire un

  • Variant config - error Material ZZZ is not copied from the bill of material

    Hello guys, I try to obtain a material configurable in a new plant. I have more errors and I don't know exactly if the problems are in setting of the variant configuration, or if the problems are in customizing. When I try to make a Sale Document (St