Print

Print


Hi Rosalia,

I'm not sure what you mean. The disk is mounted as /media/TOSHIBA\ EXT, which indeed behaves exactly as a directory, and you can put all your analyses on it, and also run commands from it. It behaves just as the files that live in your your home directory, with a few exceptions. It appears to me that your disk is formatted as NTFS, which is a Windows-style filesystem, not a Linux-native. The good of NTFS is that the files can be accessed from any computer that you plug your disk to, but the bad is that it never truly behaves (in terms of file permissions and ownership) as native. This is perhaps the only difference if compared to your internal HD.

If you are bothered with file permissions and ownership, the solution is to format the disk using a Linux native format (such as ext3, ext4, reiser, btrfs, etc). However, then you'll only be able to see the files when the disk is plugged into a Linux machine (any Linux). If you connect to a Windows PC, it won't recognise the disk, and it may even dangerously offer you the option to re-format the it as NTFS, and if you accept, you'll lose all the data.

If it helps as advice, my external disks are all formatted as ext4, and I only use Linux. I never lost data because of file system format, but I used to be bothered with different character encodings in NTFS and with all my files being wrongly marked as executable in external drives.

Another thing is that you may want easier access to the disk, having it accessible from your home directory. For this, you can create a link (more specifically, a symbolic link) in your home directory that points to the external drive. This can be done as:

cd ~
ln -s /media/TOSHIBA\ EXT toshiba

Then you should see the a link called "toshiba" (or use any other name you prefer) in your home directory, and when you cd into it, it's almost as if you were inside /media/TOSHIBA\ EXT.

With an external drive, which you may often want to unplug (specially if this is a laptop), there isn't much more to do. If you were using a desktop computer, you could consider an internal disk, which is also cheaper, and which you don't need unmount ever. Then you could even have your /home inside it, but with an external, this is generally a bad idea.

Hope this helps somehow!

All the best,

Anderson

2013/1/21 Rosalia Dacosta Aguayo <[log in to unmask]>

Dear Anderson,

Thank you for your advice. Maybe I have not explained properly. I have no problems with the access to the information of my external hard disk. The problem was that I need that my hard disk works as a directory, because I have little space in my computer and I need doing all the neuroimage processing from my external hard disk in order to have enough space.

Is it ok, then, do this for my purpose?

Yours sincerely,
Rosalia.

El 21/01/2013 22:07, "Anderson M. Winkler" <[log in to unmask]> escribió:

Hi Christopher,

Hmm..., I'm afraid this might not be the best solution. The disk isn't formatted as ext2 (as evidenced by the fuseblk in her /etc/mtab). And if Rosalia adds the disk to her /etc/fstab, she will have warning messages everytime she turns the computer on and the disk isn't there, as well as some headaches to unmount it everytime, as it seems she isn't very familiar with these things.

My suggestion is that, since Ubuntu can handle this automatically, and it's already doing so, let's leave it taking care of the disk. It's possible nonetheless to mount and unmount it just using the desktop interface (right-click on the icon, etc).

All the best!

Anderson



2013/1/21 Watson, Christopher <[log in to unmask]>
You need to enter as a line in /etc/fstab something like
/dev/sdb1    /media/external    ext2    defaults    0 0

________________________________________
From: FSL - FMRIB's Software Library [[log in to unmask]] on behalf of Rosalia Dacosta Aguayo [[log in to unmask]]
Sent: Monday, January 21, 2013 3:43 PM
To: [log in to unmask]
Subject: Re: [FSL] Configure bash problems with extern hard disk

Sorry, Dr. Winker,

Looking into the Linux manual I have found another command "lsusb", and it shows me that my media toshiba is in the system:
rosi@rosi-HP-Pavilion-dv9700-Notebook-PC:~$ lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 002: ID 064e:a110 Suyin Corp. HP Webcam
Bus 004 Device 002: ID 046d:c05b Logitech, Inc.
Bus 002 Device 006: ID 0480:a006 Toshiba America Info. Systems, Inc.
rosi@rosi-HP-Pavilion-dv9700-Notebook-PC:~$





2013/1/21 Rosalia Dacosta Aguayo <[log in to unmask]<mailto:[log in to unmask]>>
Dear Winker,

Here it is:

1.  rosi@rosi-HP-Pavilion-dv9700-Notebook-PC:~$ /etc/mtab
bash: /etc/mtab: Permission denied
rosi@rosi-HP-Pavilion-dv9700-Notebook-PC:~$

2. rosi@rosi-HP-Pavilion-dv9700-Notebook-PC:~$ cat /etc/mtab
/dev/sda6 / ext4 rw,errors=remount-ro,commit=0 0 0
proc /proc proc rw,noexec,nosuid,nodev 0 0
sysfs /sys sysfs rw,noexec,nosuid,nodev 0 0
fusectl /sys/fs/fuse/connections fusectl rw 0 0
none /sys/kernel/debug debugfs rw 0 0
none /sys/kernel/security securityfs rw 0 0
udev /dev devtmpfs rw,mode=0755 0 0
devpts /dev/pts devpts rw,noexec,nosuid,gid=5,mode=0620 0 0
tmpfs /run tmpfs rw,noexec,nosuid,size=10%,mode=0755 0 0
none /run/lock tmpfs rw,noexec,nosuid,nodev,size=5242880 0 0
none /run/shm tmpfs rw,nosuid,nodev 0 0
binfmt_misc /proc/sys/fs/binfmt_misc binfmt_misc rw,noexec,nosuid,nodev 0 0
/dev/sdb1 /media/TOSHIBA\040EXT fuseblk rw,nosuid,nodev,allow_other,blksize=4096,default_permissions 0 0
gvfs-fuse-daemon /home/rosi/.gvfs fuse.gvfs-fuse-daemon rw,nosuid,nodev,user=rosi 0 0
rosi@rosi-HP-Pavilion-dv9700-Notebook-PC:~$

My hard disk is in ///computer, but there is no way to configure a path in the bash script in order it can be recognized.

Thank you.

Rosalia.