Menu

#276 /dev/sda is busy. Some partition is mounted

testing_clonezilla
open
None
5
2017-11-30
2017-07-07
Mircea Dan
No

i have 1 ssd or hdd in the setup and i plug the usb stick to restore the image using clonezilla live (look at issue 254, 274 and othe rlogged by me is the same exact hardware/setup)
using clonezilla-live-20170626-zesty-i386.iso

what is noticed was that the USB stick got the sda assigned to it and the drive installed in the computer got sdb assigned to it.

this was not happening when i was using clonezilla-live-20161010-xenial-i386.iso
nothing changed except i switche dto new clonezilla-live

Activating the partition info in /proc... done!
Failed to stop mkswapfile.service: Unit mkswapfile.service not loaded
Shutting down the Logical Volume Manager
Shuting down volume group: vg_01
Finished shutting down the logical volume manager
Creating partition in /dev/sda...
/dev/sda is busy. some partition mounted


/dev/sda1 on /lib/live/mount/medium type ntfs (ro,noatime,uit=0,gid=0,fmask=0177,dmask=077,nls=utf8,error=continue,mft+zone_multiplier=1)


you have to unmount them first. Or you can choose '-k' to skip partition recreation when you start clonezilla!
Program terminate!.
Press enter to continue ...

the command i use to create the usb stick image:

sudo ocs-live-dev --debian-iso clonezilla-live-20170626-zesty-i386.iso --create-release --bg-mode text --ocs-live-batch --batch-mode --ocs-live-language en_US.UTF-8 --ocs-live-keymap NONE \
--extra-param "--load-geometry-from-edd --dump-mbr-in-the-end --clone-hidden-data --check-md5sum -scr --nogui --batch --postaction reboot restoredisk $CLZ_IMAGE_NAME sda" $CLZ_IMAGE_NAME

Discussion

  • Steven Shiau

    Steven Shiau - 2017-07-23
     
  • Steven Shiau

    Steven Shiau - 2017-07-23

    Different Linux kernel might detect and give device name with different orders. I believe that's the reason why you have this issue. In the fugure we should have a better way to address this issue. We will think about how to make it. Thanks.

    Steven

     
  • Mircea Dan

    Mircea Dan - 2017-08-18

    ok so this is realy bad, i tried it multiple times, with the 2016 version it was always HDD-ssd is sda and the usb stick is sdb very consistent and predictable
    now it's all over the place i reimage multiple computers (5 dif types) and sometimes is hdd-ssd/sda usb/sdb and sometimes is usb/sda and hdd-ssd/sdb basicaly i cannot have one usb stick image with clonezila live that i can use consitentley and reimage stuff

     
  • Steven Shiau

    Steven Shiau - 2017-08-31

    Yes, this is really a pain. The Linux kernel detects the hardware randomly so it's hard to fix the device name. We should provide a solution for this. like using the device path name (e.g., pci-0000:00:10.0-scsi-0:0:0:0). However, it's really ugly and not easy to remember. If you have any better suggestion, please let us know. Thanks.

    Steven

     
  • Mircea Dan

    Mircea Dan - 2017-11-30

    so far i'm using clonezilla-live-20161010-xenial-i386.iso this has a predictible behaviour, but this prevent me from takeing newer images to get all the fixes made in the last year or so.

    being ugly is not realy a concern since for me everything is fully automated, insert the usb stick boot from it and image is being deployed.

    now what i do in my cleanup script to go around this problem i filter out any usb storage device.
    and i store just the disk drives (have not tested on PCIE drives, tested just with SATA drives)

    sda1 sda2 is the best solution and you should not have to write some overcomplicated code to handle the kernel inconsitency, i hope you can find a kernel that works, so you dont have to do any change.

    DEV1=""
    DEV2=""
    
    while read Path ID
    do
        if grep -q '/usb[0-9]*/' <<< $Path; then
            echo -ne "\n\n(Device /dev/$ID is not an ATA device, but a USB device [e. g. a pen drive])"
        else
            eval "DEV${count}=\$ID"
            ((count++))
        fi
    done < <(ls -l /sys/block/sd* \
    | sed -e 's^.*-> \.\.^/sys^' \
          -e 's^/host[0-9]\{1,2\}/target\([0-9]\{1,2\}\(:[0-9]\)\{2,3\}/\)\{1,2\}block/^ ^')
    
     

Log in to post a comment.

MongoDB Logo MongoDB