How to copy the partition contents from smaller disk to larger disk?

  • Follow


Dear all  , I have formatted/labeled/partitioned a new larger size
secondary disk on my solaris. Then i tried to copy the contents as tne
following: #dd if=/dev/dsk/c0t0d0s-i of=/dev/dsk/c0t1d0s-i where
i=0,1,...,7  At the end, the secondary disk was an exact replica and a
bootable one but surprisingly i saw that it is as the same partition
size as the primary disk, but it was of biggernsize at the start. So i
have firmatted/labeled/partitioned it again. Can you please let me
know how can i accomplish this procedure but without modifying the
target partition sizes? Thank you
0
Reply hadi 9/6/2010 3:42:54 AM

On 09/ 6/10 03:42 PM, hadi motamedi wrote:
> Dear all  , I have formatted/labeled/partitioned a new larger size
> secondary disk on my solaris. Then i tried to copy the contents as tne
> following: #dd if=/dev/dsk/c0t0d0s-i of=/dev/dsk/c0t1d0s-i where
> i=0,1,...,7  At the end, the secondary disk was an exact replica and a
> bootable one but surprisingly i saw that it is as the same partition
> size as the primary disk, but it was of biggernsize at the start. So i
> have firmatted/labeled/partitioned it again. Can you please let me
> know how can i accomplish this procedure but without modifying the
> target partition sizes? Thank you

Pipe ufsdump to ufsrestore, as described in the ufsrestore man page.

-- 
Ian Collins
0
Reply Ian 9/6/2010 3:45:55 AM


On Sep 6, 7:45=A0am, Ian Collins <ian-n...@hotmail.com> wrote:
> On 09/ 6/10 03:42 PM, hadi motamedi wrote:
>
> > Dear all =A0, I have formatted/labeled/partitioned a new larger size
> > secondary disk on my solaris. Then i tried to copy the contents as tne
> > following: #dd if=3D/dev/dsk/c0t0d0s-i of=3D/dev/dsk/c0t1d0s-i where
> > i=3D0,1,...,7 =A0At the end, the secondary disk was an exact replica an=
d a
> > bootable one but surprisingly i saw that it is as the same partition
> > size as the primary disk, but it was of biggernsize at the start. So i
> > have firmatted/labeled/partitioned it again. Can you please let me
> > know how can i accomplish this procedure but without modifying the
> > target partition sizes? Thank you
>
> Pipe ufsdump to ufsrestore, as described in the ufsrestore man page.
>
> --
> Ian Collins
I read the man page and i trued as 'ufsdump 0f - /dev/dsk/c0t0d0s0 l
ufsrestore -i /dev/dsk/c0t1d0s0 -' but it is not successful. Can you
please correct me?
0
Reply hadi 9/6/2010 5:14:11 AM

On 09/ 6/10 05:14 PM, hadi motamedi wrote:
> On Sep 6, 7:45 am, Ian Collins<ian-n...@hotmail.com>  wrote:
>> On 09/ 6/10 03:42 PM, hadi motamedi wrote:
>>
>>> Dear all  , I have formatted/labeled/partitioned a new larger size
>>> secondary disk on my solaris. Then i tried to copy the contents as tne
>>> following: #dd if=/dev/dsk/c0t0d0s-i of=/dev/dsk/c0t1d0s-i where
>>> i=0,1,...,7  At the end, the secondary disk was an exact replica and a
>>> bootable one but surprisingly i saw that it is as the same partition
>>> size as the primary disk, but it was of biggernsize at the start. So i
>>> have firmatted/labeled/partitioned it again. Can you please let me
>>> know how can i accomplish this procedure but without modifying the
>>> target partition sizes? Thank you
>>
>> Pipe ufsdump to ufsrestore, as described in the ufsrestore man page.
>>

*Please* stop quoting signatures!

> I read the man page and i trued as 'ufsdump 0f - /dev/dsk/c0t0d0s0 l
> ufsrestore -i /dev/dsk/c0t1d0s0 -' but it is not successful. Can you
> please correct me?

What's the 'l' doing in there?  Follow the example under the dump_file 
option.

-- 
Ian Collins
0
Reply Ian 9/6/2010 5:31:10 AM

On Sep 6, 9:31=A0am, Ian Collins <ian-n...@hotmail.com> wrote:
> On 09/ 6/10 05:14 PM, hadi motamedi wrote:
>
> > On Sep 6, 7:45 am, Ian Collins<ian-n...@hotmail.com> =A0wrote:
> >> On 09/ 6/10 03:42 PM, hadi motamedi wrote:
>
> >>> Dear all =A0, I have formatted/labeled/partitioned a new larger size
> >>> secondary disk on my solaris. Then i tried to copy the contents as tn=
e
> >>> following: #dd if=3D/dev/dsk/c0t0d0s-i of=3D/dev/dsk/c0t1d0s-i where
> >>> i=3D0,1,...,7 =A0At the end, the secondary disk was an exact replica =
and a
> >>> bootable one but surprisingly i saw that it is as the same partition
> >>> size as the primary disk, but it was of biggernsize at the start. So =
i
> >>> have firmatted/labeled/partitioned it again. Can you please let me
> >>> know how can i accomplish this procedure but without modifying the
> >>> target partition sizes? Thank you
>
> >> Pipe ufsdump to ufsrestore, as described in the ufsrestore man page.
>
> *Please* stop quoting signatures!
>
> > I read the man page and i trued as 'ufsdump 0f - /dev/dsk/c0t0d0s0 l
> > ufsrestore -i /dev/dsk/c0t1d0s0 -' but it is not successful. Can you
> > please correct me?
>
> What's the 'l' doing in there? =A0Follow the example under the dump_file
> option.
>
> --
> Ian Collins
Sorry for mistake in typing. That 'l' character was the pipe
character. I searched for the example you told me but there is just
one pipe example trying to restore to /home directory. Can you please
correct me on my issued command i sent you?
0
Reply hadi 9/6/2010 5:59:54 AM

