Tonight I have to boot a diskless server with iLO and dd a remote image available by ssh
onto a usb key. As there is no local place to store the image, whats the most efficient
cmd to push the image from the remote server using ssh into the local pipe pushing out
to `dd of=/dev/sdx`?
Would a remote execution of `dd if=/dev/sdx` be the best over ssh? I suppose I could use
nc and do away with ssh, is that in the CentOS rescue mode?
Thanks,
jlc
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
07-23-2010, 11:29 PM
Ross Walker
ssh and dd
On Jul 23, 2010, at 6:27 PM, "Joseph L. Casale" <jcasale@activenetwerx.com> wrote:
> Tonight I have to boot a diskless server with iLO and dd a remote image available by ssh
> onto a usb key. As there is no local place to store the image, whats the most efficient
> cmd to push the image from the remote server using ssh into the local pipe pushing out
> to `dd of=/dev/sdx`?
>
> Would a remote execution of `dd if=/dev/sdx` be the best over ssh? I suppose I could use
> nc and do away with ssh, is that in the CentOS rescue mode?
How about remote cpio?
-Ross
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
07-24-2010, 01:32 AM
Jim Wildman
ssh and dd
YOu can ssh to it and mount an iso from a web server as well.
On Fri, 23 Jul 2010, Ross Walker wrote:
> On Jul 23, 2010, at 6:27 PM, "Joseph L. Casale" <jcasale@activenetwerx.com> wrote:
>
>> Tonight I have to boot a diskless server with iLO and dd a remote image available by ssh
>> onto a usb key. As there is no local place to store the image, whats the most efficient
>> cmd to push the image from the remote server using ssh into the local pipe pushing out
>> to `dd of=/dev/sdx`?
>>
>> Would a remote execution of `dd if=/dev/sdx` be the best over ssh? I suppose I could use
>> nc and do away with ssh, is that in the CentOS rescue mode?
>
> How about remote cpio?
>
> -Ross
>
> _______________________________________________
> CentOS mailing list
> CentOS@centos.org
> http://lists.centos.org/mailman/listinfo/centos
>
----------------------------------------------------------------------
Jim Wildman, CISSP, RHCE jim@rossberry.com http://www.rossberry.com
"Society in every state is a blessing, but Government, even in its best
state, is a necessary evil; in its worst state, an intolerable one."
Thomas Paine
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
07-24-2010, 01:34 AM
Les Mikesell
ssh and dd
Joseph L. Casale wrote:
> Tonight I have to boot a diskless server with iLO and dd a remote image available by ssh
> onto a usb key. As there is no local place to store the image, whats the most efficient
> cmd to push the image from the remote server using ssh into the local pipe pushing out
> to `dd of=/dev/sdx`?
>
> Would a remote execution of `dd if=/dev/sdx` be the best over ssh? I suppose I could use
> nc and do away with ssh, is that in the CentOS rescue mode?
>
dd over ssh should be a sure thing. If you do a lot of image copies remote or
otherwise you might want to try clonezilla-live. It knows enough about most
file systems to only copy the used blocks and can access the image store with
smb, nfs, or ssh.
--
Les Mikesell
lesmikesell@gmail.com
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
07-24-2010, 02:38 AM
"Joseph L. Casale"
ssh and dd
>dd over ssh should be a sure thing. If you do a lot of image copies remote or
>otherwise you might want to try clonezilla-live. It knows enough about most
>file systems to only copy the used blocks and can access the image store with
>smb, nfs, or ssh.
Yeah not lots, just an esxi update...
I'll look into cpio now, its backing up as we speak.
Thanks guys!
jlc
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
07-25-2010, 04:50 PM
Gordon Messmer
ssh and dd
On 07/23/2010 04:29 PM, Ross Walker wrote:
>
> How about remote cpio?
cpio requires rsh/ssh to reach a remote system, and would be a poor
choice for copying an image to a block device.
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
07-25-2010, 10:26 PM
Ross Walker
ssh and dd
On Jul 25, 2010, at 12:50 PM, Gordon Messmer <yinyang@eburg.com> wrote:
> On 07/23/2010 04:29 PM, Ross Walker wrote:
>>
>> How about remote cpio?
>
> cpio requires rsh/ssh to reach a remote system, and would be a poor
> choice for copying an image to a block device.
Better then dd over ssh, but clonezilla would be a better choice overall I think if it can read/write from a pipe, even better if it can resume from a broken pipe.
-Ross
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
07-26-2010, 07:54 PM
Gordon Messmer
ssh and dd
On 07/25/2010 03:26 PM, Ross Walker wrote:
>
> Better then dd over ssh,
Well, no... If you're trying to do an *image*, you'll find that cpio
can't write an image out to a block device.
It's fairly easy to make dd as bandwidth efficient as clonezilla.
1: Clear all of the unused blocks on the local filesystem which you want
to image:
# dd if=/dev/zero of=/mnt/zero
# rm /mnt/zero
2: Copy your filesystem to a file:
# umount /mnt
# dd if=/dev/sdb1 of=/var/tmp/fs.img
3: Compress your filesystem image:
# bzip2 /var/tmp/fs.img
4: Copy the image to the remote system:
# ssh root@remote 'bzip2 -dc | dd of=/dev/sda1' < /var/tmp/fs.img.bz2
Can't get much better than that for low-volume copies. If you need to
repeat the process on a lot of machines, clonezilla gives you some nice
options. If you're copying files instead of images, cpio might be useful.
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
07-27-2010, 09:15 AM
John Doe
ssh and dd
From: Gordon Messmer <yinyang@eburg.com>
> Well, no... If you're trying to do an *image*, you'll find that cpio
> can't write an image out to a block device.
> It's fairly easy to make dd as bandwidth efficient as clonezilla.
Maybe have a look at ddrescue, which handles errors a little bit better than
plain dd...
JD
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos