To partition or not to Partition

Hi,
I have a few questions regarding partitioning. What I would like to do is create 3 partitions... one for my iLife media (music, photos etc), one as a scratch disk for Final Cut studio and for miscellaneous data.
1. Are there any performance losses when partitioning large volume drives?
2. I already have data on the drive... if i partition it now with the data on it will i lose it?
3. can i non destructively alter the size of the partitions or delete some if necessary without without losing data?

Reelsick,
All of the following assumes that this is a secondary/external drive; there are additional considerations for boot drives....
1) No, not really.
2) No, conditionally (I'll get to it).
3) Yes, again conditionally.
In Leopard, we can dynamically partition a "live" drive, without necessarily destroying data, and we can dynamically resize partitions that already exist. If you have a drive with a single 1 TB volume, and you are only using 500 GBs of that drive (just an arbitrary example), and the free space available exists all at the end of the drive, that one volume can be reduced in size in order to make room for a second (or third, etc.) volume. If, on the other hand, you initially copied almost 1 TBs of data to the drive, in the order of file1, file2, file3, etc., but then subsequently deleted the earlier files, your "free space" will be fragmented, and not exist near the end of the drive. Volumes can only be reduced in size from the point closest to the end of the drive, toward the start of the drive. Unless your free space exists in this area of reduction, Disk Utility might either refuse to perform the reduction, or worse, fail in the attempt. All this said, I have found this function of Disk Utility to be quite robust, and easy to use.
You can delete a partition at will, but the data within that partition is consequently "wiped." It does not automatically get combined with another partition. In this way, though, one can delete a partition, in order to enlarge another. Just like the reduction of a volume, however, one can only enlarge a volume in one direction: Toward the end of the drive.
So, if you have three volumes, "A," "B," and "C," in that order on the drive, volume C can be deleted in order to enlarge B. B or B&C can be deleted in order to enlarge A. C, however, can only be enlarged by first destroying it, then reducing B, then re-creating C. In all of this, any volume that is enlarged or reduced in place (without deletion) retains its data.
Scott

