Find the answer to your Linux question:
Results 1 to 9 of 9
Hello all, i am just starting out in linux and am a little confused about mounting drives. on my fedora pc, i have 2 x hard drives. when i originally ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Aug 2010
    Posts
    4

    mounting drives - newbie


    Hello all,
    i am just starting out in linux and am a little confused about mounting drives.
    on my fedora pc, i have 2 x hard drives.
    when i originally installed the os, i had 1 drive with the default partitioning.
    i placed all my data into /var/files and had various folders under there eg music, video, docs etc

    it didn't take long for this to fill up. so i added a 2nd drive and mounted it as /var/files which increased the space for all the folders in that directory.
    so my fstab has:

    sda1 /
    sdb1 /var/files

    now its filling up again and i want to add a 3rd drive. but this time, i want to seperate my music from my video's etc but still keep the share under /var/files

    so, do i add the 3rd drive, mount it as /var/files/music1, then transfer the music files from /var/files/music to /var/files/music1 and once the transfer is complete, delete /var/files/music, rename /var/files/music1 to /var/files/music and then mount sdc1 to/var/files/music?

    the bit i can't get my head around is the mount within a mount:
    sdb1 /var/files is mounting everything under it including /music
    if i add sdc1 /var/files/music how does it affect the mount point of sdb1

    am i better putting the /music under /var/music instead of /var/files?

  2. #2
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,729
    Hi and Welcome !

    It will be really confusing if you keep on mounting partition one under another like nested environment.

    Why are you mounting partition of music files under /var/files? Why not standard location like /media/ or /mnt?

    It better to mount all partition under /media/ to keep track of everything.
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

  3. #3
    Just Joined!
    Join Date
    Aug 2010
    Posts
    4
    Hi,
    as this was my first shot at linux, I tried an easy version first - amahi.
    problem with it is, it stores it's data in /var/hda/files/<shares> eg docs, video, music etc.
    Now I know I don't have to stick to their specified storage locations etc but they have a lot of pluggins which default to those locations and possibly some that can't be changed (although I'm not sure about the latter)

    but while I'm here, what is best practice for mounting:

    sdb1 /media/music
    sdb1 /media/video

    OR

    sdb1 /media with music & video directories

    and what do I do if I want to add another drive to expand what I store in those directories?

  4. $spacer_open
    $spacer_close
  5. #4
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,729
    You should not mount same partition sdb1 at two different locations, /media/music and video.
    Create a folder /media/sdb1 and mount /dev/sdb1 there only. Create folders inside /media/sdb1 for music and video.

    Could you post the output of fdisk -l and df -h commands?
    Code:
    su -
    /sbin/fdisk -l
    df -h
    * Its small L in fdisk -l.
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

  6. #5
    Just Joined!
    Join Date
    Aug 2010
    Posts
    4
    apologies for late reply. been on vacation. here is the output as requested:

    /sbin/fdisk -l
    **********

    Disk /dev/sda: 12.9 GB, 12884901888 bytes
    255 heads, 63 sectors/track, 1566 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Disk identifier: 0x0007e3db

    Device Boot Start End Blocks Id System
    /dev/sda1 * 1 26 204800 83 Linux
    Partition 1 does not end on cylinder boundary.
    /dev/sda2 26 1566 12374063+ 8e Linux LVM

    Disk /dev/sdb: 107.4 GB, 107374182400 bytes
    255 heads, 63 sectors/track, 13054 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Disk identifier: 0xe8cc095f

    Device Boot Start End Blocks Id System
    /dev/sdb1 1 13054 104856223+ 83 Linux

    Disk /dev/dm-0: 10.6 GB, 10552868864 bytes
    255 heads, 63 sectors/track, 1282 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Disk identifier: 0x00000000

    Disk /dev/dm-0 doesn't contain a valid partition table

    Disk /dev/dm-1: 2113 MB, 2113929216 bytes
    255 heads, 63 sectors/track, 257 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Disk identifier: 0x00000000

    Disk /dev/dm-1 doesn't contain a valid partition table
    [root@hda ~]# Disk /dev/sda: 12.9 GB, 12884901888 bytes
    255 heads, 63 sectors/track, 1566 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Disk identifier: 0x0007e3db

    Device Boot Start End Blocks Id System
    /dev/sda1 * 1 26 204800 83 Linux
    Partition 1 does not end on cylinder boundary.
    /dev/sda2 26 1566 12374063+ 8e Linux LVM

    Disk /dev/sdb: 107.4 GB, 107374182400 bytes
    255 heads, 63 sectors/track, 13054 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    -bash: Disk: command not found
    Disk identifier: 0xe8cc095f

    Device Boot Start End Blocks Id System
    /dev/sdb1 1 13054 104856223+ 83 Linux

    Disk /dev/dm-0: 10.6 GB, 10552868864 bytes
    255 heads, 63 sectors/track, 1282 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Disk identifier: 0x00000000

    Disk /dev/dm-0 doesn't contain a valid partition table

    Disk /dev/dm-1: 2113 MB, 2113929216 bytes
    [root@hda ~]# 255 heads, 63 sectors/track, 1566 cylinders
    -bash: 255: command not found
    [root@hda ~]# Units = cylinders of 16065 * 512 = 8225280 bytes
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Disk identifier: 0x00000000

    df -h
    ****

    Filesystem Size Used Avail Use% Mounted on
    /dev/mapper/vg_hda-lv_root
    9.7G 5.7G 3.6G 62% /
    tmpfs 503M 0 503M 0% /dev/shm
    /dev/sda1 194M 58M 127M 32% /boot
    /dev/sdb1 99G 89G 5.0G 95% /var/hda/files
    funionfs 99G 89G 5.0G 95% /var/hda/apps/ushare/files

  7. #6
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,729
    /dev/sdb1 has been mounted at /var/hda/files mount point. Create /media/sdb1 folder. Open /etc/fstab file and replace /var/hda/files with /media/sdb1.
    Execute mount -a command to remount partition.
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

  8. #7
    Just Joined!
    Join Date
    Aug 2010
    Posts
    4
    Thanks for the prompt reply.
    the problem is that /var/hda/files is full of files with various programs point towards them.
    i was thinking of adding the new hard drive and creating a mount point as you have said, copying the files from where they are to the new mount and then remounting /var/hda/files as something else.

  9. #8
    Just Joined!
    Join Date
    Mar 2005
    Location
    Corona, CA
    Posts
    29
    You can mount your disks wherever you like, then use soft links to cover your tracks. If you mount a disk under /media/sda, but are worried that some app will look for /var/hda/files, then

    sudo ln -s /media/sda /var/hda/files

    When some looks down the path /var/hda/files they will see whatever is in /media/sda, and everyone is happy.

  10. #9
    Just Joined!
    Join Date
    Mar 2005
    Location
    Corona, CA
    Posts
    29
    BTW, looks like your hostname is "hda" ? I would discourage you from naming servers after application names or computer terminology like "hda". It will end up confusing/annoying someone.

Posting Permissions

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