Feeds:
Posts
Comments

Posts Tagged ‘storage’

A couple of years or so ago, Ubuntu‘s file manager, Nautilus, gave you the ability to “Safely Remove Drive” when right-clicking an attached USB hard drive (or flash drive), rather than just simply “Unmount” it. The difference between the two is that when you simply unmount a drive, it is still listed as attached (but not mounted) in Nautilus‘s left-pane. For many, seeing the drive completely removed was reassuring, since it could then be unplugged safe in the knowledge there would be no data loss, or physical damage to the device.

However, in the Ubuntu 12.10 upgrade, we lost this option, and now only have “Unmount” and “Eject” (which is exactly the same as “Unmount“, except in the case of CD/DVD drives where it will eject the disc tray).

Device Context-Menu

While “Safely Remove Drive” may yet make a return (it has caused a flood of complaints about this backward move), for now you can do it via the command-line if you really prefer this to simply unmounting.

First, if you’re unsure what the drive’s address is, run the following in the terminal:

mount|grep ^'/dev'

If you only have one internal hard drive, and no other storage devices attached, it should be something like /dev/sdb. To safely unmount and totally remove the drive, enter the following command, replacing /dev/sdb with your own drive’s designation if need be:

udisks --unmount /dev/sdb1 && udisks --detach /dev/sdb

You should now see your drive disappear from the file manager’s left-pane.

Note that in the unlikely event you have a partition other than the first partition on the drive mounting, you will need to change the “1” (ie: sdb1) in the command to reflect that.

☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻

Did this information make your day? Did it rescue you from hours of headache? Then please consider making a donation via PayPal, to buy me a donut, beer, or some fish’n’chips for my time and effort! Many thanks!

Buy Ubuntu Genius a Beer to say Thanks!

Advertisements

Read Full Post »

If you’ve attached an external hard drive for backing up your files, or created a new partition for storage, only to find you don’t have the permissions to use it, you’d be understandably frustrated. But it’s actually quite easy to remedy by simply running a command in the terminal in the form of:

sudo chown -R username:username /partition/mount-point

Note that the above isn’t the actual command you’ll be using, as you’ll need to replace each instance of username with your actual username, and also determine your mount-point, which is not the device name (eg: /dev/sdb1).

To find the mount-point, run mount in the terminal, and locate the line that corresponds to the drive or partition in question. If you have never named (or set the label for) it, it will probably look something like:

/dev/sdb1 on /media/bf9a2c45-491a-4778-9d76-47832fe38820

If you have set the label with something descriptive, it should like similar to:

/dev/sdb1 on /media/1Tb Pocket Drive

As you can see, your mount-point will look something like /media/bf9a2c45-491a-4778-9d76-47832fe38820 or /media/1Tb Pocket Drive, so all you need to do now is run a command like one of the following, replacing the relevant info with what is appropriate to you:

sudo chown -R billgates:billgates /media/bf9a2c45-491a-4778-9d76-47832fe38820

sudo chown -R billgates:billgates '/media/1Tb Pocket Drive'

Note that if your custom label contains spaces (e.g. 1Tb Pocket Drive) , you will need to enclose the entire mount-point path in single quotes, but won’t need them if it’s a single word or multiple words joined by hyphens or underscores.

That’s it – you should now be able to do whatever you want with the drive or partition in question, as you’re now the owner.

☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻

Did this information make your day? Did it rescue you from hours of headache? Then please consider making a donation via PayPal, to buy me a donut, beer, or some fish’n’chips for my time and effort! Many thanks!

Buy Ubuntu Genius a Beer to say Thanks!

ption]

Read Full Post »