Results 1 to 6 of 6
  1. #1
    Join Date
    Sep 2007
    Posts
    815

    re mounting a second hard drive from /backup to /home2 how?

    Hi

    My second hard drive is mounted as /backup. I have a remote rsync backup. i want to remount thsi second hard drive to /home2 instead

    Can someone please teach me how to do that?

    Thanks
    All things work together for the good of those who love God - Romans 8:28

  2. #2
    Join Date
    Mar 2009
    Location
    Bangalore
    Posts
    41
    Run the command fdisk -l as root once you have attached your HDD

    And then use the mount command as an example shown below.

    Example:

    Code:
    mount /dev/sda2    /home2
    
    
    ~$ sudo fdisk -l
    
    Disk /dev/sda: 40.0 GB, 40007761920 bytes
    255 heads, 63 sectors/track, 4864 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Disk identifier: 0x00000000
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sda1               1         130     1044224+  82  Linux swap / Solaris
    /dev/sda2   *         131        4864    38025855   83  Linux
    Serversignature.com - Professional Linux Consulting.

  3. #3
    Join Date
    Mar 2009
    Location
    Israel
    Posts
    1,204
    /etc/fstab is your friend.

    http://www.tuxfiles.org/linuxhelp/fstab.html

    take a look at this guide.
    understand what you are doing, and be careful while editing!
    beast5.com - Managed Hosting Solutions 2004 - 2016

  4. #4
    Join Date
    Nov 2005
    Location
    /etc/fstab
    Posts
    1,274
    mount /dev/sda2 /home2
    This will do the job as server signature said. But make sure to umount /backup running this:

    Code:
    umount /backup
    Otherwise, both will be set as mountpoint
    Mellowhost - Providing High Quality Web Hosting Services since 2007
    SSD Cpanel Shared, SSD OpenVZ & KVM VPS Hosting
    A Hosting Provider with Complete SSD VPS & Shared Hosting.

  5. #5
    Join Date
    Sep 2007
    Posts
    815
    Quote Originally Posted by beastserv View Post
    /etc/fstab is your friend.

    http://www.tuxfiles.org/linuxhelp/fstab.html

    take a look at this guide.
    understand what you are doing, and be careful while editing!
    I did this and it did not work.

    mount /dev/sda2 /home2
    I tried the opposite way maybe thats the reason why it didnt work. I put mount /home2 /dev/sda2 instead of mount /dev/sda2 /home2

    Thanks for all the help will try this.
    All things work together for the good of those who love God - Romans 8:28

  6. #6
    Join Date
    Mar 2009
    Location
    Israel
    Posts
    1,204
    Quote Originally Posted by sharmaine1111 View Post
    I did this and it did not work.



    I tried the opposite way maybe thats the reason why it didnt work. I put mount /home2 /dev/sda2 instead of mount /dev/sda2 /home2

    Thanks for all the help will try this.

    hi

    /etc/fstab is basicly a mapping of your server mounts.
    so in case you will have to reboot the server ( and your mounts WONT be in the fstab file) , the server will NOT automaticly mount the /home2 on boot.

    the line you should add needs to look like this
    /dev/sda2 /home2 {FILESYSTEM TYPE} defaults 0 0

    The file system type should be ext2 or ext3 ,depends on the way the disk was formated.

    to get the file system format type use:
    Code:
    blkid | grep sda2
    you will see there the format type at the end of the line.

    after your fstab file is set correctly.
    do
    Code:
    mount -o remount /dev/sda2
    then type
    Code:
    df -h
    you should see it mounted.
    beast5.com - Managed Hosting Solutions 2004 - 2016

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •