Skip navigation.
Home
The QNX Community Portal

View topic - copy of disk from low capacity drive to high capacity

copy of disk from low capacity drive to high capacity

Discussion about the QNX6 OS.

copy of disk from low capacity drive to high capacity

Postby rashidmirza » Wed Apr 25, 2012 1:02 pm

We have a case where qnx exists on a drive capacity 500GB, and we copy the entire drive (using a raid 1 controller with 2 bays) to a 750GB disk. The copy works, but the extra 250 gb (roughly) is getting wasted on the new drive.
tried to repartition the drive to gain the 250 gb, but no success.
Is there something that can be done?
Or should the copy process be changed?
rashidmirza
Active Member
 
Posts: 55
Joined: Sun Jun 13, 2010 4:32 am

Re: copy of disk from low capacity drive to high capacity

Postby maschoen » Wed Apr 25, 2012 3:50 pm

"tried to repartition the drive to gain the 250 gb, but no success."

Not are all sure what you mean by this. Change the partition table? That's not going to work at all.

If you do an image copy from one drive to another, you get an identically sized partition, regardless of the new drive's size. The extra space is there, and you can create a 2nd partition to fill it up if you like.

If you want the new partition to be as large as the whole disk, you need a different procedure, a file by file copy.
maschoen
QNX Master
 
Posts: 2640
Joined: Wed Jun 25, 2003 5:18 pm

Re: copy of disk from low capacity drive to high capacity

Postby rashidmirza » Thu Apr 26, 2012 2:12 pm

"tried to repartition the drive to gain the 250 gb, but no success."

that means, i can see in a partition tool the 250 gb of space, but the tool can be used to resize the 750gb.

you mentioned a file by file copy, can you tell me whether you mean something as in the following link:

http://www.openqnx.com/phpbbforum/viewtopic.php?t=8474

i have tried the copy method here but it does not seem to work as it complains about 'file resides in different destination', dont remember the exact statement.

if not, how else can a file by file copy be initiated?

Also the step in the link mentioned above did not work :

fdisk /dev/hd1 add -b

and it complained saying that the start cylinder cannot be greater than the end cylinder..
rashidmirza
Active Member
 
Posts: 55
Joined: Sun Jun 13, 2010 4:32 am

Re: copy of disk from low capacity drive to high capacity

Postby maschoen » Thu Apr 26, 2012 4:13 pm

rashidmirza wrote:"tried to repartition the drive to gain the 250 gb, but no success."
that means, i can see in a partition tool the 250 gb of space, but the tool can be used to resize the 750gb.


What tool? fdisk? You could use it to increase the amount of space in the partition, but it will not increase the space available to the file system already there.

you mentioned a file by file copy, can you tell me whether you mean something as in the following link:
http://www.openqnx.com/phpbbforum/viewtopic.php?t=8474

Yes. The "copy" step is:
Copy everything else: cp -vpRNX / /hdnew
Note that the whole thing is a little tricky and you need a 2nd disk.

i have tried the copy method here but it does not seem to work as it complains about 'file resides in different destination', dont remember the exact statement.

You don't say what the statement nor which step it occurred in so I can't help you.

The article does describe how to do this fairly accurately. The only correction is the one I commented on, which is that you can't copy .bitmap and .inodes. If you are having trouble following the directions, let us know what you are doing and what the error messages is.

if not, how else can a file by file copy be initiated?

That's the procedure.

Also the step in the link mentioned above did not work :
fdisk /dev/hd1 add -b
and it complained saying that the start cylinder cannot be greater than the end cylinder..


This is the step that creates the new partition on the blank drive. Note the preceeding statement?

Here's the sequence, assuming that you have a blank hard drive showing up as /dev/hd1 and your source disk is mounted as /


I would check this as follows:
# ls /dev/hd1
You should see that /dev/hd1 is there.
# dcheck /dev/hd1
You should see dcheck start to check the disk. Disk sector numbers will appear. You can CTRL-BREAK this at any time.

You might also try manually fdisk'ing the drive as follows:
# fdisk /dev/hd1

You should see a view of the partition table. Below the table the program lists the last cylinder number.
maschoen
QNX Master
 
Posts: 2640
Joined: Wed Jun 25, 2003 5:18 pm

Re: copy of disk from low capacity drive to high capacity

Postby rashidmirza » Mon May 07, 2012 11:38 am

it work neatly, thx
rashidmirza
Active Member
 
Posts: 55
Joined: Sun Jun 13, 2010 4:32 am


Return to QNX6 - OS

Who is online

Users browsing this forum: Bing [Bot] and 2 guests