Jump to content

Expand 2nd Partition On Bigger Cloned HDD


WalksInSilence

Recommended Posts

As a secondary HDD I installed a WD 160GB alongside the SSD (Win 7 64bit Primary) and Seagate 1TB main storage HDD.

The 160GB HDD has a full Windows XP 32bit OS installation on the first partition (Drive X 40GB) mirroring my old XP laptop and set up for manual dual boot.  The whole of the rest of the 160GB HDD, 120GB was partitioned as Drive Y and mainly used for data backup of the XP drive and a later installed XP VM on the SSD. Everything NTFS as you would expect.

I've been running out of space on the Y drive so as I have a spare WD 320GB in an external USB housing I decided to clone the WD 160GB to that using EaseUS cloning tools. All went well, all appears good and I thought it would just be a simple matter to expand the Y drive to make use of the roughly 150GB unallocated space on the new 320GB HDD.

Apparently not.

Windows Disk Management > Storage tools only allow shrinking of the existing Y drive and whether I leave the 150GB new space unallocated or formatted as a Simple Volume to NTFS I don't appear to be able to expand/merge the extra empty space with the existing Y drive. I get warning message that it will mess up any boot sector on that partition. There isn't, the XP OS installation is on the X partition but that still had me worried.

However when I proceeded there was an error message saying the Windows tools do not support this action or words to that effect.

The 'obvious' solutions are either just to create a third partition on the 320GB HDD or delete the whole Y drive partition and cloned content so I get one big unallocated space (120GB + 150GB). That can be formatted as one new partition and then it would be a simple matter of copying the files from the the original 160GB HDD Y drive partition to that.

But I'd like to know if there a correct way of expanding/merging the Y drive partition to make use of the extra empty 150GB unallocated space or a recommended tool that can do this without messing up the existing data on the Y drive?

 

 

Edited by WalksInSilence
Link to comment
Share on other sites


What you report is "strange",

The issue may be that your "second partition" is NOT a partition but rather a logical volume inside extended.

If I recall correctly the built in disk management/diskpart has provisions to extend primary partitions/voumes, but not the extended partition (that contains the logical volume).

Check the content of the MBR, you can use *any* suitable tool showing its contents, if you don't have any handy, simplest would be to get MBRscan:

https://www.raymond.cc/blog/5-free-tools-to-backup-and-restore-master-boot-record-mbr/2/

https://tools.security-x.fr/

Scan
Report

and you attach the MBRscan.log to your next post.

If this is the case, it is possible to manually "convert" the logical volume to primary (if you are game for it).

jaclaz 

 

 

Link to comment
Share on other sites

Thanks: interesting thoughts. I've checked using Windows Disk Management and indeed the Y drive is shown as a Logical Volume.

I'm on another PC at present so I'll have to check later the original, still installed 160GB HDD Y partition, to see what that is reported as being.

Would the cloning/method (sector by sector) used for the 320GB have created this problem or the original partitioning of the 160GB HDD?

As I recall I installed the WinXP OS on that previously virgin 160GB HDD and then later, once the PC was up and running with its primary Win7 64bit OS and using that I then re-partitioned it.

I shrank the WinXP OS partition which occupied the whole HDD, back to 40GB and that became the X drive. It is the same size as my old XP laptop HDD and more than enough free space as the data/docs etc were all going to be and are kept on 100GB+ remainder which was partitioned as the Y drive.

Was there something wrong doing it like that?

The only explanation I came up with as to why I might not be getting an Expand option for the Y drive, despite the available unallocated space, is that the 320GB HDD is still in its USB external housing used for the cloning. I've not installed it in the PC as I want to sort out the partitioning space first. Could this be affecting the partitioning options available ie. because it is on an USB external drive?          

Link to comment
Share on other sites

I don't think that the USB connection is involved, but it may.

If this is confirmed, it depends of course on the original partitioning on the 160GB HDD.

It is pretty much binary, either something is a clone, or it isn't.

