- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Flushing data to disk
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-03-2001 06:47 AM
04-03-2001 06:47 AM
Flushing data to disk
I am looking for a 100% guaranteed way to make sure that data that was written to a new file has actually landed on the disk (and is not still in buffercache). Will the sync command be sufficient?
This question is related to Business Copy volumes on our XP256 diskarray.
I have experienced problems with data from files on the primary BC-disk that seemed to be still in the buffercache. After splitting the pair the data was not (yet) available on the secondary disk.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-03-2001 06:56 AM
04-03-2001 06:56 AM
Re: Flushing data to disk
You need to do 3 of them to be sure;
sync;sync;sync
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-03-2001 06:57 AM
04-03-2001 06:57 AM
Re: Flushing data to disk
Running 'sync' should flush all data from memory to disk. The man pages (1M) for 'sync' do note that "The writing, although scheduled, is not necessarily complete upon return from sync.". You might want to issue the 'sync' and then wait a short period before continuing.
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-03-2001 07:04 AM
04-03-2001 07:04 AM
Re: Flushing data to disk
Does anybody know what the -l option of sync means?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-03-2001 07:18 AM
04-03-2001 07:18 AM
Re: Flushing data to disk
Interesting question. I hadn't noticed the '-l' option. The man pages for 10.20, 11.0 and 11.11 all show it but make no mention of its use. In fact, running 'sync' with any options seems to be ignored -- no complaint of mis-usage. I suspect that perhaps at one time there was an affect (?). I would use 'sync' alone.
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-04-2001 05:51 AM
04-04-2001 05:51 AM
Re: Flushing data to disk
As far as the host is concerned the write is committed. It may not be to the disk yet. That is one of the reasons the cache on the XP has a 48 hour battery backup.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-04-2001 12:47 PM
04-04-2001 12:47 PM
Re: Flushing data to disk
I can confirm what Dave has posted; the buffercache on the host is clear but the write is not committed to disk, especially with regards to the XP256. The XP256 is an array subsystem all its own and will de-stage the write to disk based on it own performance algorithms. Only when the XP256 is in a reduced state (some piece of redundant hardware has failed) will the array post all writes as a 'write-through cache' to both disk and cache, just in case.
Good Luck,
Curt
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-16-2001 09:11 PM
09-16-2001 09:11 PM
Re: Flushing data to disk
Ensure that your filesystem is mounted with the convosync=direct paramter. You can add this to /etc/fstab
This will bypass buffer cache for writes and ensure that any data written will go to your frame. Once you split a volume with business copy the XP should d-stage it's cache and give you a consistent image.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-17-2001 12:07 PM
09-17-2001 12:07 PM
Re: Flushing data to disk
I don't think that the data that is still in XP's cache makes the BC inconsistent.
I don't imagine that HP/Hitachi would synch the BC disks disregarding the data stored in the cache.
The XP can store up to 32GB of data that can mess up all the BC file systems if disregarded.
It's true that an fsck is needed after you split the BC but that's needed only for the system's cache and not for XP's one.
If you wait at least 30 seconds for the sync to be perfomed you sould be safe and have an up-to-date BC.
For example, if you bring the system connected to the P-VOLs down and then split the BC you would NOT need to fsck the BC file systems before mounting them. This proves that the XP cached data is copied to the BC.
Ovidiu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-17-2001 12:18 PM
09-17-2001 12:18 PM
Re: Flushing data to disk
Rob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-18-2001 11:34 AM
09-18-2001 11:34 AM
Re: Flushing data to disk
sync; sync; sync
Doing it 3 times just allows for completion I think. Just an old habit with me.
Rob - Your instructor is 100% wrong. A single sync write "all" data. You just need to make sure you have allowed enough time for it to complete its task.
Lou Zirko
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-19-2001 03:17 AM
09-19-2001 03:17 AM
Re: Flushing data to disk
> Rob - Your instructor is 100% wrong. A
> single sync write "all" data. You just need
> to make sure you have allowed enough time
> for it to complete its task.
That is true, but "enough time" can be a long time and it can be longer than the default syncer(1M) interval of 30 seconds. The reason for this is that if there are (too) many outstanding writes, syncer(1M) will not schedule all writes at once in order to try to limit the disk I/O peak.
The only reliable options are the (vxfs/JFS) mount options noted by Paul Spyrou and modifying the application(s) to use *SYNC (see for example "Synchronized I/O Flags" in open(2)).