xfs
[Top] [All Lists]

Does XFS support the sync mount option?

To: xfs@xxxxxxxxxxx
Subject: Does XFS support the sync mount option?
From: Ewan Chalmers <ewan.chalmers@xxxxxxxxx>
Date: Thu, 5 Feb 2009 14:43:29 +0000
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type:content-transfer-encoding; bh=EUGWi7FqipT4ivbBtQBYgXMHOFf4YC1pxsB8WmdMjog=; b=mHbBY/MxdDj5JFyXSMRmYrnupCUI3g07Qdrmc/T6PlohOJKnb2wq7zo03Dfqxx6gW7 4FEWAPQuogCJMi+BDAhzXy3p1IImg2IbI7vPWLIJ4tppYzA/UgvHGcvy3h7I3ytozpQq c+QUNoR+AN7DG8NWdyjkQV+1lqckEhBXV1ZaM=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type :content-transfer-encoding; b=YYQ2Q1blDZVulHPc3qK5kaq29UcVY1/NjP++/tOGDlhkG70Ars4KzKQ7G8ehYjLOed o5RzmF4m58bA/CwEPb3zWH0aQqIst3HockPXFSCpSurdpeA0hNunDdXDLfaswpEhBG/b zxpEcMpg8PFYcGRelVYcOEsqOfyVPK0VI8HV4=
I am interested to know whether XFS supports the sync mount option.

I am using XFS on an external USB disk and automounting using the
ubuntu/debian usbmount package
(http://packages.ubuntu.com/intrepid/usbmount). The disk is connected
to a headless server. I would like to be able to safely switch the
disk on/off on demand without first logging in to the box to
sync/unmount. I believe the sync option is essential to this use case.
Using usbmount, it appears to work correctly, but the output to syslog
makes me wonder.

The default configuration for usbmount includes

FILESYSTEMS="ext2 ext3"
MOUNTOPTIONS="sync,noexec,nodev,noatime"

I have added xfs to the FILESYSTEMS list.

On switching off the disk, I see the following output in syslog

kernel: [1034259.923629] usb 1-2: USB disconnect, address 26
kernel: [1034259.936251] xfs_force_shutdown(sdb1,0x1) called from line
420 of file /build/buildd/linux-2.6.27/fs/xfs/xfs_rw.c.  Return
address = 0xe0a9ddb4
kernel: [1034259.936334] Filesystem "sdb1": I/O Error Detected.
Shutting down filesystem: sdb1
kernel: [1034259.936404] Please umount the filesystem, and rectify the
problem(s)
kernel: [1034259.949818] Filesystem "sdb1": xfs_log_force: error 5 returned.
kernel: [1034259.949851] Filesystem "sdb1": xfs_log_force: error 5 returned.
kernel: [1034259.949890] xfs_force_shutdown(sdb1,0x1) called from line
420 of file /build/buildd/linux-2.6.27/fs/xfs/xfs_rw.c.  Return
address = 0xe0a9ddb4
kernel: [1034259.968157] Filesystem "sdb1": xfs_log_force: error 5 returned.
usbmount[16307]: executing command: umount -l /media/usb0
kernel: [1034260.050924] Filesystem "sdb1": xfs_log_force: error 5 returned.
kernel: [1034260.057086] Filesystem "sdb1": xfs_log_force: error 5 returned.
kernel: [1034260.061208] xfs_force_shutdown(sdb1,0x1) called from line
420 of file /build/buildd/linux-2.6.27/fs/xfs/xfs_rw.c.  Return
address = 0xe0a9ddb4
kernel: [1034260.069650] Filesystem "sdb1": xfs_log_force: error 5 returned.
kernel: [1034260.073675] Filesystem "sdb1": xfs_log_force: error 5 returned.
kernel: [1034260.077672] xfs_force_shutdown(sdb1,0x1) called from line
420 of file /build/buildd/linux-2.6.27/fs/xfs/xfs_rw.c.  Return
address = 0xe0a9ddb4
usbmount[16307]: executing command: run-parts /etc/usbmount/umount.d
kernel: [1034260.084706] Filesystem "sdb1": xfs_log_force: error 5 returned.
kernel: [1034260.084735] Filesystem "sdb1": xfs_log_force: error 5 returned.
kernel: [1034260.084820] Filesystem "sdb1": xfs_log_force: error 5 returned.
kernel: [1034260.084864] Filesystem "sdb1": xfs_log_force: error 5 returned.
kernel: [1034260.084891] Filesystem "sdb1": xfs_log_force: error 5 returned.

But the disk remounts cleanly when it is switched back on.

kernel: [1034394.920087] usb 1-2: new high speed USB device using
ehci_hcd and address 27
kernel: [1034395.064826] usb 1-2: configuration #1 chosen from 1 choice
kernel: [1034395.078845] scsi25 : SCSI emulation for USB Mass Storage devices
kernel: [1034395.085992] usb-storage: device found at 27
kernel: [1034395.086033] usb-storage: waiting for device to settle
before scanning
kernel: [1034400.084595] usb-storage: device scan complete
kernel: [1034400.087474] scsi 25:0:0:0: Direct-Access     WDC WD10
EADS-00L5B1      0041 PQ: 0 ANSI: 0
kernel: [1034400.091636] sd 25:0:0:0: [sdb] 1953525168 512-byte
hardware sectors (1000205 MB)
kernel: [1034400.094271] sd 25:0:0:0: [sdb] Write Protect is off
kernel: [1034400.094309] sd 25:0:0:0: [sdb] Mode Sense: 03 00 00 00
kernel: [1034400.094328] sd 25:0:0:0: [sdb] Assuming drive cache: write through
kernel: [1034400.104985] sd 25:0:0:0: [sdb] 1953525168 512-byte
hardware sectors (1000205 MB)
kernel: [1034400.113058] sd 25:0:0:0: [sdb] Write Protect is off
kernel: [1034400.113094] sd 25:0:0:0: [sdb] Mode Sense: 03 00 00 00
kernel: [1034400.113114] sd 25:0:0:0: [sdb] Assuming drive cache: write through
kernel: [1034400.120193]  sdb: sdb1
kernel: [1034400.137434] sd 25:0:0:0: [sdb] Attached SCSI disk
kernel: [1034400.137980] sd 25:0:0:0: Attached scsi generic sg1 type 0
usbmount[16483]: executing command: mount -txfs
-osync,noexec,nodev,noatime /dev/sdb1 /media/usb0
kernel: [1034401.228110] XFS mounting filesystem sdb1
kernel: [1034401.710070] Ending clean XFS mount for filesystem: sdb1
usbmount[16483]: executing command: run-parts /etc/usbmount/mount.d

I would be interested to know whether it is reasonable to use XFS in
the way I have outlined.

Thanks,
Ewan

<Prev in Thread] Current Thread [Next in Thread>