You are not logged in.

#1 2017-04-27 00:24

cjoliprsf
Member
Registered: 2017-04-23
Posts: 71

USB memory sticks and hard disk

Hello again...
About USB removable memory devices.
When I use a USB memory stick, an icon appears on the board and this has an option to safely remove the device. This is fine.
However, if I use a USB hard disk, such an icon never appears. There doesn't seem to be an easy way to safely remove the drive. And in particular this drive has many partitions. I don't see any other way than unmounting each partition individually before removing the drive.
Is there another way?
Thanks, Claude

Offline

#2 2017-04-27 10:27

Dai_trying
Member
From: UK
Registered: 2015-12-14
Posts: 2,989

Re: USB memory sticks and hard disk

I use an external HDD for backups and have also noticed this, I think it is due to it being seen as a HDD and not a usb stick and is mounted by the system accordingly. I don't think the system would normally allow hot-plugging HDD's so manually unmounting drives before unplugging is the only way I can see to safely remove the device. Not much help I know, but the only way I could think of to change this would involve creating a udev rule to select only that device and use different mounting options which might allow it to be displayed as a usb device and therefore displayed in the task bar and have a sefely remove option. I have not tried doing this but it's what I would try.

Offline

#3 2017-04-27 11:23

q4osteam
Q4OS Team
Registered: 2015-12-06
Posts: 4,230
Website

Re: USB memory sticks and hard disk

We are not able to reproduce, connected external USB harddisk WD/1TB, icon appeared, disk was mounted on click, all worked fine. Anyway, this is a real issue, as it was reported before by other users as well. As it appears to be a hardware dependent issue, we would ask everybody who noticed it to provide some more detailed info. Please post the type of disk and output of command 'lsusb' in terminal after plugging the disk.

Offline

#4 2017-04-27 13:37

Dai_trying
Member
From: UK
Registered: 2015-12-14
Posts: 2,989

Re: USB memory sticks and hard disk

Mine is a WD Elements External Drive although I removed the 2TB SATA HDD and used that in another machine, I now just use this one for backups with a 160Gb (149Gb reported) drive. This disk might have grub installed to the mbr as I cannot remember the procedure I used when formatting. I have all data on this backed up elsewhere so if you would like me to test with different format options I could do that.

The drive is shown in lsusb

Bus 001 Device 008: ID 1058:1021 Western Digital Technologies, Inc. Elements Desktop (WDBAAU)

And lsblk

sdb       8:16   0   149G  0 disk 
└─sdb1    8:17   0   149G  0 part 

And sudo blkkid (id removed)

/dev/sdb1: LABEL="NewData" UUID="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" TYPE="ext4" PARTUUID="xxxxxxxx-xx"

It does not appear in the taskbar but does appear in my storage devices under the name NewData and is mounted under /media/dai/NewData. I have had no issues with this and apart from it not apearing as a usb removable device everything else appears to be ok.

Offline

#5 2017-04-27 15:06

cjoliprsf
Member
Registered: 2017-04-23
Posts: 71

Re: USB memory sticks and hard disk

I have 2 here (and more in another location - so I can do more tests in a few days if it may help.)

1st is a LaCie 1T. This is a clone of my Windows 8.1 system disk, and has many partitions including some that are hidden (recovery for example, and a small boot partition for EFI). Upon hot plugging, 3 partitions show-up in 3 Konqueror windows, which is OK.
If I open "My computer", storage media, I also see the other partitions as unmounted.

lsusb gives the following output for it
Bus 008 Device 003: ID 059f:106a LaCie, Ltd


2nd is a Seagate 1T that has 2 partitions, a small booting partition with some utilities (this disk may be used as a rescue disk), and a main partition for backups. Both appear in Konqueror windows upon hot plugging.

lsusb gives the following output for it
Bus 008 Device 004: ID 0bc2:ab24 Seagate RSS LLC


And while we are on the subject of USB devices...
I notice that if there are 2 usb memory sticks, then there appears 2 icons on the task bar, one for each. This isn't very handy: if I wish to remove one of the devices, I need to click the first, check if this is the device I want to remove, and eventually click on the second to remove it.
It would be much handier if there was only one icon, and upon cliking it, both (or more if the case) devices would show in a menu - we could then select the one that is to be removed.
Claude

Last edited by cjoliprsf (2017-04-27 15:08)

Offline

#6 2017-04-27 15:13

q4osteam
Q4OS Team
Registered: 2015-12-06
Posts: 4,230
Website

Re: USB memory sticks and hard disk

Dai_trying wrote:

I have all data on this backed up elsewhere so if you would like me to test with different format options I could do that.

Yes, it would be helpful. Please wipe data out and format disk as ext4 ( and vfat as a second attempt ), then try to plug it in. Please double check the drive sdX is the correct external device.
$ sudo dd if=/dev/zero of=/dev/sdX count=10000

EDIT: create a partition using cfdisk or gparted
$ sudo cfdisk /dev/sdX

$ sudo mkfs.ext4 /dev/sdX1
$ sudo mkfs.vfat /dev/sdX1

EDIT2: fixed device to be numbered correctly

Last edited by q4osteam (2017-04-27 16:22)

Offline

#7 2017-04-27 16:18

Dai_trying
Member
From: UK
Registered: 2015-12-14
Posts: 2,989

