Prev: Help on resetting root password in Cyclade for Solaris servers ***Beginner Question***
Next: best tutorial for installing oracle 10 for Solaris 10 x86
From: mannu on 23 Mar 2010 06:57 Hello, Is there an ioctl that tells whether write caching is enabled on disk? I believe there are many kinds of disks like scsi, ide, sata, pata etc,. And I need to know if whether write caching is enabled for all kinds of disks possible? On reading scsi document, I found mode sense page code 8 gives whether write cache is enabled or not. If so we can use USCSICMD ioctl. Is my assumption correct? For IDE, sata, pata and other possible non scsi disks, how we can get whether write caching is enabled or not? Thanks and Regards, Mannu.
From: bill on 23 Mar 2010 07:39 On 03/23/10 06:57 AM, mannu wrote: > Hello, > Is there an ioctl that tells whether write caching is enabled > on disk? > I believe there are many kinds of disks like scsi, ide, sata, pata > etc,. > And I need to know if whether write caching is enabled for all kinds > of disks possible? > > On reading scsi document, I found mode sense page code 8 gives whether > write cache is enabled or not. If so we can use USCSICMD ioctl. Is my > assumption correct? > > For IDE, sata, pata and other possible non scsi disks, how we can get > whether write caching is enabled or not? > > > Thanks and Regards, > Mannu. format -e select disk cache write_cache display Bill
From: mannu on 23 Mar 2010 07:45 On Mar 23, 4:39 pm, bill <billg...(a)nyc.rr.com> wrote: > On 03/23/10 06:57 AM, mannu wrote: > > > > > Hello, > > Is there an ioctl that tells whether write caching is enabled > > on disk? > > I believe there are many kinds of disks like scsi, ide, sata, pata > > etc,. > > And I need to know if whether write caching is enabled for all kinds > > of disks possible? > > > On reading scsi document, I found mode sense page code 8 gives whether > > write cache is enabled or not. If so we can use USCSICMD ioctl. Is my > > assumption correct? > > > For IDE, sata, pata and other possible non scsi disks, how we can get > > whether write caching is enabled or not? > > > Thanks and Regards, > > Mannu. > > format -e > select disk > cache > write_cache > display > > Bill Hello Bill, Thank you for reply. The "format -e" way is only working for scsi disks. For IDE, sata, pata and other possible non scsi disks, how we can get whether write caching is enabled or not? Also I needed to do this from C program using ioctls ?
From: Tim Bradshaw on 23 Mar 2010 14:58 On 2010-03-23 11:45:41 +0000, mannu said: > For IDE, sata, pata and other possible non scsi disks, how we can get > whether write caching is enabled or not? I imagine this is essentially impossible in general way, especally in the presence of disk systems which will probably lie to you.
From: mannu on 23 Mar 2010 23:46
On Mar 23, 11:58 pm, Tim Bradshaw <t...(a)tfeb.org> wrote: > On 2010-03-23 11:45:41 +0000, mannu said: > > > For IDE, sata, pata and other possible non scsi disks, how we can get > > whether write caching is enabled or not? > > I imagine this is essentially impossible in general way, especally in > the presence of disk systems which will probably lie to you. Hello Tim, Thankyou for help. For scsi disks, scsi standard mentions mode sense page 0x8 gives whether caching enabled or not. For IDE, sata, pata and other possible non scsi disks, while googling around, I found ioctl "DIOCTL_GETWCE" mentioned in "/usr/include/sys/dktp/ dadkio.h". I need to know whether this IOCTL is public? I am not able to find any manual page for this. Also what is :"dad" driver? Thanks and Regards, Mannu. |