Re: Clone logical volume using dd

2020-11-24 Thread Sreyan Chakravarty
On Mon, Nov 23, 2020 at 4:02 AM Michael D. Setzer II via users < users@lists.fedoraproject.org> wrote: > dd bs=1M if=$localback |lzop -c - > /mnt/local$localpath$localimagename > > I use lzop for compression of image, since it gives good compress and is > considerable faster than gzip. > > Note: S

Re: Clone logical volume using dd

2020-11-24 Thread Sreyan Chakravarty
On Mon, Nov 23, 2020 at 9:27 AM Jonathan Billings wrote: > > 'dump' is probably the most appropriate tool to capture an ext4 volume > to be converted to a thin-provisioned volume. Tar could also work as > long as you capture all the extended (selinux) attributes, which I > don't believe were des

Re: Clone logical volume using dd

2020-11-24 Thread Sreyan Chakravarty
On Mon, Nov 23, 2020 at 5:12 PM Samuel Sieb wrote: > For general imaging, dd is fine. But you need to read the context here. > He wants to make an image of the current filesystem in order to write > it back to a thin LV. For that purpose, you only want to be writing the > used blocks. Otherw

Re: Clone logical volume using dd

2020-11-23 Thread Samuel Sieb
On 11/23/20 1:35 PM, Michael D. Setzer II wrote: On 23 Nov 2020 at 12:50, Samuel Sieb wrote: This is still not suitable for his purpose. It's not about the compressed size, it's about the number of blocks copied. Using dd, you are still copying *all* the unused blocks which will be really bad

Re: Clone logical volume using dd

2020-11-23 Thread Michael D. Setzer II via users
On 23 Nov 2020 at 12:50, Samuel Sieb wrote: Subject:Re: Clone logical volume using dd To: users@lists.fedoraproject.org From: Samuel Sieb Date sent: Mon, 23 Nov 2020 12:50:46 -0800 Send reply to: Community support for

Re: Clone logical volume using dd

2020-11-23 Thread Samuel Sieb
On 11/23/20 1:02 AM, Michael D. Setzer II via users wrote: dd bs=1M if=$localback |lzop -c - > /mnt/local$localpath$localimagename I use lzop for compression of image, since it gives good compress and is considerable faster than gzip. Note: Since it does copy all blocks, it is best to clear t

Re: Clone logical volume using dd

2020-11-23 Thread Robert Nichols
On 11/23/20 2:08 AM, Sreyan Chakravarty wrote: On Mon, Nov 23, 2020 at 1:37 PM Samuel Sieb mailto:sam...@sieb.net>> wrote: No.  Unless you are trying to recover a failing drive, you would not want either of those. So do I use partclone or dd ? partclone understands filesystems and

Re: Clone logical volume using dd

2020-11-23 Thread Jonathan Billings
On Sun, Nov 22, 2020 at 08:47:33PM -0700, Chris Murphy wrote: > ext4 I think it has some kind of dump facility but the man page for > dumpe2fs doesn't look like it does that. So I'm not sure. dumpe2fs is for dumping the filesystem information for ext2/3/4. The package name for the filesystem dump

Re: Clone logical volume using dd

2020-11-23 Thread Michael D. Setzer II via users
k and reimage systems, but retired in 2017 with 36+ years teaching computer science at College.. Well, good luck and be Safe. On 23 Nov 2020 at 9:12, Roberto Ragusa wrote: Subject: Re: Clone logical volume using dd To: users@lists.fedoraproject.org From:

Re: Clone logical volume using dd

2020-11-23 Thread Samuel Sieb
On 11/23/20 12:12 AM, Sreyan Chakravarty wrote: On Mon, Nov 23, 2020 at 1:38 PM Samuel Sieb > wrote: You can use partclone or e2image (just make sure you use the option to include data) or clonezilla. I thought partclone is a part of Clonezilla. No, clonezill

Re: Clone logical volume using dd

2020-11-23 Thread Sreyan Chakravarty
On Mon, Nov 23, 2020 at 1:38 PM Samuel Sieb wrote: > You can use partclone or e2image (just make sure you use the > option to include data) or clonezilla. I thought partclone is a part of Clonezilla. > I would suggest also doing a > full tar backup of the filesystem before trying anything els

Re: Clone logical volume using dd

2020-11-23 Thread Roberto Ragusa
On 11/22/20 9:08 PM, Sreyan Chakravarty wrote: dd if=/dev/vg/root_lv of=/mnt/exthdd bs=64k conv=noerror,sync status=progress 1) Why use noerror and sync? noerror might give me a corrupted image and sync is just going to increase the size of my image with padding. Indeed, noerror and sync ar

Re: Clone logical volume using dd

2020-11-23 Thread Sreyan Chakravarty
On Mon, Nov 23, 2020 at 1:37 PM Samuel Sieb wrote: > No. Unless you are trying to recover a failing drive, you would not > want either of those. > So do I use partclone or dd ? -- Regards, Sreyan Chakravarty ___ users mailing list -- users@lists.fed