Re: USB memory sticks and hard disk

Ok, I started with

dai@scorpionmain:~$ sudo dd if=/dev/zero of=/dev/sdb count=10000
10000+0 records in
10000+0 records out
5120000 bytes (5.1 MB, 4.9 MiB) copied, 0.914238 s, 5.6 MB/s

Then used cfdisk to create the partition table (only) with sudo cfdisk /dev/sdb (no cli output)
Next I formatted to ext4

dai@scorpionmain:~$ sudo mkfs.ext4 /dev/sdb
mke2fs 1.43.4 (31-Jan-2017)
Creating filesystem with 39072000 4k blocks and 9773056 inodes
Filesystem UUID: db09902f-b73f-42be-9880-8685b13b5f82
Superblock backups stored on blocks: 
	32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 
	4096000, 7962624, 11239424, 20480000, 23887872

Allocating group tables: done                            
Writing inode tables: done                            
Creating journal (262144 blocks): done
Writing superblocks and filesystem accounting information: done

I noticed this used the whole disk and does not result in a numerial index (ie sdb1) I don't know if this is usual but continued to format to vfat (I had to use the -I switch to force it to use whole partition)

dai@scorpionmain:~$ sudo mkfs.vfat -I /dev/sdb
mkfs.fat 4.1 (2017-01-24)
attribute "partition" not found

I then unplugged the disk and re-plugged it. I had the usual new medium detected popup and the device shows in Storage Media, but not in taskbar.
I checked the format of the volume and it is vfat.

Last edited by Dai_trying (2017-04-27 16:19)

Offline

#8 2017-04-27 16:22

q4osteam
Q4OS Team
Registered: 2015-12-06
Posts: 4,230
Website

Re: USB memory sticks and hard disk

Dai_trying wrote:

I noticed this used the whole disk and does not result in a numerial index (ie sdb1) I don't know if this is usual ...

Incorrect instructions, sorry for that. The correct way is to format /dev/sdX1, so:
$ sudo mkfs.ext4 /dev/sdX1
$ sudo mkfs.vfat /dev/sdX1

Offline

#9 2017-04-27 16:51

Dai_trying
Member
From: UK
Registered: 2015-12-14
Posts: 2,989

Re: USB memory sticks and hard disk

I am getting an error The file /dev/sdb1 does not exist and no size was specified., maybe I should create the partition with cfdisk when I create the table??

Last edited by Dai_trying (2017-04-27 16:51)

Offline

#10 2017-04-27 17:01

q4osteam
Q4OS Team
Registered: 2015-12-06
Posts: 4,230
Website

Re: USB memory sticks and hard disk

Dai_trying wrote:

... maybe I should create the partition with cfdisk when I create the table??

Yes, please repeat the procedure once again, we have fixed original instructions.

Offline

#11 2017-04-27 17:11

Dai_trying
Member
From: UK
Registered: 2015-12-14
Posts: 2,989

Re: USB memory sticks and hard disk

I think I found my problem, in cfdisk I was pressing "y" to make the changes and i should type "yes" and didn't notice the bottom line said device was "not" written to!
Anyway I completed the procedure and device still not showing in taskbar but is showing in storage media
lsblk output

sdb       8:16   0   149G  0 disk 
└─sdb1    8:17   0   149G  0 part 

Offline

#12 2017-04-27 17:30

Dai_trying
Member
From: UK
Registered: 2015-12-14
Posts: 2,989

Re: USB memory sticks and hard disk

Just as an experiment I wrote an iso to /dev/sdb to see if it would be seen as a usb stick, but after writing and re-plugging it still shows in storage media only.

Offline

#13 2017-04-27 17:41

q4osteam
Q4OS Team
Registered: 2015-12-06
Posts: 4,230
Website

Re: USB memory sticks and hard disk

@Dai_trying
Ok, thanks for the info. We will query TDE developers for possible causes and post results here.

Offline

#14 2017-04-27 17:48

cjoliprsf
Member
Registered: 2017-04-23
Posts: 71

Re: USB memory sticks and hard disk

Dai_trying wrote:

Just as an experiment I wrote an iso to /dev/sdb to see if it would be seen as a usb stick, but after writing and re-plugging it still shows in storage media only.

Different here...
I have a usb stick with the Mint CD iso image, and upon hot booting (edit - I meant plugging here), 2 icons appear on the taskbar (checking, there are 2 partitions on the stick), 2 windows open for the file manager, but on one he says he can't mount it.
The eject command doesn't work properly however - if pressed on one of the icons, it should unmount and clear both partitions, which it doesn't do.
Claude

Last edited by cjoliprsf (2017-04-27 20:25)

Offline

#15 2017-04-27 19:34

Dai_trying
Member
From: UK
Registered: 2015-12-14
Posts: 2,989

Re: USB memory sticks and hard disk

I also tried the Mint iso and had the same two partitions (only one that was mountable) but it was still only seen in Storage Media, I'm guessing it must be down to hardware (the external device), or possibly the difference between Orion and Scorpion (I'm using Scorpion). I'm going to check what Debian (Stretch) Xfce does and how it mounts them to see if it has the same (or similar) behaviour (I wasn't taking much notice when I last used it there.).

Offline

Board footer

Powered by FluxBB