Re: Small project: Make it easier to upgrade root fs (i.e. to bigtime)

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

 



On Tue, Oct 19, 2021 at 04:04:14PM -0500, Eric Sandeen wrote:
> On 10/19/21 3:44 PM, Dave Chinner wrote:
> > On Tue, Oct 19, 2021 at 10:18:31AM -0500, Eric Sandeen wrote:
> > > Darrick taught xfs_admin to upgrade filesystems to bigtime and inobtcount, which is
> > > nice! But it operates via xfs_repair on an unmounted filesystem, so it's a bit tricky
> > > to do for the root fs.
> > > 
> > > It occurs to me that with the /forcefsck and /fsckoptions files[1], we might be able
> > > to make this a bit easier. i.e. touch /forcefsck and add "-c bigtime=1" to /fsckoptions,
> > > and then the initrd/initramfs should run xfs_repair with -c bigtime=1 and do the upgrade.
> > 
> > Does that happen before/after swap is enabled?

IIRC in general, it follows the /etc/fstab mount order, and to access that,
rootfs should be mounted, and, (also IIRC), the rootfs is mounted RO, and then
remounted RW once the boot pre-reqs are read, but I can confirm that.

> 
> > Also, ISTR historical problems with doing initrd based root fs
> > operations because it's not uncommon for the root filesystem to fail
> > to cleanly unmount on shutdown.  i.e. it can end up not having the
> > unmount record written because shutdown finishes with the superblock
> > still referenced. Hence the filesystem has to be mounted and the log
> > replayed before repair can be run on it....
> > 

I suppose this is already true nowadays? If /forcefsck exists, we are already
running fsck the on the rootfs, so, I wonder what happens nowadays, as I haven't
tried to use /forcefsck. But anyway, I don't think the behavior will be much
different from the current one. I should check what happens today..

> > > Does anyone see a problem with this?  If not, would anyone like to
> > > take this on as a small project?

If nobody has any objections, I'll be happy to work on this :)

Cheers
-- 
Carlos




[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux