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

Re: [Bacula-devel] [Bacula-users] unmounting USB Stick after a job failed


there is no response from the users ....
can someone please help me?


> Thomas schrieb:
>> i think this happens because bacula releases the USB device
>> after the job.
>>
>> after the job i have this device state:
>> Device "BB-USB1" (/media/USB) is not open.
>> Configured device capabilities:
>> EOF BSR BSF FSR FSF EOM REM RACCESS !AUTOMOUNT LABEL !ANONVOLS ALWAYSOPEN
>> Device state:
>> !OPENED !TAPE !LABEL !MALLOC !APPEND !READ !EOT !WEOT !EOF !NEXTVOL !SHORT !MOUNTED
>>
>> so it is !MOUNTED, thats why the unmount do nothing.
>>
>>
>> first i have to mount the device again:
>>
>> *mount storage=USBStorageBB1
>> *status sd=JBBB
>>
>> Device "BB-USB1" (/media/USB) is not open.
>> Configured device capabilities:
>> EOF BSR BSF FSR FSF EOM REM RACCESS !AUTOMOUNT LABEL !ANONVOLS ALWAYSOPEN
>> Device state:
>> !OPENED !TAPE !LABEL !MALLOC !APPEND !READ !EOT !WEOT !EOF !NEXTVOL !SHORT MOUNTED
>>
>>
>> now i can successfully execute the unmount and remove the usb stick .....
>>
>> why is the device released after the job?
>> is there any way to avoid this?
>>
>>
>>
>>
>>
>> Thomas schrieb:
>>> Hi List,
>>>
>>>
>>> the usb stick is connected to the host and i issue a mount command:
>>> *mount
>>> The defined Storage resources are:
>>>       1: JBGS
>>>       2: JBBB
>>>       3: FileStorageBB
>>>       4: USBStorageBB1
>>> Select Storage resource (1-4): 4
>>> 3002 Device "BB-USB1" (/media/USB) is mounted.
>>>
>>> root# mount | grep USB
>>> /dev/sda1 on /media/USB type vfat (rw,noexec,nosuid,nodev)
>>> root#
>>>
>>> this works as expected. now the unmount
>>>
>>>
>>> *umount
>>> The defined Storage resources are:
>>>       1: JBGS
>>>       2: JBBB
>>>       3: FileStorageBB
>>>       4: USBStorageBB1
>>> Select Storage resource (1-4): 4
>>> 3002 Device "BB-USB1" (/media/USB) unmounted.
>>> *
>>>
>>> root# mount | grep USB
>>> root#
>>>
>>> also ok.
>>>
>>> now i start a job on this storage,
>>> this stick is mounted automatically by bacula,
>>> and the job terminates with ok.
>>> after the job i will remove the usb stick and send an unmount command
>>>
>>> *unmount
>>> The defined Storage resources are:
>>>       1: JBGS
>>>       2: JBBB
>>>       3: FileStorageBB
>>>       4: USBStorageBB1
>>> Select Storage resource (1-4): 4
>>> 3002 Device "BB-USB1" (/media/USB) unmounted.
>>> *
>>>
>>> the "mount" shows me that the stick is still mounted:
>>> root# mount | grep USB
>>> /dev/sda1 on /media/USB type vfat (rw,noexec,nosuid,nodev)
>>> root#
>>>
>>> i cannot unmount the stick anymore.
>>>
>>> debug from successful unmount:
>>>
>>> backup-sd-bb: dircmd.c:217-0 <dird: unmount BB-USB1 drive=-1
>>> backup-sd-bb: dircmd.c:231-0 Do command: unmount
>>> backup-sd-bb: mem_pool.c:119-0 sm_get_pool_memory reuse 5733f8 to ../lib/mem_pool.h:90
>>> backup-sd-bb: dircmd.c:584-0 Found device BB-USB1
>>> backup-sd-bb: dircmd.c:624-0 Found device BB-USB1
>>> backup-sd-bb: block.c:133-0 Returning new block=5734e0
>>> backup-sd-bb: mem_pool.c:119-0 sm_get_pool_memory reuse 5850f8 to record.c:202
>>> backup-sd-bb: acquire.c:632-0 JobId=0 enter attach_dcr_to_dev
>>> backup-sd-bb: dev.c:2033-0 Enter unmount
>>> backup-sd-bb: mem_pool.c:119-0 sm_get_pool_memory reuse 5847c8 to ../lib/mem_pool.h:91
>>> backup-sd-bb: mem_pool.c:119-0 sm_get_pool_memory reuse 584988 to ../lib/mem_pool.h:91
>>> backup-sd-bb: dev.c:2206-0 edit_mount_codes: /bin/umount %a
>>> backup-sd-bb: dev.c:2250-0 add_str /
>>> backup-sd-bb: dev.c:2252-0 omsg=/
>>> backup-sd-bb: dev.c:2250-0 add_str b
>>> backup-sd-bb: dev.c:2252-0 omsg=/b
>>> backup-sd-bb: dev.c:2250-0 add_str i
>>> backup-sd-bb: dev.c:2252-0 omsg=/bi
>>> backup-sd-bb: dev.c:2250-0 add_str n
>>> backup-sd-bb: dev.c:2252-0 omsg=/bin
>>> backup-sd-bb: dev.c:2250-0 add_str /
>>> backup-sd-bb: dev.c:2252-0 omsg=/bin/
>>> backup-sd-bb: dev.c:2250-0 add_str u
>>> backup-sd-bb: dev.c:2252-0 omsg=/bin/u
>>> backup-sd-bb: dev.c:2250-0 add_str m
>>> backup-sd-bb: dev.c:2252-0 omsg=/bin/um
>>> backup-sd-bb: dev.c:2250-0 add_str o
>>> backup-sd-bb: dev.c:2252-0 omsg=/bin/umo
>>> backup-sd-bb: dev.c:2250-0 add_str u
>>> backup-sd-bb: dev.c:2252-0 omsg=/bin/umou
>>> backup-sd-bb: dev.c:2250-0 add_str n
>>> backup-sd-bb: dev.c:2252-0 omsg=/bin/umoun
>>> backup-sd-bb: dev.c:2250-0 add_str t
>>> backup-sd-bb: dev.c:2252-0 omsg=/bin/umount
>>> backup-sd-bb: dev.c:2250-0 add_str
>>> backup-sd-bb: dev.c:2252-0 omsg=/bin/umount
>>> backup-sd-bb: dev.c:2250-0 add_str /media/USB
>>> backup-sd-bb: dev.c:2252-0 omsg=/bin/umount /media/USB
>>> backup-sd-bb: mem_pool.c:230-0 free_pool_memory 584988 pool=2 from ../lib/mem_pool.h:92
>>> backup-sd-bb: dev.c:2066-0 do_mount: cmd=/bin/umount /media/USB mounted=1
>>> backup-sd-bb: dev.c:2077-0 do_mount run_prog=/bin/umount /media/USB
>>>
>>>
>>>
>>> the failed unmount after a job has run:
>>>
>>>
>>> backup-sd-bb: dircmd.c:217-0 <dird: unmount BB-USB1 drive=-1
>>> backup-sd-bb: dircmd.c:231-0 Do command: unmount
>>> backup-sd-bb: mem_pool.c:119-0 sm_get_pool_memory reuse 588628 to ../lib/mem_pool.h:90
>>> backup-sd-bb: dircmd.c:584-0 Found device BB-USB1
>>> backup-sd-bb: dircmd.c:624-0 Found device BB-USB1
>>> backup-sd-bb: block.c:133-0 Returning new block=58a9e0
>>> backup-sd-bb: mem_pool.c:119-0 sm_get_pool_memory reuse 58a588 to record.c:202
>>> backup-sd-bb: acquire.c:632-0 JobId=0 enter attach_dcr_to_dev
>>> backup-sd-bb: dev.c:2033-0 Enter unmount
>>> backup-sd-bb: acquire.c:643-0 Enter detach_dcr_from_dev
>>> backup-sd-bb: block.c:170-0 free_block buffer 574120
>>> backup-sd-bb: mem_pool.c:230-0 free_pool_memory 574108 pool=0 from block.c:171
>>> backup-sd-bb: block.c:172-0 free_block block 58a9e0
>>> backup-sd-bb: mem_pool.c:230-0 free_pool_memory 58a9c8 pool=0 from block.c:173
>>> backup-sd-bb: record.c:221-0 Enter free_record.
>>> backup-sd-bb: mem_pool.c:230-0 free_pool_memory 58a588 pool=3 from record.c:223
>>> backup-sd-bb: record.c:225-0 Data buf is freed.
>>> backup-sd-bb: mem_pool.c:230-0 free_pool_memory 583d58 pool=0 from record.c:226
>>> backup-sd-bb: record.c:227-0 Leave free_record.
>>> backup-sd-bb: mem_pool.c:230-0 free_pool_memory 588628 pool=1 from ../lib/mem_pool.h:92
>>> backup-sd-bb: jcr.c:417-0 Enter free_jcr 0x587e18 from dircmd.c:249
>>> backup-sd-bb: jcr.c:434-0 Dec free_jcr 0x587e18 use_count=0 jobid=0
>>> backup-sd-bb: jcr.c:295-0 Enter remove_jcr
>>> backup-sd-bb: jcr.c:300-0 Leave remove_jcr
>>> backup-sd-bb: jcr.c:446-0 End job=0
>>> backup-sd-bb: job.c:345-0 stored_free_jcr JobId=0
>>> backup-sd-bb: message.c:416-0 Close_msg jcr=587e18
>>> backup-sd-bb: mem_pool.c:230-0 free_pool_memory 5725a8 pool=2 from jcr.c:374
>>> backup-sd-bb: mem_pool.c:230-0 free_pool_memory 583eb8 pool=3 from bsock.c:820
>>> backup-sd-bb: mem_pool.c:230-0 free_pool_memory 584328 pool=3 from bsock.c:826
>>> backup-sd-bb: mem_pool.c:230-0 free_pool_memory 5721a8 pool=3 from jcr.c:383
>>> backup-sd-bb: message.c:416-0 Close_msg jcr=0
>>>
>>>
>>> my usb-device:
>>> Device {
>>>    Name = BB-USB1
>>>    Device Type = File
>>>    Media Type = USBStick
>>>    Archive Device = /media/USB
>>>    LabelMedia = yes;                   # lets Bacula label unlabeled media
>>>    Random Access = yes;
>>>    AutomaticMount = no;               # when device opened, read it
>>>    RemovableMedia = yes;
>>>    AlwaysOpen = no;
>>>    Requires Mount = yes
>>>    Mount Point = /media/USB
>>>    Mount Command = "/bin/mount %a"
>>>    Unmount Command = "/bin/umount %a"
>>> }
>>>
>>>
>>>
>>> what went wrong?
>>>
>>> Regards
>>>
>>> Thomas
>>>
> 

-- 
[:O]###[O:]

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Bacula-devel mailing list
Bacula-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/bacula-devel


This mailing list archive is a service of Copilotco.