USB storage - can see it, but how do I access it???

Hopefully this is a real easy one. I just added a 500GB Buffalo USB storage device to my system - SUSE 12.3 64bit fully updated. I can see the USB hard drive in KInfocenter, but I have no clue on how to get at it. I was expecting it to come up as a plug in device when I plugged it in, but it did not. Hoping I’ll be able to get an icon on my desktop for it and start using it.

Any pointers would be greatly appreciated. My first USB storage device…

Regards – Roger

On 2014-09-18 04:06, rogerh113 wrote:
>
> Hopefully this is a real easy one. I just added a 500GB Buffalo USB
> storage device to my system - SUSE 12.3 64bit fully updated. I can see
> the USB hard drive in KInfocenter, but I have no clue on how to get at
> it. I was expecting it to come up as a plug in device when I plugged it
> in, but it did not. Hoping I’ll be able to get an icon on my desktop
> for it and start using it.

Is it (partitioned)formatted? If so, what filesystem?


Cheers / Saludos,

Carlos E. R.
(from 13.1 x86_64 “Bottle” at Telcontar)

I don’t know - how do I check?? I bought it used and wiped - perhaps not formatted. Kinfocenter just indicates name, size, and USB. As you might have guessed by now, I am not a superuser…

Regards – Roger

If it is not formatted it won’t automount. No file system no mount of a file system.

You need to format it. If you don’t have root permissions you need to use a bootable CD/DVD then use that to format the drive. If you plan to use it for Windows and Linux best to format it with NTFS I guess. If used as a backup for Linux format it with a Linux file system such as ext4

If you have root permission then use Yast to format it.

Well, I downloaded gparted, and partition and file system are unallocated. Thanks for your observation -spot on!!

I know little about partitions and formatting. The drive will be used entirely with Linux, and I expect to use it only for storage such as photos my wife takes, and maybe some short term storage of sports streams (rather than booting or anything else). I you have a suggestion on how I should optimally set this up I would appreciate it. Don’t know if partitions benefit utilization or are only for file isolation or protection. I realize partitioning is probably a complex topic, but I am hoping there is a simple answer for my simple application.

Regards – Roger

It is not complicated you just need to select the format to use and the partitioning software does the rest. You do need to choose a mount point if you plan to have it mounted at boot. But you should not need that if you plan to plug it in after boot. If you have an exact question ask here someone will help

Thanks. Couple of questions.

What is the most foolproof tool for me to use - gparted or another? I think gparted only offered me windows format before I backed out.

Is there a benefit to using FAT if I am just on linux, or does another format provide more flexibility?

Is there any downside to partitioning it as just one bit 500gb chunk? If this is not optimal, recommended size partitions

Thanks – Roger

On Thu, 18 Sep 2014 03:46:01 +0000, rogerh113 wrote:

> What is the most foolproof tool for me to use - gparted or another? I
> think gparted only offered me windows format before I backed out.

If the system already has Linux on it, use YaST’s partitioner - just be
careful (whatever tool you use) not to delete any partition definition
data on your system drives.

> Is there a benefit to using FAT if I am just on linux, or does another
> format provide more flexibility?

You can use FAT if you want to use the drive with a Windows box as well,
but you will not get any permissions on the Linux side (because FAT
doesn’t know anything about *nix ownerships, groups, or permissions).

Jim


Jim Henderson
openSUSE Forums Administrator
Forum Use Terms & Conditions at http://tinyurl.com/openSUSE-T-C

Try this: SDB:Basics of partitions, filesystems, mount points - openSUSE Wiki

And when you want to use it only on Linux, I would use a Linux file system (e.g. ext4). No need to complicate things with using non-Linux elements in your nice Linux system :slight_smile:

On 2014-09-18 04:46, rogerh113 wrote:
>
> I don’t know - how do I check?? I bought it used and wiped - perhaps
> not formatted. Kinfocenter just indicates name, size, and USB. As you
> might have guessed by now, I am not a superuser…

Well, when you buy a new disk you have to format it; some models may come formatted for Windows.
Usb sticks use FAT, but some come with exFAT, which is not supported in Linux. Or they may come with NTFS.

you have first to verify what your hard disk has.
If it is formatted for Windows, then you have to decide whether to keep that or not.

Please run this command in a terminal:


lsblk --output NAME,FSTYPE,LABEL,UUID,PARTLABEL,PARTUUID,MOUNTPOINT,SIZE

