[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: dd command can't get the same uuid



Am Montag, 6. August 2012 schrieb Bob Proulx:
> Fnzh Xx wrote:
> > root@debian:/home/tiger# dd  if=/dev/sda  of=/dev/sdb  bs=10240k
> > 11447+1 records in
> > 11447+1 records out
> > 120034123776 bytes (120 GB) copied, 4729.59 s, 25.4 MB/s
> > root@debian:/home/tiger# blkid
> > ...
> > why /dev/sda6 uuid don't equal /dev/sdb6 uuid?
> 
> I expect the kernel cached the previous value.  I expect you would
> need to trigger the kernel to re-probe the partitions again.  Not
> sure but seems reasonable.  (shrug)
> 
>   # apt-get install parted
> Then:
>   # partprobe
> Or:
>   # partprobe /dev/sdX
> 
> The 'blkid' command also has a cache too.  It might be necessary to
> flush it or tell it 'blkid -c /dev/null' to avoid it.  See the man
> page for details.

An alternative to partprobe would be:

blockdev --rereadpt /dev/sdb

Ciao,
-- 
Martin 'Helios' Steigerwald - http://www.Lichtvoll.de
GPG: 03B0 0D6C 0040 0710 4AFA  B82F 991B EAAC A599 84C7


Reply to: