[arch-general] how to mount external hdd
I think that this is a simple question. How do I mount an external hard drive before I log into my desktop? Thanks
<press ctrl-alt-F2> and login $ cat /proc/partitions #idenitfy the partition, is usually one of the last ones, lets assume it is /dev/sdXY $ sudo mount /dev/sdXY /path/to/mount/point $ exit <press ctrl-alt-F7> to go back to your login manager.... Not sure what kind of answer you were looking for..... On Tue, Feb 17, 2009 at 9:55 PM, Preston C. <gprestonc@gmail.com> wrote:
I think that this is a simple question. How do I mount an external hard drive before I log into my desktop? Thanks
<press ctrl-alt-F2> and login
$ cat /proc/partitions #idenitfy the partition, is usually one of the last ones, lets assume it is /dev/sdXY
$ sudo mount /dev/sdXY /path/to/mount/point
$ exit
<press ctrl-alt-F7> to go back to your login manager....
Not sure what kind of answer you were looking for.....
That is the right answer. When you say /path/to/mount/point . What should I put there? Or were you saying that /dev/sdXY is the path to the mount point. Also in the command cat /proc/partitions do i type # identify - so that it would be like this- cat /proc/partitions #idenitfy , Thanks, Preston
Hi Preston, Basically, you should think of mounting a file system as placing it under some "root" in your larger file system. In this case, /dev/sdXY can be thought of as a representation of the file system you want to mount (the one on the external HD). You can place it anywhere you want, and that will be its "root" in your larger file system. Typically, people do something like /media/disk, but it really can be anything. So $ sudo mount /dev/sdXY /media/disk works, but so does $ sudo mount /dev/sdXY /monkeys/are/awesome/ provided that you had first created a directory called "awesome" inside a directory called "are" inside a directory called "monkeys" at /, your root point. As far as the "#identify" goes -- I actually think that it doesn't do anything. In BASH (the shell you are probably using), the pound sign denotes a comment, which means that everything before it and the end of the line is ignored. So $ a-random-command # lions are pretty cool too just runs "a-random-command". I think the poster put "#identify" there just so you know what you are doing -- it's not actually necessary. Hope this helps. -- Leonid Grinberg
denotes a comment, which means that everything before it and the end of the line is ignored. So
I'm sorry, I meant that everything *between* it [the # sign] and the end of the line is ignored. -- Leonid
Thanks guys. I think I got it down. The only question I have is that I think, not sure though, that the usb external hdd is on /sdb ? I ran cat /proc/partitions and it gave me a pretty good bit of results, hard to tell which one is the external hdd. Any other way to check this?
Yes, it is typical that USB external drives are /dev/sdb or /dev/sdb1 (the number at the end indicates the partition number, generally).
Ok, am about to try "mount /dev/sdb /media/disk . Thanks a lot for the help Leonid. Hope this works, :-).
Got it! It was /sdc . Thanks.
On Wed, 2009-02-18 at 00:39 -0500, Preston C. wrote:
Got it! It was /sdc . Thanks.
You can also run "fdisk -l" as root to check your partitions.
On Wed, 18 Feb 2009 00:39:46 -0500, "Preston C." <gprestonc@gmail.com> wrote:
Got it! It was /sdc . Thanks.
Please! Please! Please, search first and if searching fails, please use the forums. I'm sick of your noob questions polluting my Inbox. The forum is the more appropriate place for such questions, but as redshift stated use a search engine first! Cheers, ~pyther
I do not believe that this type of reply should be allowed here. There are no stupid questions when it comes to linux. Please refrain from polluting my inbox with your insulting replies. On Wed, Feb 18, 2009 at 10:37 AM, pyther <pyther@pyther.net> wrote:
On Wed, 18 Feb 2009 00:39:46 -0500, "Preston C." <gprestonc@gmail.com> wrote:
Got it! It was /sdc . Thanks.
Please! Please! Please, search first and if searching fails, please use the forums. I'm sick of your noob questions polluting my Inbox. The forum is the more appropriate place for such questions, but as redshift stated use a search engine first!
Cheers, ~pyther
On Wed, Feb 18, 2009 at 6:45 PM, Jeffrey Lynn Parke Jr. <jeffrey.parke@gmail.com> wrote:
I do not believe that this type of reply should be allowed here. There are no stupid questions when it comes to linux. Please refrain from polluting my inbox with your insulting replies.
+1 If you dont like it unsubscribe. -- Greg
+1 If you dont like it unsubscribe. +2
Yes, as someone else mentioned above there aren't many stupid questions when it comes, except maybe for pyther's self-rightous flaming, lol! The problem I was having got solved, thanks to the very generous and understanding people on this mailing list. Now I am trying to figure out the root of the problem, which is a lot more complex, then the intial question. I just wanted to see if I could mount the hard drive and access it as user, which I couldn't. So I copied everything from my external hdd and cp to /home/user , then ran chown. Now understand what it was doing so I can get to the root of the problem.
On Wed, Feb 18, 2009 at 06:29:37PM -0800, Preston C. wrote:
I just wanted to see if I could mount the hard drive and access it as user, which I couldn't. You can, and mount(8)¹ is very exhaustive. Assuming your HD is formatted with some kind of MS filesystem (fat/ntfs) you can tweak the mount options to set the ownership of the files.
¹ In short: man mount
You can, and mount(8)¹ is very exhaustive. Assuming your HD is formatted with some kind of MS filesystem (fat/ntfs) you can tweak the mount options to set the ownership of the files.
¹ In short: man mount Will definitely look over it. I would imagine that the external hdd is formated with vfat? Not sure though. I figured out what I needed to, now time to look into the deeper problem, ;-).
I do not believe that this type of reply should be allowed here. There are no stupid questions when it comes to linux. Please refrain from polluting my inbox with your insulting replies.
On Wed, Feb 18, 2009 at 10:37 AM, pyther <pyther@pyther.net> wrote:
On Wed, 18 Feb 2009 00:39:46 -0500, "Preston C." <gprestonc@gmail.com> wrote:
Got it! It was /sdc . Thanks.
Please! Please! Please, search first and if searching fails, please use the forums. I'm sick of your noob questions polluting my Inbox. The forum is the more appropriate place for such questions, but as redshift stated
use
a search engine first!
Cheers, ~pyther
For the most part I agree there are no stupid questions in it comes to
On Wed, 18 Feb 2009 10:45:27 -0600, "Jeffrey Lynn Parke Jr." <jeffrey.parke@gmail.com> wrote: linux, however this can be debated. I was not insulting Preston, however I had previously suggested that he use the forums, in which he did. I do not believe that mailing list is the appropriate place for such basic questions when we have the forums. I'm sorry if I came off as being to harsh, I probably should have used a better choice of words in my previous message.
On Wed, Feb 18, 2009 at 1:37 PM, pyther <pyther@pyther.net> wrote:
I'm sick of your noob questions polluting my Inbox.
IMHO, this reaction is a little over the top, isn't? Your point is valid, but your tone is a little too harsh to make the massage be efective. I could also claim that your rant is filling my inbox, but I don't think that is productive. -- ------------------------------------------- Denis A. Altoe Falqueto ------------------------------------------- George Burns - "I would go out with women my age, but there are no women my age."
Pyther, RedShift et al, Without meaning to start a flame war, your complaints are a bit unjustified. Yes, the question is a pretty basic one and is answered in other places. Yes, it's probably prudent to try and ask search engines, forums, etc. But the OP has no way of knowing what's a "n00b question" and what isn't. He was polite and cooperative, following the advice people gave him, and thanking us when it helped. The point of this mailing list is to help people solve problems. This thread, until people started acting rude, was a perfect example of that system working. Why break it? -- Leonid
Please! Please! Please, search first and if searching fails, please use the forums. I'm sick of your noob questions polluting my Inbox. The forum is the more appropriate place for such questions, but as redshift stated use a search engine first!
Cheers, ~pyther
I did search, the wiki and some of google, I even posted on the forum but didn't get what I was looking for- so I took it to the mailing list, where people seem to help. I could care less that you are sick of my noob questions, to be frank with you. I have gotten some very gracious replies on the mailing lists and the problem even got solved. To many people flame on the forum, it seems. I don't mean to argue with you, but when you say something about how you are sick of "noob questions polluting your inbox" then that bothers me. This is the general discussion mailing list, is it not? Sorry if this post sounded rude, but your's was far worse. Preston
Preston C. wrote:
I think that this is a simple question. How do I mount an external hard drive before I log into my desktop? Thanks
You have been asking all these newbie questions while these have been widely covered by The Internets. I suggest you use an Internet Search Machine like google first (http://www.google.com/). The wiki (http://wiki.archlinux.org/) and the forum (http://bbs.archlinux.org/) are a good place to start as well. But your first reflex should be to read man mount... Glenn
On Wed, 18 Feb 2009 08:26:37 +0100 RedShift <redshift@pandora.be> wrote:
Preston C. wrote:
I think that this is a simple question. How do I mount an external hard drive before I log into my desktop? Thanks
You have been asking all these newbie questions while these have been widely covered by The Internets. I suggest you use an Internet Search Machine like google first (http://www.google.com/). The wiki (http://wiki.archlinux.org/) and the forum (http://bbs.archlinux.org/) are a good place to start as well. But your first reflex should be to read man mount...
Glenn
An external drive can be rather reliably identified and always mounted at the same place using udev. This is somewhat problematic on arch linux tough. For some reason the devices seem not to be created before mount runs although udev runs before it. This means that external drives do not get mounted along with all the other drives specified in fstab. I personally wonder what the problem is since this method has worked on other distributions. My workaround is simply another 'mount -a' in rc.local, at this point in boottime the devices are created. Still this doesn't work reliably with one of my drives but this is a separate problem (slowness). Philipp
On Wed, 18 Feb 2009 11:03:08 +0100 <hollunder@gmx.at> wrote: ..........
An external drive can be rather reliably identified and always mounted at the same place using udev.
This is somewhat problematic on arch linux tough. For some reason the devices seem not to be created before mount runs although udev runs before it. This means that external drives do not get mounted along with all the other drives specified in fstab.
I personally wonder what the problem is since this method has worked on other distributions.
My workaround is simply another 'mount -a' in rc.local, at this point in boottime the devices are created.
Still this doesn't work reliably with one of my drives but this is a separate problem (slowness).
Philipp
Folks, you are discussing how to deal with "noob questions" etc., but nobody paid attention to the more "deep" meaning of the initial question arisen by Philipp. I confirm the problem. So, how to mount an external HDD during the system start-up? Cheers, Sergey
On Wed, Feb 18, 2009 at 2:22 PM, Sergey Manucharian <sergeym@rmico.com> wrote:
On Wed, 18 Feb 2009 11:03:08 +0100 <hollunder@gmx.at> wrote:
..........
An external drive can be rather reliably identified and always mounted at the same place using udev.
This is somewhat problematic on arch linux tough. For some reason the devices seem not to be created before mount runs although udev runs before it. This means that external drives do not get mounted along with all the other drives specified in fstab.
I personally wonder what the problem is since this method has worked on other distributions.
My workaround is simply another 'mount -a' in rc.local, at this point in boottime the devices are created.
Still this doesn't work reliably with one of my drives but this is a separate problem (slowness).
Philipp
Folks, you are discussing how to deal with "noob questions" etc., but nobody paid attention to the more "deep" meaning of the initial question arisen by Philipp.
I confirm the problem. So, how to mount an external HDD during the system start-up?
Cheers, Sergey
If it is always connected, I would put a line on /etc/fstab so it is mounted as any other ordinary partition. If it is not always connected, I would make a script and put it in /etc/rc.d. The script would be responsible to look if the disk is attached and mount it. It would be good to use some udev rules to make a fixed symlink for the disk, so the script has a fixed target to find. -- ------------------------------------------- Denis A. Altoe Falqueto ------------------------------------------- Emo Philips - "I was the kid next door's imaginary friend."
On 02/18/09 at 02:31pm, Denis Alessandro Altoe Falqueto wrote:
On Wed, Feb 18, 2009 at 2:22 PM, Sergey Manucharian <sergeym@rmico.com> wrote:
On Wed, 18 Feb 2009 11:03:08 +0100 <hollunder@gmx.at> wrote:
..........
An external drive can be rather reliably identified and always mounted at the same place using udev.
This is somewhat problematic on arch linux tough. For some reason the devices seem not to be created before mount runs although udev runs before it. This means that external drives do not get mounted along with all the other drives specified in fstab.
I personally wonder what the problem is since this method has worked on other distributions.
My workaround is simply another 'mount -a' in rc.local, at this point in boottime the devices are created.
Still this doesn't work reliably with one of my drives but this is a separate problem (slowness).
Philipp
Folks, you are discussing how to deal with "noob questions" etc., but nobody paid attention to the more "deep" meaning of the initial question arisen by Philipp.
I confirm the problem. So, how to mount an external HDD during the system start-up?
Cheers, Sergey
If it is always connected, I would put a line on /etc/fstab so it is mounted as any other ordinary partition.
agreed; just to mention, make sure your options prevent automounting or fsck'ing else it would hang at boot if the drive's not present.
If it is not always connected, I would make a script and put it in /etc/rc.d. The script would be responsible to look if the disk is attached and mount it. It would be good to use some udev rules to make a fixed symlink for the disk, so the script has a fixed target to find.
this can be entirely handled with udev. there's a sample rule in the udev wiki that will dynamically mkdir a mountpoint and mount it as /media/sdX then lazily umount and rm the mountpoint if the drive is unplugged. i used a tweaked version of this for a while, it worked well. pat, aka brisbin33
-- ------------------------------------------- Denis A. Altoe Falqueto ------------------------------------------- Emo Philips - "I was the kid next door's imaginary friend." --- end quoted text ---
-- patrick brisbin
On Wed, 18 Feb 2009 14:31:13 -0300 Denis Alessandro Altoe Falqueto <denisfalqueto@gmail.com> wrote: ..............
If it is always connected, I would put a line on /etc/fstab so it is mounted as any other ordinary partition.
For some reason this does not work for me - when I restart the computer my external USB HDD never gets mounted, probably because the corresponding device does not exist at the moment when fstab stuff is being mounted. So, I'll try the udev approach. Thanks, Sergey
On Wed, 18 Feb 2009 14:31:13 -0300 Denis Alessandro Altoe Falqueto <denisfalqueto@gmail.com> wrote:
On Wed, Feb 18, 2009 at 2:22 PM, Sergey Manucharian <sergeym@rmico.com> wrote:
On Wed, 18 Feb 2009 11:03:08 +0100 <hollunder@gmx.at> wrote:
..........
An external drive can be rather reliably identified and always mounted at the same place using udev.
This is somewhat problematic on arch linux tough. For some reason the devices seem not to be created before mount runs although udev runs before it. This means that external drives do not get mounted along with all the other drives specified in fstab.
I personally wonder what the problem is since this method has worked on other distributions.
My workaround is simply another 'mount -a' in rc.local, at this point in boottime the devices are created.
Still this doesn't work reliably with one of my drives but this is a separate problem (slowness).
Philipp
Folks, you are discussing how to deal with "noob questions" etc., but nobody paid attention to the more "deep" meaning of the initial question arisen by Philipp.
I confirm the problem. So, how to mount an external HDD during the system start-up?
Cheers, Sergey
If it is always connected, I would put a line on /etc/fstab so it is mounted as any other ordinary partition.
If it is not always connected, I would make a script and put it in /etc/rc.d. The script would be responsible to look if the disk is attached and mount it. It would be good to use some udev rules to make a fixed symlink for the disk, so the script has a fixed target to find.
I already do a combination of udev and fstab which doesn't work. Old rules that worked on my previous system: BUS=="usb", KERNEL=="sd?1", SYSFS{idProduct}=="(somenumber)", SYMLINK+="usbdisk200" BUS=="usb", KERNEL=="sd?1", SYSFS{serial}=="(somenumber)", SYMLINK+="usbdisk400" New rules with newer udev syntax: BUS=="usb", ATTRS{serial}=="(somenumber)", KERNEL=="sd?1", NAME="%k", SYMLINK+="usbdisk400", GROUP="storage" BUS=="usb", ATTRS{idProduct}=="(somenumber)", KERNEL=="sd?1", NAME="%k", SYMLINK+="usbdisk200", GROUP="storage" fstab: /dev/usbdisk400 /media/disk400 ext3 rw,nodev,noexec,auto,noatime,async,users 0 0 /dev/usbdisk200 /media/disk200 ext3 rw,nodev,noexec,auto,noatime,async,users 0 0 What happens is that when 'mount -a' is run at boottime it says that /dev/usbdisk400 and /dev/usbdisk200 doesn't exist, consequently they don't get mounted. When rc.local with another 'mount -a' is executed it works (except that the /dev/usbdisk400 is too slow sometimes). I'm looking forward to your ideas about what's happening. Best regards, Philipp
On Thu, 19 Feb 2009 09:33:01 +0100 <hollunder@gmx.at> wrote:
On Wed, 18 Feb 2009 14:31:13 -0300 Denis Alessandro Altoe Falqueto <denisfalqueto@gmail.com> wrote:
On Wed, Feb 18, 2009 at 2:22 PM, Sergey Manucharian <sergeym@rmico.com> wrote:
On Wed, 18 Feb 2009 11:03:08 +0100 <hollunder@gmx.at> wrote:
..........
An external drive can be rather reliably identified and always mounted at the same place using udev.
This is somewhat problematic on arch linux tough. For some reason the devices seem not to be created before mount runs although udev runs before it. This means that external drives do not get mounted along with all the other drives specified in fstab.
I personally wonder what the problem is since this method has worked on other distributions.
My workaround is simply another 'mount -a' in rc.local, at this point in boottime the devices are created.
Still this doesn't work reliably with one of my drives but this is a separate problem (slowness).
Philipp
Folks, you are discussing how to deal with "noob questions" etc., but nobody paid attention to the more "deep" meaning of the initial question arisen by Philipp.
I confirm the problem. So, how to mount an external HDD during the system start-up?
Cheers, Sergey
If it is always connected, I would put a line on /etc/fstab so it is mounted as any other ordinary partition.
If it is not always connected, I would make a script and put it in /etc/rc.d. The script would be responsible to look if the disk is attached and mount it. It would be good to use some udev rules to make a fixed symlink for the disk, so the script has a fixed target to find.
I already do a combination of udev and fstab which doesn't work.
Old rules that worked on my previous system: BUS=="usb", KERNEL=="sd?1", SYSFS{idProduct}=="(somenumber)", SYMLINK+="usbdisk200"
BUS=="usb", KERNEL=="sd?1", SYSFS{serial}=="(somenumber)", SYMLINK+="usbdisk400"
New rules with newer udev syntax: BUS=="usb", ATTRS{serial}=="(somenumber)", KERNEL=="sd?1", NAME="%k", SYMLINK+="usbdisk400", GROUP="storage"
BUS=="usb", ATTRS{idProduct}=="(somenumber)", KERNEL=="sd?1", NAME="%k", SYMLINK+="usbdisk200", GROUP="storage"
fstab: /dev/usbdisk400 /media/disk400 ext3 rw,nodev,noexec,auto,noatime,async,users 0 0
/dev/usbdisk200 /media/disk200 ext3 rw,nodev,noexec,auto,noatime,async,users 0 0
What happens is that when 'mount -a' is run at boottime it says that /dev/usbdisk400 and /dev/usbdisk200 doesn't exist, consequently they don't get mounted. When rc.local with another 'mount -a' is executed it works (except that the /dev/usbdisk400 is too slow sometimes).
I'm looking forward to your ideas about what's happening.
Best regards, Philipp
I tried some more. This time I specified one of the usb harddrives by UUID. I can mount is, so it works, but at boottime this method doesn't work either. I get: special device UUID=number not found same as I got: special device /dev/usbdisk400 not found So to me this looks like udev is not the problem this time. So what is it, are usb devices not initialised yet when 'mount -a' is run? I added the usb_storage module to the modules array in rc.conf but this didn't change a thing. If I read rc.sysinit correctly the modules are loaded before 'mount -a'. Help is appreciated. Philipp
On Fri, Feb 20, 2009 at 11:05 AM, <hollunder@gmx.at> wrote:
On Thu, 19 Feb 2009 09:33:01 +0100 <hollunder@gmx.at> wrote:
On Wed, 18 Feb 2009 14:31:13 -0300 Denis Alessandro Altoe Falqueto <denisfalqueto@gmail.com> wrote:
On Wed, Feb 18, 2009 at 2:22 PM, Sergey Manucharian <sergeym@rmico.com> wrote:
On Wed, 18 Feb 2009 11:03:08 +0100 <hollunder@gmx.at> wrote:
..........
An external drive can be rather reliably identified and always mounted at the same place using udev.
This is somewhat problematic on arch linux tough. For some reason the devices seem not to be created before mount runs although udev runs before it. This means that external drives do not get mounted along with all the other drives specified in fstab.
I personally wonder what the problem is since this method has worked on other distributions.
My workaround is simply another 'mount -a' in rc.local, at this point in boottime the devices are created.
Still this doesn't work reliably with one of my drives but this is a separate problem (slowness).
Philipp
Folks, you are discussing how to deal with "noob questions" etc., but nobody paid attention to the more "deep" meaning of the initial question arisen by Philipp.
I confirm the problem. So, how to mount an external HDD during the system start-up?
Cheers, Sergey
If it is always connected, I would put a line on /etc/fstab so it is mounted as any other ordinary partition.
If it is not always connected, I would make a script and put it in /etc/rc.d. The script would be responsible to look if the disk is attached and mount it. It would be good to use some udev rules to make a fixed symlink for the disk, so the script has a fixed target to find.
I already do a combination of udev and fstab which doesn't work.
Old rules that worked on my previous system: BUS=="usb", KERNEL=="sd?1", SYSFS{idProduct}=="(somenumber)", SYMLINK+="usbdisk200"
BUS=="usb", KERNEL=="sd?1", SYSFS{serial}=="(somenumber)", SYMLINK+="usbdisk400"
New rules with newer udev syntax: BUS=="usb", ATTRS{serial}=="(somenumber)", KERNEL=="sd?1", NAME="%k", SYMLINK+="usbdisk400", GROUP="storage"
BUS=="usb", ATTRS{idProduct}=="(somenumber)", KERNEL=="sd?1", NAME="%k", SYMLINK+="usbdisk200", GROUP="storage"
fstab: /dev/usbdisk400 /media/disk400 ext3 rw,nodev,noexec,auto,noatime,async,users 0 0
/dev/usbdisk200 /media/disk200 ext3 rw,nodev,noexec,auto,noatime,async,users 0 0
What happens is that when 'mount -a' is run at boottime it says that /dev/usbdisk400 and /dev/usbdisk200 doesn't exist, consequently they don't get mounted. When rc.local with another 'mount -a' is executed it works (except that the /dev/usbdisk400 is too slow sometimes).
I'm looking forward to your ideas about what's happening.
Best regards, Philipp
I tried some more. This time I specified one of the usb harddrives by UUID. I can mount is, so it works, but at boottime this method doesn't work either.
I get: special device UUID=number not found
same as I got: special device /dev/usbdisk400 not found
So to me this looks like udev is not the problem this time. So what is it, are usb devices not initialised yet when 'mount -a' is run? I added the usb_storage module to the modules array in rc.conf but this didn't change a thing. If I read rc.sysinit correctly the modules are loaded before 'mount -a'.
Help is appreciated.
Philipp
Well, I don't have an external hd, just pendrives, so to me they work fine because I insert/remove often and when the system is already running. But one aproach I would take is to make a script and put it in /etc/rc.d, so you can put it in your DAEMONS array in rc.conf. This way, i think the system will be up and running fine when the script is run and it may mount your drive correctly. You can -- ------------------------------------------- Denis A. Altoe Falqueto ------------------------------------------- George Burns - "I would go out with women my age, but there are no women my age."
On Fri, Feb 20, 2009 at 11:15 AM, Denis Alessandro Altoe Falqueto <denisfalqueto@gmail.com> wrote:
On Fri, Feb 20, 2009 at 11:05 AM, <hollunder@gmx.at> wrote:
On Thu, 19 Feb 2009 09:33:01 +0100 <hollunder@gmx.at> wrote:
On Wed, 18 Feb 2009 14:31:13 -0300 Denis Alessandro Altoe Falqueto <denisfalqueto@gmail.com> wrote:
On Wed, Feb 18, 2009 at 2:22 PM, Sergey Manucharian <sergeym@rmico.com> wrote:
On Wed, 18 Feb 2009 11:03:08 +0100 <hollunder@gmx.at> wrote:
..........
An external drive can be rather reliably identified and always mounted at the same place using udev.
This is somewhat problematic on arch linux tough. For some reason the devices seem not to be created before mount runs although udev runs before it. This means that external drives do not get mounted along with all the other drives specified in fstab.
I personally wonder what the problem is since this method has worked on other distributions.
My workaround is simply another 'mount -a' in rc.local, at this point in boottime the devices are created.
Still this doesn't work reliably with one of my drives but this is a separate problem (slowness).
Philipp
Folks, you are discussing how to deal with "noob questions" etc., but nobody paid attention to the more "deep" meaning of the initial question arisen by Philipp.
I confirm the problem. So, how to mount an external HDD during the system start-up?
Cheers, Sergey
If it is always connected, I would put a line on /etc/fstab so it is mounted as any other ordinary partition.
If it is not always connected, I would make a script and put it in /etc/rc.d. The script would be responsible to look if the disk is attached and mount it. It would be good to use some udev rules to make a fixed symlink for the disk, so the script has a fixed target to find.
I already do a combination of udev and fstab which doesn't work.
Old rules that worked on my previous system: BUS=="usb", KERNEL=="sd?1", SYSFS{idProduct}=="(somenumber)", SYMLINK+="usbdisk200"
BUS=="usb", KERNEL=="sd?1", SYSFS{serial}=="(somenumber)", SYMLINK+="usbdisk400"
New rules with newer udev syntax: BUS=="usb", ATTRS{serial}=="(somenumber)", KERNEL=="sd?1", NAME="%k", SYMLINK+="usbdisk400", GROUP="storage"
BUS=="usb", ATTRS{idProduct}=="(somenumber)", KERNEL=="sd?1", NAME="%k", SYMLINK+="usbdisk200", GROUP="storage"
fstab: /dev/usbdisk400 /media/disk400 ext3 rw,nodev,noexec,auto,noatime,async,users 0 0
/dev/usbdisk200 /media/disk200 ext3 rw,nodev,noexec,auto,noatime,async,users 0 0
What happens is that when 'mount -a' is run at boottime it says that /dev/usbdisk400 and /dev/usbdisk200 doesn't exist, consequently they don't get mounted. When rc.local with another 'mount -a' is executed it works (except that the /dev/usbdisk400 is too slow sometimes).
I'm looking forward to your ideas about what's happening.
Best regards, Philipp
I tried some more. This time I specified one of the usb harddrives by UUID. I can mount is, so it works, but at boottime this method doesn't work either.
I get: special device UUID=number not found
same as I got: special device /dev/usbdisk400 not found
So to me this looks like udev is not the problem this time. So what is it, are usb devices not initialised yet when 'mount -a' is run? I added the usb_storage module to the modules array in rc.conf but this didn't change a thing. If I read rc.sysinit correctly the modules are loaded before 'mount -a'.
Help is appreciated.
Philipp
Well, I don't have an external hd, just pendrives, so to me they work fine because I insert/remove often and when the system is already running. But one aproach I would take is to make a script and put it in /etc/rc.d, so you can put it in your DAEMONS array in rc.conf. This way, i think the system will be up and running fine when the script is run and it may mount your drive correctly. You can
-- ------------------------------------------- Denis A. Altoe Falqueto ------------------------------------------- George Burns - "I would go out with women my age, but there are no women my age."
Sorry, sent before I ended the message... >_< I was saying that you could check to see if your device is plugged before mounting. I was trying to find a reliable way to do that, but I don't have the time right now. I will try to replay with something usefull as soo as I can. Hope that helps. -- ------------------------------------------- Denis A. Altoe Falqueto ------------------------------------------- Emo Philips - "I was the kid next door's imaginary friend."
2009/2/20 Denis Alessandro Altoe Falqueto <denisfalqueto@gmail.com>: [ script to first check if the device is available and then mount it ] I think you just touched the real source of the problem; in my experience, USB-HDD's take some time to initialize (more than pendrives). In my case, i have to wait 10 seconds after plugging it in, so a script to mount it (or use an automounter) will probably work just fine. mvg, Guus Snijders
On Mittwoch, 18. Februar 2009 18:22 Sergey Manucharian wrote:
I confirm the problem. So, how to mount an external HDD during the system start-up?
This is only an idea of mine but i haven't test it. Take a look in the subirs (by-id, by-label, by-path and by-uuid) of /dev/disk especially the content of by-uuid with "ls -l". If your partitions of the external HDD be there than you can put this in the rc.local to mount partition 1: [ -e /dev/disk/by-uuid/UUID_of_ext_HDD1 ] && \ mount -t YOUR_FS -o YOUR_OPTIONS \ /dev/disk/by-uuid/UUID_of_ext_HDD1 /MOUNTPOINT Not so much professional -) but perhaps an working option if udev creates the devices. Good luck, Attila
On Wed, 18 Feb 2009 11:03:08 +0100 <hollunder@gmx.at> wrote:
An external drive can be rather reliably identified and always mounted at the same place using udev.
This is somewhat problematic on arch linux tough. For some reason the devices seem not to be created before mount runs although udev runs before it. This means that external drives do not get mounted along with all the other drives specified in fstab.
I personally wonder what the problem is since this method has worked on other distributions.
My workaround is simply another 'mount -a' in rc.local, at this point in boottime the devices are created.
Still this doesn't work reliably with one of my drives but this is a separate problem (slowness).
Philipp
Very odd. "all other drives specified in fstab", this includes disks *in* your system containing your /, /home etc? Would you mind filing a bug report? maybe also include your kind of hardware (is it on something very slow? usb?) Dieter
participants (16)
-
Alessandro Doro
-
Attila
-
Denis Alessandro Altoe Falqueto
-
Dieter Plaetinck
-
Dwight Schauer
-
Grigorios Bouzakis
-
Guus Snijders
-
hollunder@gmx.at
-
Jeffrey Lynn Parke Jr.
-
Jordy van Wolferen
-
Leonid Grinberg
-
Patrick Brisbin
-
Preston C.
-
pyther
-
RedShift
-
Sergey Manucharian