In the past I would shut down the Pi and then unplug it, but now have another application
running on the Pi as well so looking how to safely remove the HDD
while the RPi is running, but when I run the command to detach I get error

Here is some info:
Code: Select all
lsmod
fuse 69333 1
snd_bcm2835 16304 0
snd_usb_audio 104097 0
snd_pcm 77560 2 snd_bcm2835,snd_usb_audio
snd_page_alloc 5145 1 snd_pcm
snd_hwdep 5929 1 snd_usb_audio
snd_usbmidi_lib 18067 1 snd_usb_audio
snd_seq_midi 4591 0
snd_seq_midi_event 6544 1 snd_seq_midi
snd_rawmidi 21160 2 snd_usbmidi_lib,snd_seq_midi
snd_seq 53329 2 snd_seq_midi_event,snd_seq_midi
snd_timer 19998 2 snd_pcm,snd_seq
snd_seq_device 6438 3 snd_seq,snd_rawmidi,snd_seq_midi
snd 58447 9 snd_bcm2835,snd_usb_audio,snd_hwdep,snd_timer,snd_pcm,snd_seq,snd_rawmidi,snd_usbmidi_lib,snd_seq_device
rc_pinnacle_pctv_hd 991 0
em28xx_rc 6094 0
evdev 9426 3
uvcvideo 68510 1
videobuf2_core 26995 1 uvcvideo
videobuf2_vmalloc 2425 1 uvcvideo
videobuf2_memops 2584 1 videobuf2_vmalloc
tda18271 36660 1
cxd2820r 20350 1
em28xx_dvb 15151 0
rc_it913x_v1 1173 0
em28xx 86093 2 em28xx_dvb,em28xx_rc
v4l2_common 9514 1 em28xx
videodev 104342 5 uvcvideo,em28xx,v4l2_common,videobuf2_core
media 13424 2 uvcvideo,videodev
videobuf_vmalloc 5358 1 em28xx
videobuf_core 20459 2 videobuf_vmalloc,em28xx
tveeprom 11605 1 em28xx
leds_gpio 2235 0
led_class 3562 1 leds_gpio
it913x_fe 31012 1
dvb_usb_it913x 12344 0
dvb_usb 17773 1 dvb_usb_it913x
dvb_core 97781 3 em28xx_dvb,dvb_usb,cxd2820r
rc_core 16540 7 dvb_usb,rc_it913x_v1,em28xx_rc,dvb_usb_it913x,rc_pinnacle_pctv_hd
Code: Select all
ls /dev/sd*
Code: Select all
sudo blkid
/dev/mmcblk0p2: UUID="41cd5bca-7a62-4952-b8e8-02c43aabb1d9" TYPE="ext4"
/dev/sda1: LABEL="2TB" UUID="68EC102FAC3FD312" TYPE="ntfs"
Code: Select all
sudo fdisk -l
4 heads, 16 sectors/track, 488672 cylinders, total 31275008 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000c7b31
Device Boot Start End Blocks Id System
/dev/mmcblk0p1 8192 122879 57344 c W95 FAT32 (LBA)
/dev/mmcblk0p2 122880 31275007 15576064 83 Linux
Disk /dev/sda: 2000.4 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 cylinders, total 3907029168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xaecf7683
Device Boot Start End Blocks Id System
/dev/sda1 2048 3907026943 1953512448 7 HPFS/NTFS/exFAT
Code: Select all
sudo mount|grep ^'/dev'
/dev/mmcblk0p1 on /boot type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=cp437,iocharset=ascii,shortname=mixed,errors=remount-ro)
/dev/sda1 on /media/2TB type fuseblk (rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other,blksize=4096)
This is the error message I get:
Code: Select all
sudo udisks --unmount /dev/sda1 && udisks --detach /dev/sda
USB device: /sys/devices/platform/bcm2708_usb/usb1/1-1/1-1.3/1-1.3.6)
SYNCHRONIZE CACHE: FAILED: No such file or directory
(Continuing despite SYNCHRONIZE CACHE failure.)
STOP UNIT: FAILED: No such file or directory
I have run eject command as well, but got another error msg:
Code: Select all
sudo eject /dev/sda1
So is it safe to unplug the USB Disk?