Re: Clone logical volume using dd

2020-11-23 Thread Samuel Sieb
On 11/22/20 11:12 PM, Sreyan Chakravarty wrote: On Mon, Nov 23, 2020 at 2:02 AM Jorge Fábregas > wrote: You really should use a proper tool for the job. Something like partclone.  That way you don't waste time & storage since you'll be saving *only* t

Re: Clone logical volume using dd

2020-11-23 Thread Samuel Sieb
On 11/22/20 11:27 PM, Sreyan Chakravarty wrote: On Mon, Nov 23, 2020 at 9:45 AM Robert Nichols mailto:rnicholsnos...@comcast.net>> wrote: Unless "conv=sync" is used, it does not. Without "conv=sync", when the input reaches EOF, dd will write whatever partial block has been read. If

Re: Clone logical volume using dd

2020-11-22 Thread Sreyan Chakravarty
On Mon, Nov 23, 2020 at 9:45 AM Robert Nichols wrote: > Unless "conv=sync" is used, it does not. Without "conv=sync", when the > input > reaches EOF, dd will write whatever partial block has been read. If you > _do_ > use "conv=sync", then that output block will be zero-padded to the obs > size.

Re: Clone logical volume using dd

2020-11-22 Thread Sreyan Chakravarty
On Mon, Nov 23, 2020 at 9:18 AM Chris Murphy wrote: > I agree with the suggestions to use a tool appropriate for this task, > and that dd isn't likely what you want. I like dd/ddrescue for the > specific case of data recovery. But for data replication, it's better > to use something that's intend

Re: Clone logical volume using dd

2020-11-22 Thread Sreyan Chakravarty
On Mon, Nov 23, 2020 at 9:02 AM Jon LaBadie wrote: > > Does dd write a complete final block to the destination. If so, the image > would not be an exact copy unless the source size is an exact multiple of > the blocksize. I don't know. I have not tried it yet. How would I verify something lik

Re: Clone logical volume using dd

2020-11-22 Thread Sreyan Chakravarty
On Mon, Nov 23, 2020 at 5:37 AM Samuel Sieb wrote: > I don't know where you got that command from, but "noerror" would > generally be used if the source device is failing. And yes, in that > case, you might get a corrupted image. > The command came from here: https://www.cyberciti.biz/faq/unix

Re: Clone logical volume using dd

2020-11-22 Thread Sreyan Chakravarty
On Mon, Nov 23, 2020 at 2:02 AM Jorge Fábregas wrote: > You really should use a proper tool for the job. Something like > partclone. That way you don't waste time & storage since you'll be > saving *only* the used blocks. I mostly use CloneZilla (that uses > partclone) but you can install part

Re: Clone logical volume using dd

2020-11-22 Thread Robert Nichols
On 11/22/20 9:31 PM, Jon LaBadie wrote: On Mon, Nov 23, 2020 at 01:38:34AM +0530, Sreyan Chakravarty wrote: Hi, I use LVM on top of LUKS. My entire root file system is on a logical volume. I have no seperate home or swap partitions. I would like to know how can I clone this logical volume to

Re: Clone logical volume using dd

2020-11-22 Thread Chris Murphy
I agree with the suggestions to use a tool appropriate for this task, and that dd isn't likely what you want. I like dd/ddrescue for the specific case of data recovery. But for data replication, it's better to use something that's intended for that purpose. Btrfs, it's either the seed/sprout featu

Re: Clone logical volume using dd

2020-11-22 Thread Jon LaBadie
On Mon, Nov 23, 2020 at 01:38:34AM +0530, Sreyan Chakravarty wrote: > Hi, > > I use LVM on top of LUKS. > > My entire root file system is on a logical volume. I have no seperate home > or swap partitions. > > I would like to know how can I clone this logical volume to my external > hard disk. >

Re: Clone logical volume using dd

2020-11-22 Thread Samuel Sieb
On 11/22/20 12:08 PM, Sreyan Chakravarty wrote: I would like to know how can I clone this logical volume to my external hard disk. I have seen commands like : dd if=/dev/vg/root_lv of=/mnt/exthdd bs=64k conv=noerror,sync status=progress I have a couple of questions about this: 1) Why use n

Re: Clone logical volume using dd

2020-11-22 Thread Jorge Fábregas
On 11/22/20 4:08 PM, Sreyan Chakravarty wrote: > I would like to know how can I clone this logical volume to my external > hard disk. Hi, You really should use a proper tool for the job. Something like partclone. That way you don't waste time & storage since you'll be saving *only* the used bloc

Clone logical volume using dd

2020-11-22 Thread Sreyan Chakravarty
Hi, I use LVM on top of LUKS. My entire root file system is on a logical volume. I have no seperate home or swap partitions. I would like to know how can I clone this logical volume to my external hard disk. I have seen commands like : dd if=/dev/vg/root_lv of=/mnt/exthdd bs=64k conv=noerror,s