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

mount as read-only and XFS commands



Hi,

I'd like to confirm the behavior of XFS.

I found that the XFS command (xfs_growfs) changes the filesystem
which is mounted by read-only.
This phenomenon occurs on the read-only filesystem and 
on the filesystem that goes to read-only by the remount operation.

I think it should be the error with EROFS or EBUSY.

How do you think?

--------

I did the following (tp_readonly.sh) :
    
	MNT=/mnt/xfs
	DEV=/dev/hda8
	mkfs -t xfs -f $DEV -d size=12000b
	mount -t xfs -o ro $DEV $MNT
	xfs_growfs -d $MNT
	xfs_growfs -n $MNT
	umount $MNT
	mount -t xfs $DEV $MNT

This results in the following messages:

	+ MNT=/mnt/xfs
	+ DEV=/dev/hda8
	+ mkfs.xfs -f /dev/hda8 -d size=12000b
	meta-data=/dev/hda8              isize=256    agcount=2, agsize=6000 blks
	data     =                       bsize=4096   blocks=12000, imaxpct=25
	         =                       sunit=0      swidth=0 blks, unwritten=0
	naming   =version 2              bsize=4096
	log      =internal log           bsize=4096   blocks=1200
	realtime =none                   extsz=65536  blocks=0, rtextents=0
	+ mount -t xfs -o ro /dev/hda8 /mnt/xfs
	XFS mounting filesystem ide0(3,8)
	+ xfs_growfs -d /mnt/xfs
	meta-data=/mnt/xfs               isize=256    agcount=2, agsize=6000 blks
	data     =                       bsize=4096   blocks=12000, imaxpct=25
	         =                       sunit=0      swidth=0 blks, unwritten=0
	naming   =version 2              bsize=4096
	log      =internal               bsize=4096   blocks=1200
	realtime =none                   extsz=65536  blocks=0, rtextents=0
	data blocks changed from 12000 to 2797310
	+ xfs_growfs -n /mnt/xfs
	meta-data=/mnt/xfs               isize=256    agcount=467, agsize=6000 blks
	data     =                       bsize=4096   blocks=2797310, imaxpct=25
	         =                       sunit=0      swidth=0 blks, unwritten=0
	naming   =version 2              bsize=4096
	log      =internal               bsize=4096   blocks=1200
	realtime =none                   extsz=65536  blocks=0, rtextents=0
	+ umount /mnt/xfs
	+ mount -t xfs /dev/hda8 /mnt/xfs
	XFS mounting filesystem ide0(3,8)
	Starting XFS recovery on filesystem: ide0(3,8) (dev: 3/8)
	Ending XFS recovery on filesystem: ide0(3,8) (dev: 3/8)


I did the following (tp_remount.sh):

	MNT=/mnt/xfs
	DEV=/dev/hda8
	mkfs -t xfs -f $DEV -d size=12000b
	mount -t xfs $DEV $MNT
        xfs_growfs -n $MNT 
	xfs_growfs -d $MNT &
	sleep 2
	mount -t xfs -o remount -o ro $DEV $MNT
	sleep 10
	xfs_growfs -n $MNT
	umount $MNT
	mount -t xfs $DEV $MNT

This results in the following messages:

	+ MNT=/mnt/xfs
	+ DEV=/dev/hda8
	+ mkfs.xfs -f /dev/hda8 -d size=12000b
	meta-data=/dev/hda8              isize=256    agcount=2, agsize=6000 blks
	data     =                       bsize=4096   blocks=12000, imaxpct=25
	         =                       sunit=0      swidth=0 blks, unwritten=0
	naming   =version 2              bsize=4096
	log      =internal log           bsize=4096   blocks=1200
	realtime =none                   extsz=65536  blocks=0, rtextents=0
	+ mount -t xfs /dev/hda8 /mnt/xfs
	XFS mounting filesystem ide0(3,8)
	+ xfs_growfs -n /mnt/xfs
	meta-data=/mnt/xfs               isize=256    agcount=2, agsize=6000 blks
	data     =                       bsize=4096   blocks=12000, imaxpct=25
	         =                       sunit=0      swidth=0 blks, unwritten=0
	naming   =version 2              bsize=4096
	log      =internal               bsize=4096   blocks=1200
	realtime =none                   extsz=65536  blocks=0, rtextents=0
	+ sleep 2
	+ xfs_growfs -d /mnt/xfs
	meta-data=/mnt/xfs               isize=256    agcount=2, agsize=6000 blks
	data     =                       bsize=4096   blocks=12000, imaxpct=25
	         =                       sunit=0      swidth=0 blks, unwritten=0
	naming   =version 2              bsize=4096
	log      =internal               bsize=4096   blocks=1200
	realtime =none                   extsz=65536  blocks=0, rtextents=0
	+ mount -t xfs -o remount -o ro /dev/hda8 /mnt/xfs
	+ sleep 10
	data blocks changed from 12000 to 2797310
	+ xfs_growfs -n /mnt/xfs
	meta-data=/mnt/xfs               isize=256    agcount=467, agsize=6000 blks
	data     =                       bsize=4096   blocks=2797310, imaxpct=25
	XFS mounting filesystem ide0(3,8)
	         =                       sunit=0      swidth=0 blks, unwritten=0
	naming   =version 2              bsize=4096
	log      =internal               bsize=4096   blocks=1200
	realtime =none                   extsz=65536  blocks=0, rtextents=0
	+ umount /mnt/xfs
	+ mount -t xfs /dev/hda8 /mnt/xfs
	Starting XFS recovery on filesystem: ide0(3,8) (dev: 3/8)
	Ending XFS recovery on filesystem: ide0(3,8) (dev: 3/8)

----------
Running 2.4.18-xfs in this case.

Thanks and Regards
tatsu