and paste it all here, from initial command prompt, to last command prompt, in a single mouse sweep, and please do so inside code tags (the ‘#’ button in the forum editor).
http://susepaste.org/images/15093674.jpg

Wait, you said that you bought it used, not new? Then I’d certainly format it.
Also, I’d verify it as well. You have to run “smartctl -a /dev/sdX” on it; paste the result here for us to analyze.
What the ‘X’ is you can find out from the previous command run - huh, sorry, I’m to tired to explain details, I’m off to bed.
Somebody else can take over and guide you :slight_smile:

Ideas/tools:

Palimpsest (gnome-disk-utility)
gparted.


Cheers / Saludos,

Carlos E. R.
(from 13.1 x86_64 “Bottle” at Telcontar)

On 2014-09-18 05:46, rogerh113 wrote:
>
> Thanks. Couple of questions.
>
> What is the most foolproof tool for me to use - gparted or another? I
> think gparted only offered me windows format before I backed out.

I prefer gparted, but yast is another good tool.

Why not yast? Well, because it reads all disks, while with parted you
point it to a single disk. And, yast will normally add an entry on
fstab, which maybe you do not want on an external disk.

gparted supports certainly more things than windows format. It may
suggest Windows formats if the disk is already partitioned or formatted
for Windows.

You probably will want to create new partition table, or at least a
partition entry of Linux type.

Don’t forget to add a “label” or name to each filesystem you create. In
gparted you do that as a second step. On yast you do that inside fstab
options or extra options or similar name.

> Is there a benefit to using FAT if I am just on linux, or does another
> format provide more flexibility?

If you are going to use it only on Linux, do not use fat, ntfs, and
certainly not exfat. The advantage of fat is only if you intend to share
the disk with Windows computers.

For instance, if you intend to connect the disk to your TV to watch a
movie, you will probably need FAT (my multimedia center uses ext2).

On the other hand, FAT does not support files bigger than 2 GiB (or was
it 4?). It is a problem for movies. In that case you have to use NTFS
(for sharing).

And then, all windows type formats use, obviously, windows conventions.
It is specially problematic for permissions, but also for symlinks
(needed on /home and others).

> Is there any downside to partitioning it as just one bit 500gb chunk?
> If this is not optimal, recommended size partitions

If you are going to use it for “data” storage, use a single partition.
EXT4 is just fine. Personally, I use XFS.

There are reasons to use multiple or single partitions, of course. For
your use case, I would use single partition.

Note: If you go with a Linux type format, you will need to add a single
directory, belonging to your user. You will need to do that as root. Put
all your files inside. Otherwise, the system will tell you that you have
no permissions to write on your disk (because it belongs to ‘root’).

Note 2: the smartctl run I suggested will tell you how old your disk is,
amongst other things.


Cheers / Saludos,

Carlos E. R.
(from 13.1 x86_64 “Bottle” at Telcontar)

Well, not a useful result from either command (run as su)

lsblk --output NAME,FSTYPE,LABEL,UUID,PARTLABEL,PARTUUID,MOUNTPOINT,SIZE came back with lsblk: unknown column: PARTLABEL,PARTUUID,MOUNTPOINT,SIZE

smartctl -a /dev/sdX returned Smartctl open device: /dev/sdX failed: No such device

I think with all of the info provided, I can probably get this done. It would be useful to run a disk utility on it to check it out.
It sounds like ntfs might be optimal for me as far as providing the most flexibility with regards to any future interfaces.

Regards – Roger

Just for clarification, how does ext4 compare with NTFS for my application. I really do doubt I will go out of the linux world with this computer.

Sorry if I am making this overcomplicated, but I want to do it right - once. Once the wife starts loading photos on this thing, there will be no going back…

Thanks – Roger

Formatted the disk to ext4 with one partition - no problems with that.

There is a file in there called ‘lost and found’ - what is that, and how do I get rid of it?? I assume it is an artifact from the prior owner??

I cannot write to the disk - is this a permissions issue, or did I set it up wrong?

Thanks – Roger

It is very simple. Linux file system types are made for Linux.

MS-DOS (and friends) file sytems types are not. However because many people are unable to refrain from interfacing with those type of system and because MicroSoft never will create an interface to Linux file system types, the Linux world did the reverse: they created the possibility to use MicroSoft file system types. However, this only functions as far as both categories have the same features. So on Linux, some (important) things like seeing the directory structure and reading/writing files do function. But ownership by user/group and the permission bits do not. Other functionality available in Linux like checking the file systems (at boot or at will) and being able to repair them are not realy avalable for non-Linux file systems. After all, using a MicroSoft file system implies that the user has access to a MicroSoft systems to do the checking/maintenance. It is only an interface to a another world. To be used only for exchanging files with the MicroSoft world and vv. Not to be used as a day to day file system in Linux.

You questions is to me a bit like: I changed my car from brand A to B because I think it is safer and better. Do you advice me to use wheels of brand A or of brand B under it? :wink:

On 2014-09-18 16:26, rogerh113 wrote:
>
> Well, not a useful result from either command (run as su)
>
> lsblk --output NAME,FSTYPE,LABEL,UUID,PARTLABEL,PARTUUID,MOUNTPOINT,SIZE
> came back with lsblk: unknown column:
> PARTLABEL,PARTUUID,MOUNTPOINT,SIZE

It works here perfectly:


Telcontar:~ # lsblk --output NAME,FSTYPE,LABEL,UUID,PARTLABEL,PARTUUID,MOUNTPOINT,SIZE
NAME          FSTYPE            LABEL           UUID                                 PARTLABEL PARTUUID                             MOUNTPOINT            SIZE
sda                                                                                                                                                     465.8G
├─sda1        ext2              a_boot_1        93f0311e-2a93-49ca-b836-d362ffc84486                                                /other/test_a1/boot 203.9M
├─sda2        ext2              a_boot_2        5135ab82-1374-4c30-b9d0-4b56d6d6d6c6                                                /boot               196.1M
├─sda3        ext2              a_boot_3        6d9d4270-3fd1-4027-9316-c614d6c090e4                                                                    196.1M
├─sda4                                                                                                                                                      1K
├─sda5        reiserfs          a_one           9404bbbd-9eeb-4fb9-96b1-1c42b0f776ff                                                /other/test_a1         15G
├─sda6        swap              a_swap          4c547811-211b-4d16-9efa-e426e5d77d2c                                                [SWAP]                 10G
├─sda7        ext4              a_main          0381840a-71fa-4d58-96bb-bc8f8da80ef7                                                /                      20G

> smartctl -a /dev/sdX returned Smartctl open device: /dev/sdX failed: No
> such device

I told you that you have to replace the X with the actual letter of your device. Of course sdX does not exist.


Cheers / Saludos,

Carlos E. R.
(from 13.1 x86_64 “Bottle” at Telcontar)

On 2014-09-18 16:36, rogerh113 wrote:
>
> Just for clarification, how does ext4 compare with NTFS for my
> application. I really do doubt I will go out of the linux world with
> this computer.

Well, if you are going to use NTFS, you really need a Windows in the
house. If the filesystem gets corrupted and needs an fsck (which can
happen just by accidentally unpluging the cable), it can not be done on
Linux. That’s one point. Another is that ext4 on Linux is faster than
ntfs, on Linux - but probably over usb 2 you will not notice it.


Cheers / Saludos,

Carlos E. R.
(from 13.1 x86_64 “Bottle” at Telcontar)

That file should be there. You will have one in each ext2/3/4 file system (and in many others). The system can save files ther when the file systm becomes corrupt in some place. It makes recovery possible. And of course it is owned by root, because root can do the recovery then.

When you created a new file system, it is impossible that there is "an artifact from the previous owner.

Did you read the dopcumentation I recommended?

To be able to access there the same applied as to every place where you want to access. I assume that “you” in this case is one of the ordinary (not root) users on the system.

Where did you mount the file system (the mount point)?
Who is owner (user and group) of the mount point?
What are the permissions on the mount point?
Did you create an entry in /etc/fstab (either manualy or using e.g. YaST) and when yes, show it.

Thanks for clarification on the lost and found folder.

Yes, I did read through it, but mostly on partitions and formatting. I used gparted to set up the disk, and did nothing manually to fstab or anything else. When I turn the drive on, it comes up as a usb device and I can open it up. I do indeed want to use it as a user rather than root - avoids a lot of problems, particularly with my wife on the system and fast typing on her part. I can see (from properties of the disk) that the user and group of the disk is root, but I don’t have a clue where to change that. Apparently the mount point is sdb, but I assume the system sets that up, and as a USB device perhaps that changes depending on what else I have plugged in and running. It sounds like permissions is the last hurdle I am facing, and I just need to find out where to find it.

Regards – Roger

I doubt the mount point is sdb. That sounds like the device.

IMHO it is better to have an entry in /etc/fstab. Then it is mopuunted where you want/need it. And you can create the mount point so that it is usable by the user(s) and or group you want.

My advice is to first label the file system so you can refer to it regardless if it is on /dev/sdb1 or something different:

tune2fs -L Pictures /dev/sdb1

That means that you can of course use a different name then Pictures, take a short but descriptive one.
Also take care: /dev/sdb1 should be the correct partition. Better first post here the output of

mount

so we can see the facts.

Then decide about the mount point. That depends on the needs. When it is only one user (you talk about your wife, but Linux does not care about family relations, it only knows about users and groups), you could make a mount point in hee home directory. When it must be accessible for more users, you could take a place inside /home, or inside /. Let us take the lattr as example and call it pics (also an example. Then we have to create the munt point:

mkdir /pics

Must be done as root. Now check that the permissions are rwxrwxrwx.

Now you can make an /etc/fstab entry. add a line there:

/dev/disk/bylabel/Pictures   /pics  ext4   noauto,nofail,users,acl,user_xattr 0 0

This will mount the device file /dev/disk/bylabel/Pictures on the mount point pics. It is an ext4 file system. It will not be automaticaly mounted on boot because it will not always be connected. Normal users can mount/umount.
When the device is allways connected, you can remove the first three options.