Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I have a OS X Lion Server hosting netboot images. I also have a 10.8 Server for creating 10.8 images, but am hosting all images from one 10.7 NetBoot server.

When a client machine boots a specific net boot image, my understanding is that it copies at least the most necessary parts of the image via network and stores it somehow on its local resources.

Does it only store the data in the RAM or does it save data locally?

Where is newly generated session data stored? On the Server or locally ?

share|improve this question
1  
What versions of Server? What OS is the client? How did you prepare the net boot image? Much depends on the options you chose when creating the image. –  bmike Apr 10 '13 at 17:15
    
Mac OS 10.7.5 server, Clients 10.7.5 and 10.8.3. I prepared the netboot image using the System image Utility. No specific options on creation. –  Dukeatcoding Apr 15 '13 at 11:22
    
I'll try to make an effort to answer, but the user generated data is stored in the user's home folder. You can control this on a per server basis, per user basis or per machine basis or a mix of any of the above. (also - I edited your question to incorporate the text, please review it as I'm not sure I yet understand your main intent here or what you do and don't get about NetBoot currently) –  bmike Apr 15 '13 at 12:32

2 Answers 2

When you NetBoot, the read-only NetBoot DMG file gets mounted read-write via the use of a Shadow File. Any Mac OS X DMG file can be mounted with a Shadow file. When a Shadow file is in use, any data which would be written to the DMG file is instead written to the Shadow file, and when data is read, the data will be read from the Shadow file first before the DMG file.

When NetBooting, there are three kinds of images, each with three different methods of mounting the DMG and storing the Shadow file:

  • NetInstall Images are made from a Mac OS X Insteller DVD. They have no Shadow file, the root partition / is read only and there is no swap.
  • NetBoot Images are made using System Image Utility from an installed Mac OS X system. the Shadow file is stored on the first hard disk in the hidden /private/netboot folder
  • Diskless Netboot Images are the same as NetBoot Images but the Shadow file is stored over the network using Apple File Protocol (AFP)

In the case of Diskless Netboot (The most powerful), the Shadow file is stored in the NetBootClients0 folder of the Library/NetBoot folder on the server machine (Or NetBootClients1, NetBootClients2, etc, where the number matches the number of theNetBootSP` folder in which the Net Boot DMG resides)

To make a NetBoot image a Diskless Netboot Image, use the "Make this image available for Ddiskless booting" checkbox under the image settings in Server.app:

Screenshot of image settings

You also need to have AFP File Sharing enabled, and you need a guest writable sharepoint for the NetBoot directory. (I do not recall if Server.app creates this automatically) Apple has a document about troubleshooting Diskless NetBoot which is helpful. AFP548 also has some great hints

When a client machine boots a specific net boot image, my understanding is that it copies at least the most necessary parts of the image via network and stores it somehow on its local resources

This is not technically correct. When you NetBoot, the Mac OS X Kernel mounts the root filesystem (/, the boot volume) over the network. So nothing is stored locally. When data needs to be read (E.G. an application is launched) it is read over the network, rather than from your hard drive. No data is copied from the server to the local machine.

When changes are made, for example, a new file is saved, then the Mac OS X kernel needs to write those changes somewhere, and that's where the Shadow file comes in. As described above the Shadow file might be on the first local hard drive, but it might also be stored over the network. If it is stored over the network, then the Mac OS X client can actually unmount the drives and do things like running Disk Utility. It can even have the hard drives completely removed.

share|improve this answer
    
I am very familiar with the NetBoot process, so if this doesn't fully answer your question, please feel free to ask me for more details! –  Josh Apr 15 '13 at 13:17
    
You are quite right /private/netboot on the machine where i am booting from contains 67 GB images, thats why booting is faster after the first ime i did the netboot ?!? –  Dukeatcoding Apr 15 '13 at 13:19
    
That could be why, yes. The second time it was reading from there. Note that those are Sparse Files, so some of the 67GB might be a continuous string of NULL bytes, indicating none of those blocks were actually changed in the file. I forget if HFS+ stores those files efficiently or not though. I think so. (So a 67GB file might only use 3GB of space) –  Josh Apr 15 '13 at 13:23
    
There are several images over the time beeing together 67 GB. at the moment i wonder about using HTTP or NFS , because 10.7 i served with NFS and 10.8 with HTTP (by accident) strange is that both are relatively slow ... gigabit network is not realy used –  Dukeatcoding Apr 15 '13 at 13:31
1  
I use NFS over a gigabit network (without Jumbo frames) and find the performance to be quite good. Part of the trick I found was getting the Netboot Image to a decent size. We put many applications on a separate AFP share, which made NetBooting faster and also makes it easier to update those apps without having to rebuild the entire NetBoot image. Also, make sure you create the image with System Image Utility. I have had issues with images created by hand being very slow. –  Josh Apr 15 '13 at 13:35

By default, the NetBoot image is a read-only asset, so each client downloads enough of the image to boot.

During boot, the OS Client makes a shadow file for local storage and changes.

Those changes can be re-used the next time that Mac boots from the network. If the shadow file gets deleted, the boot process will re-create it if needed.

This only will be of use for describing the initial boot assets and changes made to the core system. You will also want to think through how user changes are being mounted, stored, captured and backed up.

Netboot is great for troubleshooting and initial loading of an installer image. I've also seen it for loading a diagnostics suite or kiosk situations when you simply start up a single app where all the data on a server or cloud and no real data lies ever on the client (think museums or digital signage). I suppose a motivated team could engineer a total solution where all the Macs net boot, but it's usually better to let each Mac run it's own OS and have other methods to audit, control, re-image things when needed.

share|improve this answer
    
I am motivated and have engineered a system whereby everybody netboots. Their users are in open Directory and their home directories are stored on a fileserver, so that storage is persistent. But every reboot resets the system software and the installed applications (under /Applications) to the default. I find it cheaper and more reliable than other solutions for backup and re-imaging. –  Josh Apr 15 '13 at 13:06

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.