can some tell me how to mount 2nd HD
Hi,
I am using debian etch and I need to know how to mount a 2nd hard drive for extra space. Would like it to auto mount with any login users to us it. ty |
Please, use the SEARCH, or use your MAN pages. Your not going to get anywhere unless you put in the time to read.
man mount http://www.linuxquestions.org/questi...-drive-359074/ |
Also consult man fstab for information about mounting during a boot
and look at man mkfs for information about formatting a drive Sometime an info <subject> presents more details and an easier-to-read alternative to the man command. Oh, another useful tool is parted for creating and changing disk partitions. Another thing: If you're moving to *nix from Windows, you should note that *nix system do not force you to create a separate "top-level" entry for different drives. You can attach a file system residing in any hard drive at any point in your file system you want to use. Basically, a *nix system has a single "logical" file system, organized hierarchically below the top level ("/"), almost independent of any physical devices where data is stored. For illustration purposes only, here's what my Fedora 8 etc/fstab looks like: Code:
$ cat /etc/fstab |
You probably know this. Before mounting the drive, you need to format it and create a filesystem on the partition.
If any user can use this partition, then it may be best to use the same permissions that the /tmp directory uses. You need to mount the partition before using chmod. "sudo chmod a=rwxt path/to/mountpoint". Some distro's such as Mandriva & SuSE have a partitioner that can make the process easier. You can use them to create the filesystem (format) and to add an entry to /etc/fstab. Otherwise, you use "sudo /sbin/fdisk /dev/hdb" or "sudo /sbin/fdisk /dev/sdb" to format the partition. You next need to create the filesystem. Here you need to decide which filesystem to use. I am happy with ext3. I have used reiserfs and xfs in the past. Here is what my laptop's /etc/fstab entry looks like for the root partition: Code:
/dev/disk/by-id/scsi-SATA_FUJITSU_MHU2100_NQ07T4825B7P-part6 / ext3 acl,user_xattr 1 1 Fedora core uses lvm. You can use the "/usr/sbin/system-config-lvm" program to add your new disk to the lvm volume. This would allow you to increase the size of /home, by adding your new drive to its lvm volume. Otherwise you need to create a mount point for your new partition. Please put your distro in your LQ profile. That would enable us to give better answers. |
I dont understand, please just post the codes.
I want to auto mount /dev/hdb1 /media/storage so that all users on this computer can read and write to it. ty file system ext3 |
To reiterate: read the man page for mount. It's really not hard.
|
why not just say
add to /etc/fstab /dev/hdb1 /media/storage ext3 rw,user 0 0 |
Quote:
For example, the "0 0" at the end of your proposed line disables fsck boot-time checking of the file system, and would only normally be done for file systems that a not mounted during the boot process. (In my example, above, that's what the "noauto" option is for -- to tell udev that the file system is on removable media, and that it might not be available when the system is booted.) Also, by specifying "rw,user" you have granted r/w access to whoever mounts the file system, and permitted any user to do so. Since the file system will (implicitly) be mounted during the boot process, it will be owned by "root" and be in the "root" group. Thus the system administrator will need to set access and ownership values for any files in /media/storage before anyone else will be able to use the device. (Note that a "directory" is, on *nix systems, just another type of file.) While this may be what you want, again it was neither clear nor usual that you would want to do so. More commonly one just uses the "defaults" option on boot-mounted file systems, and then sets the permissions on /media/storage like this: chmod u+rwxt,g+rwx,o+rwx /media/storage so that everyone can read or execute any file in the "storage" directory, but only the user that created the file (or "root") can delete the file. (These are the permissions that are set on the /tmp directory.) All the above is why we were recommending that you read the manual pages for the commands you intend to use. We can't read your mind to know what you want, and, as you specified in your example, when what you want is not "standard" you either need to provide more details or, as we suggested, read the information provided in your distribution and see how you want to do it. The power and problem with systems like Linux is that you can do almost anything you want to do with the system (power), but you have to know how to do it (problem). And the documentation can be overwhelming since it needs to cover all the possibilities, not just the "common" ones. |
Thank you PTernholme, That is what I needed to know. I am gonna keep studying your advice and hope to understand linux better.
|
All times are GMT -5. The time now is 04:51 AM. |