Long discussion on the term "clone" (vs. "image", "backup", etc.:

If you made a sector by sector copy, it is a clone, i,e. an exact copy.

The "normal" way to partition disks was (historically) to have:
1 primary partition
1 extended partition with inside it *any number* of logical volumes

because that was what DOS Fdisk would only allow.

Later systems allowed the creation of more than 1 primary partition, but - generically speaking - the 1 primary + 1 extended is still very common, as there are only 4 slots in the MBR partition table, it means either max 4 primaries or max 3 primaries+1 extended (with as many volumes as needed in it).

What I recommend you, should you have created the extended partition in Windows 7, is to NOT use ANYMORE the Windows XP disk manager on that disk, as even an unrelated change done through it may corrupt the extended partition (actually the volumes inside it), JFYI:

http://reboot.pro/topic/9897-vistawin7-versus-xp-partitioning-issue/

"lost" volumes due to this bug can be recovered manually, should this happen, but while doable there is not a magic tool that does the recovery automatically. 

jaclaz

 

Link to comment
Share on other sites

I tried to make that clear - at no time did I use WinXP to partition the HDD after the initial OS install. The later partitioning to X and Y were all done using Win7 64bit Windows Disk Management tools.

Here's the current situation:-

1. Original 160GB HDD still currently installed.

screenshot.1.png.ecc35193e4854e0b2bc4713bdddc3033.png

2. Sector by sector clone on the 320GB HDD currently in external housing. S and T rather than X and Y.

screenshot.2.png.8ad2f7d98170b8b4b35ea41806e24012.png

3. Right clicking on the T drive I do get the Expand option but with this message:-

screenshot.3.png.64448042bb9ac41d1995dcf54d6d625a.png

4. If I click 'Yes' I then get this:-

screenshot.4.png.fb17ed502c68bd8cc4c4418a5b637b4c.png

I'll try another partitioning tool if you think that will sort out the problem but I'm coming round to the opinion it will be easier just to wipe T, reformat the entire unallocated space to NTFS then copy the Y drive content to it rather than use a cloning program.

 

 

Link to comment
Share on other sites

Well, if you want, I can tell you how to fix the issue without having to move/copy delete anything.

Basically all is needed is to "transform" the currently only volume inside extended into a primary partition.

It can be done manually with *any* hex/disk editor (suggested is Tiny Hexer) or (still manually but easier, calculations are automatic) via grub4dos.

Still, I would like to see the log/report I asked you for before anything else.

jaclaz 

Link to comment
Share on other sites

Sorry but I'm not understanding the significance of the MBR? That, I thought, only applies to physical disks with an OS not other partitions. The WinXP OS on X is largely an irrelevance now.

I've not booted it for at least a 18 months because it is a pain to do so. No working SATA Controller Driver so I have to use the BIOS to swap to legacy IDE then reboot, select the XP boot partition. Then do the reverse to get Win7 back again also incidentally losing any Win7 restore points in the process too.

I now use Win7 XPMode on a VM instead if I need to run some legacy software - far simpler and less hassle. The fact is most of the time you can get Win7 to run it anyway so I've made much less use of even the XPVM than I thought I would.

The issue is entirely the Y drive - there are no XP system files on it ie. I didn't move My Documents to it or anything like that. It is just attached storage on another partition on the same HDD. Win7, WinXP and the XPVM can all access it but primarily it is used for XP/XPVM specifically related docs/data. For instance I have a full copy of my old XP laptop's content minus the Windows OS stuff of course.

Triredacus said:-

Quote

Will changing the disk to Dynamic cause XP to stop being able to be booted from it?

That was what I was worried about and maybe why I get that second message because I am using the Win7 'parent' OS not the XP one on that X partition. From what it says I assumed, as I was just selecting the Y partition volume, it wouldn't affect the XP OS installation.

This is where the differences between, disks, volumes and partitions has me confused. I thought with the XP OS on X it was isolated on a self-contained volume just as if it was on another HDD. Maybe I'm wrong about that.   

Edited by WalksInSilence
Link to comment
Share on other sites

Think of them as containers. Disk Management kind of displays it in a containery way, but is quite compact. Also can think of it as boxes within boxes.

Disk is the outer layer.

Partitions go inside of disks.

Volumes go inside of partitions.

So a volume cannot be larger than the partition it is inside of, and a partition cannot be larger than the disk. Due to Disk Management's UI, you may be trying to extend the wrong thing, ie: trying to extend the volume instead of the partition.

One thing I cannot tell from your screenshot is if your disk is 2 partitions with a volume inside of each, or 1 partition with 2 volumes inside of it.

Link to comment
Share on other sites

The MBR contains (besides BIOS boot code) a "structure" called partition table.

Partition addresses are written to it.

There are 4 "slots" or "entries" possible in it.

Primary partitions addresses are written there "directly".

Extended partition address (type 0x05 or 0x0F) point to another sector, the EMBR that still has 4 slots but of which only 2 are ever used:
#0 the address of the first logical volume inside extended
#1 the address of the next (E)MBR

Any partition (primary or extended) on any disk have addresses in the MBR, which is thus ALWAYS relevant, no matter if system or data only physical drive or partition.

Now, OS up to XP aligned partitions to cylinder/head (in practice multiples of 255*63) and there is a 63 sectors offset between EMBR and logical volumes.
OS Vista and later aligned partitions to MB (2048 sectors) and there is the same 2048 sectors offset between EMBR and logical volumes.

IF this latter is in use, Disk Management in XP may corrupt the EMBR's.

It is your disk and your data, but before giving advice, I would like to know exactly the current situation.

50 minutes ago, Tripredacus said:

One thing I cannot tell from your screenshot is if your disk is 2 partitions with a volume inside of each, or 1 partition with 2 volumes inside of it.

JFYI, volumes are "colour coded":
dark blue = volume inside primary
light blue = volume inside extended

black = unused space

And the green border is around the extended partition.

In the default view of Disk Manager (which "scales" the graphic proportionally to the sizes) it is sometimes difficult to see if there is unused space past the last logical volume (but still inside the extended) there is the alternate view in Disk Manager (under View->Settings) that allows to have each "item" be the same size (besides allowing changing the default colours).

jaclaz

Edited by jaclaz
Link to comment
Share on other sites

I've decided to use one of the more obvious solutions mentioned: delete the 320GB clone HDD 'Y' partition and convert the whole of the, now unallocated, free space to a simple volume and copy the contents from the Y partition of the original 160GB HDD.

Whilst I don't like not understanding it and how to fix whatever the problem was either with the way it was cloned or the original partitioning I was hoping it would be relatively easy. I just want the new 320GB HDD to behave like the old one. It seems to me at this point it makes more sense to go for a simple solution which I can't think of any reason why it won't work instead of trying to fix some sort of formatting the problem.

In deleting the Y(T) partition on the 320GB clone it did report as an extended partition (green bordering in Windows Disc Management). I then deleted the extended partition so all the remaining space on the HDD became unallocated. Even as I write this that is being formatted to NTFS as a Simple volume.

Thanks for the help offered; some very useful advice too. 

Link to comment
Share on other sites

Again:

1) it is due to the original partitioning, the cloning is "innocent"
2) it can be (could have been) easily fixed

