Monday, November 9, 2009

Mounting devices permanently

I have a 500gb harddrive that i am going to mount to /mnt/share
first i need to create the partition and format it.
fdisk /dev/sdb
mkfs.ext3 /dev/sdb
after doing this i need to get the UUID for the drive.
ls -l /dev/disk/by-uuid
then i edit /etc/fstab and add:
UUID=theUUIDonTHEpartitionYOUwantTOmount /mount/path filesystem defaults 0 0

or in my case

UUID=bf40fffa-a352-4188-8b6d-293be3ef029b /mnt/share ext3 defaults 0 0

After this i changed the owner to my main user name and chmod to 750

chown -R username:username /mnt/share
chmod -R 750 /mnt/share/

Maby i am going to change the chmod later on.

After evrything was set i checked the mount table with df command.

No comments:

Post a Comment