Unix Technical Forum

fssnap: ioctl: error 16: Device busy

This is a discussion on fssnap: ioctl: error 16: Device busy within the comp.unix.solaris forums, part of the Solaris Operating System category; --> Hello. On a Solaris 9 machine, I'm trying to create a UFS snapshot of my /var, /usr and /opt ...


Go Back   Unix Technical Forum > Unix Operating Systems > Solaris Operating System > comp.unix.solaris

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-26-2008, 09:14 AM
Michael Schmarck
 
Posts: n/a
Default fssnap: ioctl: error 16: Device busy

Hello.

On a Solaris 9 machine, I'm trying to create a UFS snapshot of my
/var, /usr and /opt filesystems. They all fail like this:

# fssnap -F ufs -o backing-store=/.backup/backing-stores/opt /opt
fssnap: ioctl: error 16: Device busy

Why do I get that error message? What's so busy, that a snapshot
cannot be created?

I read somewhere, that a running NTP daemon might cause this
problem - but there's no NTPd running on that box.

$ ps -ef | grep -v grep | grep ntp
$

I can create snapshots of other filesystems just fine:

$ fssnap -i
0 /export/home
1 /var/store
2 /u02
3 /u03
4 /u01
5 /

What's stopping me from creating snapshots of /opt, /usr and/or /var?

Thanks,
Michael
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-26-2008, 03:30 PM
Gary Mills
 
Posts: n/a
Default Re: fssnap: ioctl: error 16: Device busy

In <1650836.FqbS0PLNBR@michael-schmarck.my-fqdn.de> Michael Schmarck <michael.schmarck@here.la> writes:

>On a Solaris 9 machine, I'm trying to create a UFS snapshot of my
>/var, /usr and /opt filesystems. They all fail like this:


> # fssnap -F ufs -o backing-store=/.backup/backing-stores/opt /opt
> fssnap: ioctl: error 16: Device busy


>I read somewhere, that a running NTP daemon might cause this
>problem - but there's no NTPd running on that box.


The man page for fssnap_ufs mentions other conditions that might
prevent snapshots being taken. Look at the very end of the man page.
--
-Gary Mills- -Unix Support- -U of M Academic Computing and Networking-
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-26-2008, 04:28 PM
Darren Dunham
 
Posts: n/a
Default Re: fssnap: ioctl: error 16: Device busy

Michael Schmarck <michael.schmarck@here.la> wrote:
> Hello.
>
> On a Solaris 9 machine, I'm trying to create a UFS snapshot of my
> /var, /usr and /opt filesystems. They all fail like this:
>
> # fssnap -F ufs -o backing-store=/.backup/backing-stores/opt /opt
> fssnap: ioctl: error 16: Device busy
>
> Why do I get that error message? What's so busy, that a snapshot
> cannot be created?


fssnap locks the filesystem before the snapshot. If the lock fails, so
does the snap.

> I read somewhere, that a running NTP daemon might cause this
> problem - but there's no NTPd running on that box.
>
> $ ps -ef | grep -v grep | grep ntp
> $


NTP causes this issue because it normally runs in the realtime
scheduling class. And you can't lock devices that an RT process has
open. What do you get for this output?

$ ps -e -o 'pid,class,args' | grep ' RT '
304 RT /usr/lib/inet/xntpd
3073 TS grep RT

You may not have NTP running, but perhaps some other RT class is.

--
Darren Dunham ddunham@taos.com
Senior Technical Consultant TAOS http://www.taos.com/
Got some Dr Pepper? San Francisco, CA bay area
< This line left intentionally blank to confuse you. >
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 02-26-2008, 07:38 PM
Casper H.S. Dik
 
Posts: n/a
Default Re: fssnap: ioctl: error 16: Device busy

ddunham@taos.com (Darren Dunham) writes:

>NTP causes this issue because it normally runs in the realtime
>scheduling class. And you can't lock devices that an RT process has
>open. What do you get for this output?


I think it's actually the memory locking it does, not the RT class.

Casper
--
Expressed in this posting are my opinions. They are in no way related
to opinions held by my employer, Sun Microsystems.
Statements on Sun products included here are not gospel and may
be fiction rather than truth.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 02-27-2008, 02:26 AM
Darren Dunham
 
Posts: n/a
Default Re: fssnap: ioctl: error 16: Device busy

Casper H.S. Dik <Casper.Dik@sun.com> wrote:
> ddunham@taos.com (Darren Dunham) writes:
>
>>NTP causes this issue because it normally runs in the realtime
>>scheduling class. And you can't lock devices that an RT process has
>>open. What do you get for this output?

>
> I think it's actually the memory locking it does, not the RT class.


Darn. I was sure I'd personally tried this a long time ago. Sure
enough, I cannot get any other RT process to prevent the lock from
succeeding.

I wonder what I tested the first time...

--
Darren Dunham ddunham@taos.com
Senior Technical Consultant TAOS http://www.taos.com/
Got some Dr Pepper? San Francisco, CA bay area
< This line left intentionally blank to confuse you. >
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 02-27-2008, 12:19 PM
Michael Schmarck
 
Posts: n/a
Default Re: fssnap: ioctl: error 16: Device busy

Gary Mills <mills@cc.umanitoba.ca> wrote:

> The man page for fssnap_ufs mentions other conditions that might
> prevent snapshots being taken. Look at the very end of the man page.


I'm not seeing something there. Where should that be? Under NOTES?

There, I've got:

NOTES
The fssnap device files should be treated like a regular
disk block or character device.

The association between a file system and the snapshot is
lost when the snapshot is deleted or the system reboots.
Snapshot persistence across reboots is not currently sup-
ported.

To avoid unnecessary performance impacts, perform the
snapshot and system backup when the system is least active.

SunOS 5.9 Last change: 3 Jun 2002 6

Are you sure that the man page mentions something? If so, could you
please be so kind and paste the relevant section?

Thanks a lot,

Michael
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 02-27-2008, 12:19 PM
Michael Schmarck
 
Posts: n/a
Default Re: fssnap: ioctl: error 16: Device busy

Gary Mills <mills@cc.umanitoba.ca> wrote:

> The man page for fssnap_ufs mentions other conditions that might
> prevent snapshots being taken. Look at the very end of the man page.


I'm not seeing something there. Where should that be? Under NOTES?

[...]

It would have been nice, if you would've mentioned, that there's
nothing in the S9 man pages and that you're refering to the Solaris
10 man pages

Anyway, found something there now.

It is not possible to perform a snapshot of a file system if
any of the following conditions are true:

o The file system is in use by system accounting

o The file system contains a local swap file

o The file system is used as backing store by an
application that uses mlock(3C) to lock its pages.
Typically, these are real time applications, such
as xntpd(1M).

These conditions result in fssnap being unable to write lock
the file system prior to performing the snapshot.

How do I check, if the filesystems are in use by system accounting?

$ swap -l
swapfile dev swaplo blocks free
/dev/md/dsk/d1 85,1 16 4194800 4194800
/dev/dsk/c3t0d0s1 32,249 16 2105136 2105136

Ie. there's no local swap file on any of those filesystems.

How do I check if an application uses mlock to lock its pages?

Thanks a lot,

Michael
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 02-27-2008, 12:19 PM
Michael Schmarck
 
Posts: n/a
Default Re: fssnap: ioctl: error 16: Device busy

Darren Dunham <ddunham@taos.com> wrote:

> Michael Schmarck <michael.schmarck@here.la> wrote:
>> Hello.
>>
>> On a Solaris 9 machine, I'm trying to create a UFS snapshot of my
>> /var, /usr and /opt filesystems. They all fail like this:
>>
>> # fssnap -F ufs -o backing-store=/.backup/backing-stores/opt /opt
>> fssnap: ioctl: error 16: Device busy
>>
>> Why do I get that error message? What's so busy, that a snapshot
>> cannot be created?

>
> fssnap locks the filesystem before the snapshot. If the lock fails, so
> does the snap.


Thanks. Why does the lock fail? I suppose it fails, because some
application does mlock. How do I find out which application this is?

> NTP causes this issue because it normally runs in the realtime
> scheduling class. And you can't lock devices that an RT process has
> open. What do you get for this output?
>
> $ ps -e -o 'pid,class,args' | grep ' RT '
> 304 RT /usr/lib/inet/xntpd
> 3073 TS grep RT


$ ps -e -o 'pid,class,args' | grep ' RT '
1683 TS /opt/csw/bin/ggrep --colour=auto RT

# fssnap -F ufs -o backing-store=${bs_name} $dir
fssnap: ioctl: error 16: Device busy

> You may not have NTP running, but perhaps some other RT class is.


No.

Michael
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 03-01-2008, 12:19 PM
mr.bmonroe@gmail.com
 
Posts: n/a
Default Re: fssnap: ioctl: error 16: Device busy

On Feb 26, 10:07 pm, Michael Schmarck <michael.schma...@here.la>
wrote:

> > fssnap locks the filesystem before the snapshot. If the lock fails, so
> > does the snap.

>
> Thanks. Why does the lock fail? I suppose it fails, because some
> application does mlock. How do I find out which application this is?


Michael,

It won't be fun but you can use pmap -x pid

Try as root (not well tested...):

for pid in $(pgrep "")
do
pmap -x ${pid} 2>/dev/null | nawk '$1 == "total" exit $6}' ||
echo ${pid}
done

--Brett Monroe
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 11:19 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com