7 hours ago, WalksInSilence said:

Whilst I don't like not understanding it

I tried explaining the basics, if you had questions you could have asked them :dubbio:.

Anyway:
1) the entry in the MBR is for the extents of the extended partition
2) normally the simplest way out would be to enlarge the extents of the extended partition (leaving the volume inside it as is) and later expand the volume
3) BUT in a dual-boot with XP and Windows 7 having a logical volume inside extended is not safe
4) hence it is advised to convert the logical volume to primary, since you don't need/want to ue any other MBR slot
5) this consists essentially in copying 16 bytes from the EMBR to the MBR, change the 4 byte Start LBA value adding the offset to the EMBR and (optionally) correct the "sectors before" in the PBR

jaclaz

Link to comment
Share on other sites

It isn't a dual boot set up in the usual way. Each OS was separately installed to their respective HDDs by which I mean entirely separately. The other OS's boot drive was physically disconnected during the install so in effect I had two separate PCs in one case. Win7 set as primary on a SSD and manually selecting the WinXP boot drive on the 160GB HDD (F12) when wanted.

That was the theory at least; I had read that this method of setting up a dual boot might solve the issue of WinXP deleting Win7 Restore Points, It didn't.

It also didn't work out quite as neatly as I hoped either due to the lack of a working XP SATA Controller driver as previously mentioned.

Anyway thanks again for the advice and explanation provided even if some of it, (5) ^ in particular stretches by understanding of the problem beyond breaking point. :)

 

Link to comment
Share on other sites

Let's see if I can use one of my (in)famous book comparison.

There is a book of - say - 100 pages total, on which first page (page at offset 0) there is an index, like this:

Quote

INDEX
Chapter 1 page1-89
Index of appendices page 90

if you go to page 90 you find a page:

Quote

INDEX of Appendices
Appendix A page I-IX

So you have:
 

Quote

1 page for the index
89 pages for the main content
1 page for the separate index
9 pages for the content of the appendix

total 100 pages,

Now, this exact same book could be instead be made as follows, on 1st page (page at offset 0):

Quote

INDEX
Chapter 1 page1-89
Appendix A page 91-99

if you go to page 90 you find a page:
 

Quote

(this page intentionally left blank) 

It is clear that the contents, in both cases, is in the same place, i.e. Chapter 1 on pages 1-89 and Appendix A on pages 91-99, the only difference is that they are indexed differently.

Now, this same book printed by Microsoft Press :w00t: in 2005 would be:
 

Quote

INDEX
Blank pages (for note taking) page 1-62
Chapter 1 page 63-152
Index of appendices page 153

and on page 153:
 

Quote

INDEX of Appendixes
Blank pages (for note taking) page I-LXII
Appendix A page LXIII-LXXI

which can as well be re-indexed as:
 

Quote

INDEX
Blank pages (for note taking) page 1-62
Chapter 1 page 63-152
Blank pages (for note taking) page 153-215
Appendix A page 216-224

(BTW in the second edition, pubished in 2007, Microsoft Press would insert 2047 Blank pages instead of 62)

Hope this clears a bit more the matter. :)

jaclaz

Edited by jaclaz
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...