On Sep 6, 9:31=A0am, Ian Collins <ian-n...@hotmail.com> wrote:
> On 09/ 6/10 05:14 PM, hadi motamedi wrote:
>
> > On Sep 6, 7:45 am, Ian Collins<ian-n...@hotmail.com> =A0wrote:
> >> On 09/ 6/10 03:42 PM, hadi motamedi wrote:
>
> >>> Dear all =A0, I have formatted/labeled/partitioned a new larger size
> >>> secondary disk on my solaris. Then i tried to copy the contents as tn=
e
> >>> following: #dd if=3D/dev/dsk/c0t0d0s-i of=3D/dev/dsk/c0t1d0s-i where
> >>> i=3D0,1,...,7 =A0At the end, the secondary disk was an exact replica =
and a
> >>> bootable one but surprisingly i saw that it is as the same partition
> >>> size as the primary disk, but it was of biggernsize at the start. So =
i
> >>> have firmatted/labeled/partitioned it again. Can you please let me
> >>> know how can i accomplish this procedure but without modifying the
> >>> target partition sizes? Thank you
>
> >> Pipe ufsdump to ufsrestore, as described in the ufsrestore man page.
>
> *Please* stop quoting signatures!
>
> > I read the man page and i trued as 'ufsdump 0f - /dev/dsk/c0t0d0s0 l
> > ufsrestore -i /dev/dsk/c0t1d0s0 -' but it is not successful. Can you
> > please correct me?
>
> What's the 'l' doing in there? =A0Follow the example under the dump_file
> option.
>
> --
> Ian Collins
The example shows it as 'ufsdump 0f - /dev/rdsk/c0t0d0s0 l cd /
home;ufsrestore xf -' so it seems that the target disk partition must
be first mounted . If this is the case, so how we can do it
withrespect to the larger partition sizes on the target disk?
0
Reply hadi 9/6/2010 8:56:47 AM

hadi motamedi wrote:
> On Sep 6, 7:45 am, Ian Collins <ian-n...@hotmail.com> wrote:
>> On 09/ 6/10 03:42 PM, hadi motamedi wrote:
>>
>>> Dear all  , I have formatted/labeled/partitioned a new larger size
>>> secondary disk on my solaris. Then i tried to copy the contents as tne
>>> following: #dd if=/dev/dsk/c0t0d0s-i of=/dev/dsk/c0t1d0s-i where
>>> i=0,1,...,7  At the end, the secondary disk was an exact replica and a
>>> bootable one but surprisingly i saw that it is as the same partition
>>> size as the primary disk, but it was of biggernsize at the start. So i
>>> have firmatted/labeled/partitioned it again. Can you please let me
>>> know how can i accomplish this procedure but without modifying the
>>> target partition sizes? Thank you
>> Pipe ufsdump to ufsrestore, as described in the ufsrestore man page.
>>
>> --
>> Ian Collins
> I read the man page and i trued as 'ufsdump 0f - /dev/dsk/c0t0d0s0 l
> ufsrestore -i /dev/dsk/c0t1d0s0 -' but it is not successful. Can you
> please correct me?


Please post the FULL and EXACT text of the commands you entered and the 
resulting output, if any.
0
Reply Richard 9/6/2010 1:58:16 PM

> The example shows it as 'ufsdump 0f - /dev/rdsk/c0t0d0s0 l cd /
> home;ufsrestore xf -' so it seems that the target disk partition must
> be first mounted . If this is the case, so how we can do it
> withrespect to the larger partition sizes on the target disk?

You're right - the target partition must be mounted first.  Mount the
new larger (empty) root file system on some arbitrary mount point,
like "/mnt", then run your command:

   # ufsdump 0f - /dev/rdsk/c0t0d0s0 l cd /mnt ; ufsrestore rf -

Now that the root file system has been transferred to the new disk,
the other necessary mount points exist under "/mnt".  Mount the other
empty slices under subdirectories of "/mnt" and repeat ufsdump/
ufsrestore for each file system.  Run "installboot" and update /etc/
vfstab on the new disk (still mounted on /mnt) to reflect the new
devices before trying to boot from the new disk.
0
Reply ITguy 9/6/2010 6:18:15 PM

ITguy <southallc@gmail.com> wrote:
>> The example shows it as 'ufsdump 0f - /dev/rdsk/c0t0d0s0 l cd /
>> home;ufsrestore xf -' so it seems that the target disk partition must
>> be first mounted . If this is the case, so how we can do it
>> withrespect to the larger partition sizes on the target disk?
> 
> You're right - the target partition must be mounted first.  Mount the
> new larger (empty) root file system on some arbitrary mount point,
> like "/mnt", then run your command:
> 
>    # ufsdump 0f - /dev/rdsk/c0t0d0s0 l cd /mnt ; ufsrestore rf -

This should be:
 ufsdump 0f - /dev/rdsk/c0t0d0s0 | (cd /mnt ; ufsrestore xf -)
[x or r will both work, but the '|' and '(..)' are important!]

-- 

 Hans Werner Strube    strube(@)physik3(.)gwdg(.)de
 Drittes Physikalisches Institut,  Univ. Goettingen
 Friedrich-Hund-Platz 1,  37077 Goettingen, Germany
0
Reply me 9/9/2010 3:13:28 PM

8 Replies
401 Views

(page loaded in 0.609 seconds)

Similiar Articles:












7/21/2012 9:55:21 PM


Reply: