Big ntfs partitions throws exception "large Bitmap" when formatting

Mar 5, 2010 at 9:35 AM

Hey,

this code will throw the exception "large Bitmap" when used:

            try
            {
                using (DiscUtils.VirtualDisk vd = DiscUtils.VirtualDisk.CreateDisk("VHD", "DYNAMIC", @"C:\new.vhd", (long)512 * 1024 * 1024 * 1024, null, new Dictionary<string, string>()))
                {
                    DiscUtils.Partitions.BiosPartitionTable bpt = DiscUtils.Partitions.BiosPartitionTable.Initialize(vd);
                    int i = bpt.Create(DiscUtils.Partitions.WellKnownPartitionType.WindowsNtfs, true);
                    DiscUtils.VolumeManager vm = new DiscUtils.VolumeManager(vd);
                    DiscUtils.Ntfs.NtfsFileSystem fs = DiscUtils.Ntfs.NtfsFileSystem.Format(vm.GetLogicalVolumes()[i], "Volume");
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message + "\r\n" + ex.StackTrace, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }

Ciao Ephraim

Mar 5, 2010 at 11:08 AM

The limit is 320 GB. Anything greater than 320 GB (so 321GB) the exception will be thrown ...

Ciao Ephraim

Coordinator
Mar 5, 2010 at 11:19 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.