Similar Messages

  • My Mavericks Partition Will Not Boot due to "Incorrect Number of Thread Records", But Windows 7 On Same Drive Does

    I got up from my chair at the office to make myself coffee and came back to find my computer powered down. "That's weird," I said,  "I don't remember turning the computer off." I pressed the power button and the loading bar appeared below he apple symbol (as it should do on a bad shutdown) but alas, when the bar got to the end, there was a loading ring, and the computer immediately shut down.
    I then held down the alt key and was able to boot up in my Bootcamp Windows 7 partition (on the same hard drive) but I am unable to do a few things with my OS X Mavericks partition
    First off I have the entire partition backed up, as I was able to access all of the files and the drive using my windows partition (drive appeared in "my computer" I was able to copy paste everything just fine). Secondly when I boot in the Recovery HD, the "Macintosh HD" partition appears unmounted, I can't erase it because disk utility says that the disk could not be opened. When I try to verify it, it says that the drive needs to be repaired, but when I repair it, disk utility tells me "Error: Disk utility can't repair this disk...disk, and restore your backed-up files."
    tldr; I cannot erase the disk, I cannot repair the disk using disk utility in the Recovery HD, but I can see the disk in windows running on the same drive... so at least I have that going for me.
    I tried starting up in verbose mode and it failed after 3 tries, I attempted to use the method described here http://african-heart.blogspot.com/2010/07/fixing-invalid-node-structure-in-mac.h tml?m=1 . I have run the method 6 times and nothing has worked. Ideally I'd like to wipe the "Macintosh HD" partition and start again, but I cannot seem to do that through disk utility
    are there any methods for fixing the partition/wiping the partition that I am missing?

    The same thing is happening to me. I had just click on a form submit button and suddenly the video went dizzy for an very little instant, almost couldn't see it, the screen went black and a message warning the system crash appeared. After that, the system rebooted with a progress bar under the spinning circle and it turns my Mac off when it is fulfilled.
    Trying the native Apple hardware test right now to see if it can identify any problem.
    I'll post any news here in at most one hour, after the test finishes.

  • Thunderbolt partitioned and formatted hard drive not recognized on USB2/3

    I have a MBA (mid 2012) and recently purchased a Seagate Desktop Thunderbolt Adapter (STAE129), a Seagate Backup Plus 4TB USB 3.0 external drive (STCA4000100), and Apple Thunderbolt cable. The 4TB hard drive can be separated from the USB 3.0 adapter and the drive placed on the Thunderbolt adapter. I created two partitions (3TB and 1 TB) on the 4TB drive while it was mounted on the Thunderbolt adapter and formatted them Mac OS Extended (Journaled) using partition map scheme GPT. Everything works as expected, the drive hits r/w speeds in the 180 MB/s range (using Blackmagic Disk Speed Test), and no issues at all transferring data to the 3TB partition and using the 1TB partition for TimeMachine.
    However, if I disconnect the hard drive from the Thunderbolt adapter and place it on the USB 3.0 adapter and connect it to my MBA, Mountain Lion says "The disk you inserted was not readable by this computer and gives me the options to Initialize, Ignore, or Eject. Going into Disk Utility app, the drive shows up without the partitions I created when the same drive was mounted to the Thunderbolt adapter (just shows disk1s1). In fact, the drive label (Disk Description) is different too and the Partition Map Scheme now shows MBR!
    To try work-arounds, I went ahead and repeated the partitioning and formatting steps with the drive attached via USB 3.0 and all works fine until I put the drive back on the Thunderbolt adapter where once again OSX reports that the disk is not readable. I've even tried a single partition with no luck. In short, the drive partitioned and formatted on Thunderbolt is unrecognized under USB and vice versa.
    Shouldn't the disk preparation and data be consistent across these different interfaces? I would think so. My biggest concern is that if I had a failure in the Thunderbolt setup (assuming the drive itself does not fail), then I can't access my data. This is not a very comfortable situation.
    I'm assuming I've overlooked a very basic detail. Appreciate any steer to solve this problem.
    Thanks,
    Rob

    Thanks for that, I recently ran into the same problem. I even chatted with Seagate tech support and they didn't know the answer.
    My situation is a bit different from you. I bought the 3 TB Thunderbolt version of the drive directly and then purchased a USB 3 adaptor seperately.  You see, I still own a 3 year old Macbook Pro that doesn't come with a Thunderbolt port. I was looking to upgade to a MacBook Air later.  I thought that I might as well buy the TB version now.
    In anycase, my old MacBook Pro won't see the drive when I use the USB3 adaptor. I get the same exact error message as you did. I can't really test it on Thunderbolt since I don't have one.  I'm going to go install the Thunderbolt drivers now and hopefully, it will recognize the drive afterwards.  I'll let you know what happens.
    BTW, I was thinking of reformatting the drive with NTFS so that I can use the drive on PCs. My mac has the NTFS drivers loaded so it's no problem. I hope this won't screw up the Thunderbolt connection later when I do get the Macbook Air?

  • External hard drive will not partition correctly

    This is a somewhat long post, but the point is this: I have a new 1TB Fantom GreenDrive (attached via USB) which I cannot partition the way that I want to. I want to allocate 300G for a Time Machine backup partition and the remainder as a partition for everything else. For some reason, I'm only able to partition the drive so that it has two equal-size partitions. While this isn't terrible (the 300G figure was somewhat arbitrary), I'm curious to see if anyone knows what's going on here. As part of my tale, I list three "mysteries" that have really stumped me.
    For at least a year now, I've had two external USB drives attached to my machine through a hub. One (a Fantom Titanium-II 500G drive) was for Time Machine, and the other (a LaCie 150G drive) was for other files. These drives were almost always connected to my machine, and they were almost always powered on. About three weeks ago, the Time Machine drive started unmounting, seemingly randomly, from the computer. When I tried to verify it in Disk Utility, it gave me an error, and the drive would again unmount. At the same time, I started having problems with the LaCie drive - when I plugged it in, the Mac gave me a message saying that the drive wasn't working properly and that I had to back up everything on it.
    This all seemed too coincidental to me, and so is the first mystery of my saga. However, I saw the GreenDrive on sale and decided to pick one up, rather than trying to fix the two drives. When I connected the GreenDrive to the computer, it was formatted at NTSF. When I tried to format it as Mac OS Extended (Journaled), Disk Utility gave me an error.
    If I booted the Mac into Windows, I could format the drive again as NTSF, and it would work fine. When I went back into the Mac side, it worked there, too (that is, I could read from it and write to it). Also, I could use Disk Utility to format the drive as MS-DOS (FAT). Of course, I needed to format the drive for the Mac so that it would work for Time Machine.
    When I went into the Time Machine preference pane and selected the GreenDrive for Backup (which was still formatted as MS-DOS (FAT) at the time), and did the erasing from within Time Machine, I was able to get the drive formatted as one large Mac OS formatted partition. Why I was able to successfully format it from Time Machine, but not from Disk Utility (which I believe is what Time Machine uses for the erasing, anyway) is the second mystery.
    So, now I had a 1TB hard drive set up a single partition. I still wanted to divide it in two. However, when I tried using Disk Utility to partition it the way I wanted, I got an error saying the partition failed. Just as a test, I tried partitioning as two equal-size partitions, and this worked. Why it would let me partition in this configuration, and not the way I wanted, is the third and final mystery.
    In the end, I'm almost where I want to be. I had to spend a little bit of money, but I have more total storage space available, and it seems to be working fine. Also, I was able to format the LaCie drive, and it seems to be working well, so it wasn't a total loss. Still, any answers you guys can provide would be greatly appreciated.
    <Edited by Moderator>

    Be sure your drive is initially partitioned into one single volume. Then format the volume for Mac OS Extended. Once that's done re-partition the drive into two volumes (if that's what you desire) then resize them as you want. How you do the resizing may be important. Usually the larger volume is the first or top volume. Select it by clicking on its rectangle in the sizing gadget. Then in the Size field enter the size you want. That should result in the first volume being resized to what you want and the second volume automatically resizes accordingly.
    Here's how I suggest doing it:
    Extended Hard Drive Preparation
    1. Open Disk Utility in your Utilities folder. If you need to reformat your startup volume, then you must boot from your OS X Installer Disc. After the installer loads select your language and click on the Continue button. When the menu bar appears select Disk Utility from the Installer menu (Utilities menu for Tiger or Leopard.)
    2. After DU loads select your hard drive (this is the entry with the mfgr.'s ID and size) from the left side list. Note the SMART status of the drive in DU's status area. If it does not say "Verified" then the drive is failing or has failed and will need replacing. SMART info will not be reported on external drives. Otherwise, click on the Partition tab in the DU main window.
    3. Set the number of partitions from the drop down menu (use 1 partition unless you wish to make more.) Set the format type to Mac OS Extended (Journaled.) Click on the Options button, set the partition scheme to GUID (only required for Intel Macs) then click on the OK button. Click on the Partition button and wait until the process has completed.
    4. Select the volume you just created (this is the sub-entry under the drive entry) from the left side list. Click on the Erase tab in the DU main window.
    5. Set the format type to Mac OS Extended (Journaled.) Click on the Options button, check the button for Zero Data and click on OK to return to the Erase window.
    6. Click on the Erase button. The format process can take up to several hours depending upon the drive size.

  • Logical drive partition not showing in Mac OS.

    Hi all,
    I'm rather new to mac OS and am hoping someone could help me out with this problem.
    I've a windows partition (C:) running Vista Ultimate. In it, I had created 'logical drive' which contains a FAT32 (D:)and a NTFS (E:)partition. I'm thinking of using this 'D:' drive to share data between vista and Mac OS. However, when I boot up into Mac OS, both d: and e: drives are not showing (c: showing thought). I went into Terminal and use the 'diskutil list' command, it doesn't show me my D: and E: partition.
    Can anyone help?
    Thanks,
    Simon

    MacDrive7 allows 32-bit Windows to access r/w to HFS+.
    There is a Google kit for NTFS.
    I had terrible performance and luck with Paragon Software's NTFS for Mac OS X 6.0 ($30) and would not recommend it.
    If you are willing to start over, clone your Vista. Maybe WinClone or Norton Ghost.
    Reformat your internal drive with Disk Utility after backing up (Apple Disk Utility Restore).
    Don't use BootCamp and create Vista NTFS, FAT32 and Mac OS X. Don't install or restore OS X until AFTER you have Vista installed.
    BootCamp only allows for a 2nd partition and I'm not a fan of its methods and limitations.

  • Logical Volume Group and Logical Partition not matching up in free space

    I was dual booting Windows 7 and Mountain Lion. Through Disk Utility, I removed the Windows 7 Partition and expanded the HFS+ partition to encompass the entire hard drive. However, the Logical Volume Group does not think that I have that extra free space. The main problem is that I cannot resize my partition. I am wanting to dual boot Ubuntu with this. Any ideas? Any help is appreciated. I will post some screenshots with the details. Furthermore, here are some terminal commands I ran: /dev/disk0
    #: TYPE NAME SIZE IDENTIFIER
    0: GUID_partition_scheme *250.1 GB disk0
    1: EFI 209.7 MB disk0s1
    2: Apple_CoreStorage 249.2 GB disk0s2
    3: Apple_Boot Recovery HD 650.0 MB disk0s3
    /dev/disk1
    #: TYPE NAME SIZE IDENTIFIER
    0: Apple_HFS MAC OS X *248.9 GB disk1 Filesystem 1024-blocks Used Available Capacity iused ifree %iused Mounted on
    /dev/disk1 243031288 153028624 89746664 64% 38321154 22436666 63% /
    devfs 189 189 0 100% 655 0 100% /dev
    map -hosts 0 0 0 100% 0 0 100% /net
    map auto_home 0 0 0 100% 0 0 100% /home CoreStorage logical volume groups (1 found)
    |
    +-- Logical Volume Group 52A4D825-B134-4C33-AC8B-39A02BA30522
    =========================================================
    Name: MAC OS X
    Size: 249199587328 B (249.2 GB)
    Free Space: 16777216 B (16.8 MB)
    |
    +-< Physical Volume 6D7A0A36-1D86-4A30-8EB5-755D375369D9
    | ----------------------------------------------------
    | Index: 0
    | Disk: disk0s2
    | Status: Online
    | Size: 249199587328 B (249.2 GB)
    |
    +-> Logical Volume Family FDC4568F-4E25-46AB-885A-CBA6287309B6
    Encryption Status: Unlocked
    Encryption Type: None
    Conversion Status: Converting
    Conversion Direction: backward
    Has Encrypted Extents: Yes
    Fully Secure: No
    Passphrase Required: No
    |
    +-> Logical Volume BB2662B7-58F3-401C-B889-F264D79E68B4
    Disk: disk1
    Status: Online
    Size (Total): 248864038912 B (248.9 GB)
    Size (Converted): 130367356928 B (130.4 GB)
    Revertible: Yes (unlock and decryption required)
    LV Name: MAC OS X
    Volume Name: MAC OS X
    Content Hint: Apple_HFS

    Here is another try via the command line:
    dhcp-10-201-238-248:~ KyleWLawrence$ diskutil coreStorage resizeVolume BB2662B7-58F3-401C-B889-F264D79E68B4 210g
    Started CoreStorage operation
    Checking file system
    Performing live verification
    Checking Journaled HFS Plus volume
    Checking extents overflow file
    Checking catalog file
    Incorrect block count for file 2012.12.11.asl
    (It should be 390 instead of 195)
    Checking multi-linked files
    Checking catalog hierarchy
    Checking extended attributes file
    Checking volume bitmap
    Checking volume information
    Invalid volume free block count
    (It should be 21713521 instead of 21713716)
    The volume MAC OS X was found corrupt and needs to be repaired
    Error: -69845: File system verify or repair failed

  • Mac OS 10.4 can not recognize Mac OS 10.6 disc partitions

    Hi,
    I am in a big problem, I already post it Western DIgital Comunity forum but I still not get a good answer from the forum or from WD support.
    http://community.wdc.com/t5/Other-Internal-Drives/WD7500BPKT-is-not-recognized-b y-MacOs-10-4/td-p/266338
    Western DIgital state that 10.4 disk utility is compatible with the Advance Format and will format the disc.
    I get a Wester DIgital WD7500BPK to make a triple boot disc on my MacBook Pro (MacOS 10.4, MAcOS 10.6 and other Linux distro).
    MacBookPro2,2
    Intel Core 2 Duo  2.16 GHz
    WDC WD7500BPKT-00PK4T0 
    Revision: 01.01A01
    I sucessufull partition the disc with 10.6 and install SL but after booting from MacOS 10.4 original DVD, Disk Utility can´t see correctly the partitions created by MacOS 10.6
    I already try to make just one partition with macos 10.6 and boot and try partition the disk with MacOS 10.4 but the disk utility is detecting a disc with 5.5.TB and it´s capacity is 750 Gb.
    If I try to partions I get a input/output error.
    I also try to boot from a MacOs 10.4.8 from a external drive and I get the same issue with Disk Utility.
    Terminal diskutil give me the partitions that you can see in the image.
    I will apreciate if anybody can give me some tips to partition this disc and be correctly recognized by MacOS 10.4 Disk Utility.
    Thanks in advance,

    Hi, BDAqua,
    I was trying with 10.4.10 and this version still didn´t recognize the disc but after updating to MacOS 10.4.11 the system start to recognize correctly the disc.
    I have to say that from MacOS 10.4 till 10.4.10 the disc was not correcty recognize.
    In other words it was not possible to install directly from the system DVDs, unfortunatly the soluion will envolve other disc.
    We need to install system and update till MacOS 10.4.11 in an external disc and then use CCC (Carbon Copy Cloner) to clone the system into the internal disc.
    I hope that this post will help other´s with the same issue.
    Thanks for your tip but now I am getting Airport issues with this version but that´s other story....

  • One of my partition is not mounted. I can't mount it, can't repair it. I have a lot of data in this partition. I can't erase it, how can I do now? pls help me.

    one of my partition is not mounted. I can't mount it, can't repair it. I have a lot of data in this partition, I can't erase it. Please help me.

    No way around this. Your phone has to be restored using a computer running iTunes. Make an appointment at an Apple Store to have your device examined by a technician. Or contact Apple Support.

  • Not able to create More than 1 Partition in USB Drive using kernel32 and DeviceIoControl

    I have successfully created 2 or more partitions in USB drive using DeviceIoControl in C++. Now I am trying to convert this code into C# using kernel32 and DeviceIoControl. But I am not getting more than 1 partition. Can anybody tell me what is wrong
    with this code?
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    using System.Diagnostics;
    using System.Runtime.InteropServices;
    namespace PartitionWrapper
    public class IOWrapper
    public static bool CreatePartitions(string selectedDrive)
    bool RetCode = false;
    try
    bool bSuccess = false;
    uint dwBytesReturned = 0;
    IntPtr hDisk = OpenVolume(selectedDrive);
    if (hDisk == null || hDisk == FSConstants.INVALID_HANDLE_VALUE)
    RetCode = false;
    goto FINAL;
    bSuccess = FSStructures.DeviceIoControl(hDisk, FSConstants.IOCTL_DISK_DELETE_DRIVE_LAYOUT, IntPtr.Zero, 0, default(IntPtr), default(uint), ref dwBytesReturned);
    // Get the partition information
    uint PartitionInfomations = (uint)(Marshal.SizeOf(typeof(FSStructures.DRIVE_LAYOUT_INFORMATION_EX)) + 3 * Marshal.SizeOf(typeof(FSStructures.PARTITION_INFORMATION_EX)));
    byte[] DBuffer = new byte[PartitionInfomations];
    GCHandle handle = GCHandle.Alloc(DBuffer, GCHandleType.Pinned);
    FSStructures.DRIVE_LAYOUT_INFORMATION_EX pDriveLayout = (FSStructures.DRIVE_LAYOUT_INFORMATION_EX)Marshal.PtrToStructure(handle.AddrOfPinnedObject(), typeof(FSStructures.DRIVE_LAYOUT_INFORMATION_EX));
    IntPtr pDriveLayoutPtr = Marshal.AllocHGlobal(Marshal.SizeOf(pDriveLayout));
    Marshal.StructureToPtr(pDriveLayout, pDriveLayoutPtr, false);
    // bSuccess = FSStructures.DeviceIoControl(hDisk, FSConstants.IOCTL_DISK_GET_DRIVE_LAYOUT_EX, default(IntPtr), default(uint), pDriveLayoutPtr, PartitionInfomations, ref dwBytesReturned);
    pDriveLayout = (FSStructures.DRIVE_LAYOUT_INFORMATION_EX)Marshal.PtrToStructure(pDriveLayoutPtr, typeof(FSStructures.DRIVE_LAYOUT_INFORMATION_EX));
    if (bSuccess || dwBytesReturned != PartitionInfomations)
    RetCode = true;
    else { RetCode = false; goto FINAL; }
    pDriveLayout.PartitionEntry = new FSStructures.PARTITION_INFORMATION_EX[0x16];
    pDriveLayout.PartitionStyle = FSStructures.PARTITION_STYLE.MasterBootRecord;
    pDriveLayout.PartitionCount = 4;
    pDriveLayout.DriveLayoutInformatiton.Mbr.Signature = 0xA4B57300;
    pDriveLayout.PartitionEntry[0] = new FSStructures.PARTITION_INFORMATION_EX();
    pDriveLayout.PartitionEntry[0].PartitionStyle = FSStructures.PARTITION_STYLE.MasterBootRecord;
    pDriveLayout.PartitionEntry[0].Mbr.BootIndicator = true;
    pDriveLayout.PartitionEntry[0].Mbr.RecognizedPartition = true;
    pDriveLayout.PartitionEntry[0].Mbr.PartitionType = 0x0B;
    pDriveLayout.PartitionEntry[0].PartitionNumber = 1;
    pDriveLayout.PartitionEntry[0].StartingOffset = 32256;
    pDriveLayout.PartitionEntry[0].PartitionLength = 3221225472;
    pDriveLayout.PartitionEntry[0].RewritePartition = true;
    pDriveLayout.PartitionEntry[0].Mbr.HiddenSectors = 32256 / 512;
    pDriveLayout.PartitionEntry[1] = new FSStructures.PARTITION_INFORMATION_EX();
    pDriveLayout.PartitionEntry[1].PartitionStyle = FSStructures.PARTITION_STYLE.MasterBootRecord;
    pDriveLayout.PartitionEntry[1].Mbr.BootIndicator = false;
    pDriveLayout.PartitionEntry[1].Mbr.RecognizedPartition = true;
    pDriveLayout.PartitionEntry[1].Mbr.PartitionType = 0x0B;
    pDriveLayout.PartitionEntry[1].PartitionNumber = 2;
    pDriveLayout.PartitionEntry[1].StartingOffset = 32256 + 3221225472;
    pDriveLayout.PartitionEntry[1].PartitionLength = 2147483648; //2147483648;//3221225472;
    pDriveLayout.PartitionEntry[1].RewritePartition = true;
    pDriveLayout.PartitionEntry[1].Mbr.HiddenSectors = 32256 / 512;
    for (int i = 0; i < pDriveLayout.PartitionEntry.Length; i++)
    pDriveLayout.PartitionEntry[i].RewritePartition = true;
    try
    bSuccess = FSStructures.DeviceIoControl(hDisk, FSConstants.IOCTL_DISK_SET_DRIVE_LAYOUT_EX, ref pDriveLayout, PartitionInfomations, default(IntPtr), default(uint), ref dwBytesReturned);
    catch (Exception ex)
    if (bSuccess)
    RetCode = true;
    else { RetCode = false; }
    bSuccess = FSStructures.DeviceIoControl(hDisk, FSConstants.IOCTL_DISK_UPDATE_PROPERTIES, IntPtr.Zero, 0, default(IntPtr), default(uint), ref dwBytesReturned);
    if (bSuccess)
    RetCode = true;
    else { RetCode = false; }
    FINAL:
    // Close the disk handle.
    if (hDisk != null && hDisk != FSConstants.INVALID_HANDLE_VALUE)
    FSStructures.CloseHandle(hDisk);
    catch { return false; }
    return RetCode;
    private static IntPtr OpenVolume(string DeviceName)
    try
    IntPtr hDevice;
    hDevice = FSStructures.CreateFile(
    @"\\.\" + DeviceName,
    FSConstants.GENERIC_EXECUTE | FSConstants.GENERIC_READ | FSConstants.GENERIC_WRITE | FSConstants.FILE_SHARE_READ | FSConstants.FILE_SHARE_WRITE,
    FSConstants.FILE_SHARE_WRITE,
    IntPtr.Zero,
    FSConstants.OPEN_EXISTING,
    0,
    IntPtr.Zero);
    if ((int)hDevice == -1)
    throw new Exception(Marshal.GetLastWin32Error().ToString());
    return hDevice;
    catch { return FSConstants.INVALID_HANDLE_VALUE; }
    internal static class FSConstants
    public const uint FILE_SHARE_READ = 0x00000001;
    public const uint FILE_SHARE_WRITE = 0x00000002;
    public const uint OPEN_EXISTING = 3;
    public const int GENERIC_EXECUTE = 0x10000000;
    public const uint GENERIC_READ = (0x80000000);
    public const uint GENERIC_WRITE = (0x40000000);
    public static IntPtr INVALID_HANDLE_VALUE = new IntPtr(-1);
    public const uint IOCTL_DISK_GET_DRIVE_LAYOUT_EX = 0x00070050;
    public const uint IOCTL_DISK_SET_DRIVE_LAYOUT_EX = 0x7C054;
    public const int IOCTL_DISK_UPDATE_PROPERTIES = 0x70140;
    public const int IOCTL_DISK_DELETE_DRIVE_LAYOUT = 0x0007c010;
    public const int IOCTL_DISK_CREATE_DISK = 0x7C058;
    internal static class FSStructures
    [DllImport("kernel32.dll", EntryPoint = "CreateFile", SetLastError = true)]
    public static extern IntPtr CreateFile(
    string lpFileName,
    uint dwDesiredAccess,
    uint dwShareMode,
    IntPtr lpSecurityAttributes,
    uint dwCreationDisposition,
    uint dwFlagsAndAttributes,
    IntPtr hTemplateFile);
    [DllImport("kernel32.dll", SetLastError = true)]
    public static extern int CloseHandle(IntPtr hObject);
    [DllImport("kernel32.dll", SetLastError = true)]
    public static extern bool DeviceIoControl(
    IntPtr hDevice,
    uint dwIoControlCode,
    [Optional]ref DRIVE_LAYOUT_INFORMATION_EX lpInBuffer,
    uint nInBufferSize,
    [Optional] [Out] IntPtr lpOutBuffer,
    uint nOutBufferSize,
    [Optional] ref uint lpBytesReturned,
    [Optional] IntPtr lpOverlapped);
    [DllImport("kernel32.dll", SetLastError = true)]
    public static extern bool DeviceIoControl(
    IntPtr hDevice,
    uint dwIoControlCode,
    IntPtr lpInBuffer,
    uint nInBufferSize,
    [Optional] [Out] IntPtr lpOutBuffer,
    uint nOutBufferSize,
    [Optional] ref uint lpBytesReturned,
    [Optional] IntPtr lpOverlapped);
    [StructLayout(LayoutKind.Sequential)]
    public struct DRIVE_LAYOUT_INFORMATION_EX
    public PARTITION_STYLE PartitionStyle;
    public int PartitionCount;
    public DRIVE_LAYOUT_INFORMATION_UNION DriveLayoutInformatiton;
    [MarshalAs(UnmanagedType.ByValArray, ArraySubType = UnmanagedType.Struct, SizeConst = 0x16)]
    public PARTITION_INFORMATION_EX[] PartitionEntry;
    [StructLayout(LayoutKind.Sequential)]
    public struct PARTITION_INFORMATION_EX
    [MarshalAs(UnmanagedType.U4)]
    public PARTITION_STYLE PartitionStyle;
    public long StartingOffset;
    public long PartitionLength;
    public int PartitionNumber;
    public bool RewritePartition;
    public PARTITION_INFORMATION_MBR Mbr;
    public PARTITION_INFORMATION_GPT Gpt;
    [StructLayout(LayoutKind.Sequential)]
    public struct PARTITION_INFORMATION_MBR
    public byte PartitionType;
    [MarshalAs(UnmanagedType.U1)]
    public bool BootIndicator;
    [MarshalAs(UnmanagedType.U1)]
    public bool RecognizedPartition;
    public uint HiddenSectors;
    [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
    public struct PARTITION_INFORMATION_GPT
    public Guid PartitionType;
    public Guid PartitionId;
    [MarshalAs(UnmanagedType.U8)]
    public EFIPartitionAttributes Attributes;
    [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 36)]
    public string Name;
    [Flags]
    public enum EFIPartitionAttributes : ulong
    GPT_ATTRIBUTE_PLATFORM_REQUIRED = 0x0000000000000001,
    LegacyBIOSBootable = 0x0000000000000004,
    GPT_BASIC_DATA_ATTRIBUTE_NO_DRIVE_LETTER = 0x8000000000000000,
    GPT_BASIC_DATA_ATTRIBUTE_HIDDEN = 0x4000000000000000,
    GPT_BASIC_DATA_ATTRIBUTE_SHADOW_COPY = 0x2000000000000000,
    GPT_BASIC_DATA_ATTRIBUTE_READ_ONLY = 0x1000000000000000
    [StructLayout(LayoutKind.Explicit)]
    public struct DRIVE_LAYOUT_INFORMATION_UNION
    [FieldOffset(0)]
    public DRIVE_LAYOUT_INFORMATION_MBR Mbr;
    [FieldOffset(0)]
    public DRIVE_LAYOUT_INFORMATION_GPT Gpt;
    [StructLayout(LayoutKind.Sequential)]
    public struct DRIVE_LAYOUT_INFORMATION_GPT
    public Guid DiskId;
    public long StartingUsableOffset;
    public long UsableLength;
    public int MaxPartitionCount;
    [StructLayout(LayoutKind.Sequential)]
    public struct DRIVE_LAYOUT_INFORMATION_MBR
    public uint Signature;
    public enum PARTITION_STYLE : int
    MasterBootRecord = 0,
    GuidPartitionTable = 1,
    Raw = 2

    Hello,
    in the links below you can found many informations to help you:
    https://msdn.microsoft.com/en-us/library/windows/desktop/aa365730(v=vs.85).aspx
    http://www.codeproject.com/Articles/696388/Recover-Data-From-Corrupted-Drives-File-Systems-FA
    http://www.functionx.com/vcsharp/fileprocessing/drives.htm
    http://forums.codeguru.com/showthread.php?548305-partitioning-USB-Falsh-drive
    http://forums.codeguru.com/showthread.php?548169-USB-Flash-drive-Partitioning

  • Does not find partition

    I have 10.7 Lion and all my apps just stopped working (including finder). I tryed to hit the restart button, but it didnt shut down, so I used the Power Button.
    When i started it up again, it goes to Mac OS X Utilities and does not find Macintosh HD. (The partition on my hard drive)
    And i really does not want to reinstall it, because I have iOS apps in XCode that im developing.
    MacBook Pro 13´ 2010 Model (Dont remember what month)
    OS X 10.7 Lion
    Crashed after debugging iOS app on my iPhone

    It just says that my partition is OK . (And its not, because I cant start up my mac)
    But, ill try just wipe out all data and restore it from a Time Machine backup

  • Insert statement does not insert all records from a partitioned table

    Hi
    I need to insert records in to a table from a partitioned table.I set up a job and to my surprise i found that the insert statement is not inserting all the records on the partitioned table.
    for example when i am using select statement on to a partitioned table
    it gives me 400 records but when i insert it gives me only 100 records.
    can anyone help in this matter.

    INSERT INTO TABLENAME(COLUMNS)
    (SELECT *
    FROM SCHEMA1.TABLENAME1
    JOIN SCHEMA2.TABLENAME2a
    ON CONDITION
    JOIN SCHEMA2.TABLENAME2 b
    ON CONDITION AND CONDITION
    WHERE CONDITION
    AND CONDITION
    AND CONDITION
    AND CONDITION
    AND (CONDITION
    HAVING SUM(COLUMN) > 0
    GROUP BY COLUMNS

  • Bootcamp files do not show up in mac partition.

    Hi, my question is about retrieving files from bootcamp while I am on the mac partition.  I used to be able to see a disk icon for my bootcamp on my desktop when I was on my mac partition, but ever since I installed Yosemite, I have not been able to see it on my desktop, or as one of the drives in my finder.  From this icon, I was able to access files created in Bootcamp.  I no longer can see this icon on my mac's desktop.  I have no problem opening bootcamp when I press alt on startup, so bootcamp is not broken, but I would like to be able to access those files while I am in Yosemite again.  Any ideas?
    Thank in advance,
    dk

    Install Lightroom CC 2015 via your Adobe Creative Cloud app.

  • My USB hub driver is not installing on my macbook pro windows 7 partition ?

    hey there, my USB hub driver is not installing on my macbook pro windows 7 partition .. any clue?

    yes am talking about windows 7 on my mac pro ... i did the following troubleshooting steps but no use and still the device is not recognized.
           - i changed the usb port .
           - i changed the hub it self .
         - i seaarched online for the driver automatically
            - i searched online for the driver manually ie. hardware id ..
             - i checked the connections,,
    anything else should i do ??

  • When booting into my previously working Windows partition, the screen is not displaying anything. It was working before...

    Im not sure what happened but I just tried to bootinto my Windows partition and the screen is completely blank. I dont see the Windows boot logo and I eventually here the startup noise. I have also been able to logon without seeeing the screen.
    Ive done a PRAM and SMC reset and neither has helped. I suspect that a recent update on OS X may have caused video issues but I am not sure of it. All of my research has led me to a black screen during the install of Windows onto the bootcamp partition. Nothing delaing with an actual running Windows partition that just goes to black.
    Any suggestions?

    There is more than enough disk space available on the partition.
    Booting from the install CD doesnt work because I cannot seeing anything.
    Removed my install of Windows 7 via bootcamp and tried to reinstall but I got the same black screen (no backlight as usual).
    BTW, OS X does affect the Windows install. If you update the driver for the say the video card, that means that the apple drivers that are needed to run Windows are more than likely to be affected.
    Just like VMware tool running on a ESXi 4.1 host will need to be reinstalled on an ESXi 5.0 host. Same hardware but the tools on the VM need to be updated to reflect the host OS.

  • Boot camp does not give me the option to make a partition, instead it just gives me the options to download windows support software, install windows 7, etc. I do not want any of these, I want to set aside the space on my hard drive!

    Hello, I wish to install Linux Ubuntu on my macbook pro by using boot camp to set aside space. Whenever I load the Boot Camp Assistant application out of the utilities folder in applications, it only gives me the options to download windows support software and install windows 7. I do not want this, I just want to be able to slide that little bar to set aside the space on my hard drive that i can use for Linux. I tried just downloading the windows support software but my internet is immensely slow and it has been an hour or so since it started and it's not even half way done. When this download is finished will i get the option to partition or will i just be faced with those same options?
    I am on a 13" macbook pro, with apple OS X snow leopard version 10.7.2
    A lot of the data on this macbook was transferred over from my old macbook i had.
    Any ideas on how to fix this problem?
    Thank you for reading.

    Well thank you for your honesty.  Apple requires you have to have a Mac to develop iPhone apps, ergo my foray into OS-Xland. No way around it that one except for running OSX in a VM, which would have probably saved me some quid, true enough.
    BUT for those interested parties: VirtualBox has a startup script in /Library/StartupItems/VirtualBox that will prevent OSX from fully booting on the initial (and required) rEFIt boot cycle. Once I temporarily moved that out of the StartupItems rEFIt went in as expected.
    FYI, the openSUSE desktop running native is a little peppier than OSX native which was a nice surprise.  Now if the Mac just had more open source software we would have a deal. (:

  • I am installing Windows 7 on my macbook pro OSX Mountain Lion and I get an error message:" Your disk could not be partitioned." What does this mean?

    I am installing Windows 7 and I get an error message: "Your disk could not be partitioned. An error ocurred while partitioning the disk". I was using a Windows & Home Premium OEM Software that I purchased from Microsoft. I was given to Windows 100GB to use for Quickbooks pro, Payroll and Publisher. I have the Macbook Pro model No: MD102LL/A. Does anyone knows what happenned or can advice me in what to do? Please help!!!

    amarilysfl wrote:
    "Your disk could not be partitioned. An error occurred while partitioning the disk".
    https://www.apple.com/support/bootcamp/
    If you were using Apple's BootCamp and received this message, quit it and open Disk Uility in your Applicaitons/Utilities folder.
    Select the Macintosh HD partition on the left and select Erase and Erase Free Space > Zero option and let it complete (important) this will check the spare space for bad sectors that can cause issues formatting partitions.
    Once it's completed, try creating a partiton again in BootCamp.
    If that doesn't work, then hold command option r keys down while connected to a fast internet connection, Internet Recovery should load (spinning globe) and then in that Disk Utility, select your entire internal drive and click > First Aid > Repair Disk and Permissions.
    reboot and attempt Bootcamp again.
    If you still get a error, it might be that you have OS X data on the bottom area where BootCamp partition needs to go. This would occur if you had the drive or computer for a long time or wrote a large amount of files to the drive and nearly filling it up and then reduced some, but it left traces in the area BootCamp needs to go.
    To fix this
    BootCamp: "This disc can not be partitioned/impossible to move files."
    How to safely defrag a Mac's hard drive

Maybe you are looking for

  • FBL3N & FBL1N combination report

    We downloading data from FBL3N (GL line items) & FBL1N (Vendor line items). We then merge these two reports and based on the data of FBL3N (cost center/ order), we manually get Department, Location, Region & Order type. This entire exercise for every

  • Windows XP-Pro will not install on my new P965 Platinum

    I hope someone can help me with my problem. It seems that everytime i try to install Windows XP-Pro after the initial drivers setup i get this Error Message: A problem has been detected and windows has been shut down to prevent damage to your compute

  • Unbalanced body tag error

    I am trying to save a html document as a template but am receiving an unbalanced body tag message. I appear to have both an opening <body> and closing </body> tag and no further body tags. Could you please help? The code is below: <!DOCTYPE HTML> <ht

  • Mail's "Messages on Server" in "Account Info"  not working

    Since upgrading to Maverick, it has become extremely tedious to manage my Pop server accounts via Mail's Account Info, Messages on Server function.  In the first place, none of the sorting tabs work--the messages are sorted by size only and will not

  • What's best approach to handle - Sales and Delivery on account without INV

    Hello Experts, How to handle this situation in SAP B1 8.8 or 8.81 pleasse. 1. Customer walks in to the counter for sale on account. 2. He/She receives the item from inventory and is given a Delivery or sometiype of confirmation printout without price