* pvmove/mirror target mirroring data between two devices with different sector size
@ 2016-03-28 4:00 Liuhua Wang
2016-03-28 13:06 ` Coly Li
0 siblings, 1 reply; 4+ messages in thread
From: Liuhua Wang @ 2016-03-28 4:00 UTC (permalink / raw)
To: dm-devel; +Cc: Neil F Brown
Hi List,
I have a question that I think maybe you can give me some idea.
I have two devices with different sector size: 512B and 4096B.
- SOURCE DEVICE (mdos lvm partiton)
#parted /dev/sdb
Model: ATA SATADOM-SL 3ME (scsi)
Disk /dev/sdb: 32.0GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
(In `parted` Sector size are both got from IOCTL(BLKSSZGET))
- TARGET DEVICE (WHOLE DISK)
#parted /dev/sdc
Error: /dev/sdd: unrecognised disk label
Model: ATA HUH728080ALN600 (scsi)
Disk /dev/sdd: 8002GB
Sector size (logical/physical): 4096B/4096B
Partition Table: unknown
I want to move data from one device to the other using lvm command
`pvmove`, but after pvmove, file system cannot mount.
So my question is whether pvmove support moving date between devices with different sector size
or same question: mirror target support mirroring data between two devices with different sector size?
Thank you in advance.
Best regards,
Liuhua
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: pvmove/mirror target mirroring data between two devices with different sector size
2016-03-28 4:00 pvmove/mirror target mirroring data between two devices with different sector size Liuhua Wang
@ 2016-03-28 13:06 ` Coly Li
0 siblings, 0 replies; 4+ messages in thread
From: Coly Li @ 2016-03-28 13:06 UTC (permalink / raw)
To: lwang; +Cc: dm-devel
在 16/3/28 下午12:00, Liuhua Wang 写道:
> Hi List,
>
> I have a question that I think maybe you can give me some idea.
>
> I have two devices with different sector size: 512B and 4096B.
>
> - SOURCE DEVICE (mdos lvm partiton)
> #parted /dev/sdb
> Model: ATA SATADOM-SL 3ME (scsi)
> Disk /dev/sdb: 32.0GB
> Sector size (logical/physical): 512B/512B
> Partition Table: msdos
> (In `parted` Sector size are both got from IOCTL(BLKSSZGET))
>
> - TARGET DEVICE (WHOLE DISK)
> #parted /dev/sdc
> Error: /dev/sdd: unrecognised disk label
> Model: ATA HUH728080ALN600 (scsi)
> Disk /dev/sdd: 8002GB
> Sector size (logical/physical): 4096B/4096B
> Partition Table: unknown
>
> I want to move data from one device to the other using lvm command
> `pvmove`, but after pvmove, file system cannot mount.
>
Is the logical volume on target device recognized by lvm ? If only file
system failed to mount, what is the error message from kernel side ?
Thanks.
--
Coly Li
--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: pvmove/mirror target mirroring data between two devices with different sector size
[not found] <56F94727020000A000058AA7@prv3-mh.provo.novell.com>
@ 2016-03-31 2:09 ` NeilBrown
2016-04-01 6:13 ` Liuhua Wang
0 siblings, 1 reply; 4+ messages in thread
From: NeilBrown @ 2016-03-31 2:09 UTC (permalink / raw)
To: Liuhua Wang, dm-devel
[-- Attachment #1.1: Type: text/plain, Size: 1437 bytes --]
On Mon, Mar 28 2016, Liuhua Wang wrote:
> Hi List,
>
> I have a question that I think maybe you can give me some idea.
>
> I have two devices with different sector size: 512B and 4096B.
>
> - SOURCE DEVICE (mdos lvm partiton)
> #parted /dev/sdb
> Model: ATA SATADOM-SL 3ME (scsi)
> Disk /dev/sdb: 32.0GB
> Sector size (logical/physical): 512B/512B
> Partition Table: msdos
> (In `parted` Sector size are both got from IOCTL(BLKSSZGET))
>
> - TARGET DEVICE (WHOLE DISK)
> #parted /dev/sdc
> Error: /dev/sdd: unrecognised disk label
> Model: ATA HUH728080ALN600 (scsi)
> Disk /dev/sdd: 8002GB
> Sector size (logical/physical): 4096B/4096B
> Partition Table: unknown
>
> I want to move data from one device to the other using lvm command
> `pvmove`, but after pvmove, file system cannot mount.
This seems to raise questions that you could easily answer:
1/ what filesystem. What error when mounting?
2/ Is the data exactly the same after the move. e.g does
sh1sum of the old and new device report the same content?
If not, what about sha1sum of the first 10Gig? The first Gig?
100K? 16K? 1K? ...
i.e. if there is a difference, where is the first difference?
NeilBrown
>
> So my question is whether pvmove support moving date between devices with different sector size
> or same question: mirror target support mirroring data between two devices with different sector size?
>
> Thank you in advance.
>
> Best regards,
> Liuhua
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: pvmove/mirror target mirroring data between two devices with different sector size
2016-03-31 2:09 ` NeilBrown
@ 2016-04-01 6:13 ` Liuhua Wang
0 siblings, 0 replies; 4+ messages in thread
From: Liuhua Wang @ 2016-04-01 6:13 UTC (permalink / raw)
To: NeilBrown; +Cc: dm-devel
Hi Neil,
Hi Coly,
Thank you for your reply.
> >
> > I have a question that I think maybe you can give me some idea.
> >
> > I have two devices with different sector size: 512B and 4096B.
> >
> > - SOURCE DEVICE (mdos lvm partiton)
> > #parted /dev/sdb
> > Model: ATA SATADOM-SL 3ME (scsi)
> > Disk /dev/sdb: 32.0GB
> > Sector size (logical/physical): 512B/512B
> > Partition Table: msdos
> > (In `parted` Sector size are both got from IOCTL(BLKSSZGET))
> >
> > - TARGET DEVICE (WHOLE DISK)
> > #parted /dev/sdc
> > Error: /dev/sdd: unrecognised disk label
> > Model: ATA HUH728080ALN600 (scsi)
> > Disk /dev/sdd: 8002GB
> > Sector size (logical/physical): 4096B/4096B
> > Partition Table: unknown
> >
> > I want to move data from one device to the other using lvm command
> > `pvmove`, but after pvmove, file system cannot mount.
>
> This seems to raise questions that you could easily answer:
> 1/ what filesystem. What error when mounting?
XFS
after `pvmove` (from 512B sector sized zfcp device to 4096 sector sized dasd device)
and umounted, it cannot be mounted.
#umount /mnt
#mount /dev/vg/lv /mnt
mount: mount /dev/mapper/vg-lv on /mnt failed: Function not implemented
/var/log/messges:
-------------------------
kernel: end_request: I/O error, dev dasdb, sector 514284
kernel: (dm-4): metadata I/O error: block 0x7d02c ("xlog_iodone") error 5 numblks 64
kernel: (dm-4): xfs_do_force_shutdown(0x2) called from line 1174 of file ../fs/xfs/xfs_log.c. Return address = 0x000003ff806f1d46
kernel: (dm-4): Log I/O Error Detected. Shutting down filesystem
kernel: XFS (dm-4): Please umount the filesystem and rectify the problem(s)
kernel: XFS (dm-4): Unable to update superblock counters. Freespace may not be correct on next mount.
kernel: XFS (dm-4): xfs_log_force: error 5 returned.
kernel: XFS (dm-4): device supports 4096 byte sectors (not 512)
--------------------------
Seems that filesystem are not correctly recoganized by mount.
But when I then `pvmove` back (from 4096 sector size dasd device to 512 sector size zfcp device)
It can be mounted successfully.
> 2/ Is the data exactly the same after the move. e.g does
> sh1sum of the old and new device report the same content?
> If not, what about sha1sum of the first 10Gig? The first Gig?
> 100K? 16K? 1K? ...
> i.e. if there is a difference, where is the first difference?
Only the first 64K which belongs to lvm2 metadata area are different.
(I wrote file to fs with dd if=/dev/zero of=/mnt/file)
But pvmove between two same devices will cause different lvmeta data
which is expected.
I did more tests and found that if I add "-s size=4096" that is,
`mkfs.xfs -s size=4096 /dev/vg/lv ` then there is no problem after `pvmove`.
(the default is 512B)
So I think the root reason is that fs with sector size 512 cannot support
device with sector size 4096. right?
Best,
Liuhua
> >
> > So my question is whether pvmove support moving date between devices with different sector size
> > or same question: mirror target support mirroring data between two devices with different sector size?
> >
> > Thank you in advance.
> >
> > Best regards,
> > Liuhua
--
---
Liuhua Wang
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-04-01 6:13 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-28 4:00 pvmove/mirror target mirroring data between two devices with different sector size Liuhua Wang
2016-03-28 13:06 ` Coly Li
[not found] <56F94727020000A000058AA7@prv3-mh.provo.novell.com>
2016-03-31 2:09 ` NeilBrown
2016-04-01 6:13 ` Liuhua Wang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).