NetBSD-Users archive

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

Re: NetBSD 8: Install on an LVM partition



On Feb 25,  9:47am, Michael van Elst wrote:
} On Mon, Feb 25, 2019 at 12:10:53AM -0800, John Nemeth wrote:
} 
} >      Speaking of our old lvmtools, it does weird stuff when setting
} > up multi-terabyte PVs.  Looks like it has a 31/32-bit limit somewhere.
} > If you just leave it be, it won't use the entire disk.  If you
} > specify the size, it gives warnings, but appears to work fine.  I
} 
} I'm using it on 6TB disks.
} 
} Obviously you have problems if you use it on disklabel partitions that
} are limited to 32bit block numbers (i.e. 2TB for 512byte/sector disks).
} 
} This is also true when using the raw partition. While access to the disk
} is bounded by the real size, the disklabel can only store a 32bit number
} (which is nowadays clamped to the maximum, not just the low 32 bits).
} The dm driver uses getdisksize() to report device information to
} LVM and getdisksize() uses DIOCGPARTINFO to retrieve the partition data.
} It doesn't specially treat the raw partition differently, maybe it
} just should.

     Modern versions of gpt(8) use:

ioctl(gpt->fd, DIOCGMEDIASIZE, &gpt->mediasz)

gpt->fd is an fd returned by opendisk() and gpt->mediasz is an
off_t.  I'm not sure if this would work on a partition and I
certainly wouldn't want to lose that functionality, but this would
certainly be useful for a raw disk.  Older versions of gpt(8) did
use getdisksize() from fsck/partutil.c, so would have had the same
issue.

} This can also be a problem if a fictious disklabel partition aliases
} a wedge. In that case you need to tell LVM to filter out the unwanted
} devices.
} 
}-- End of excerpt from Michael van Elst


Home | Main Index | Thread Index | Old Index