Page 1 of 2 12 LastLast
Results 1 to 10 of 20

Thread: /media has my external drive mounted and won't let go

  1. #1
    Join Date
    Jan 2008
    Location
    Canada
    Beans
    430
    Distro
    Kubuntu 14.10 Utopic Unicorn

    Question /media has my external drive mounted and won't let go

    I'm running Voyager 64bit which is basically xubuntu on an 11GB partition.

    After installing humble bundle 6 I ran out of space (/ and home on same partition)

    I successfully expanded the space with a live boot of gparted last night to 16GB.

    Tonight I'm out of space again.

    I have an external drive regularly attached that Deluge uses.

    I unattached the drive, rebooted, and find part of it still in /media, I guess as much as would fit (properties said 20GB (??))

    I probably manually mounted it some time ago when trying to learn how to have it mount automatedly.

    How to unmount and just have it mount when attached and not use local space?

  2. #2
    Join Date
    Jul 2010
    Location
    ozarks, Arkansas, USA
    Beans
    14,193
    Distro
    Xubuntu 22.04 Jammy Jellyfish

    Re: /media has my external drive mounted and won't let go

    finny388; Hi !

    Firstly, I would be concerned with the disk space usage, and start with checking my log files for huge ones.

    media mounts: do you properly unmount the drive prior to unplugging it?
    Is there an entry in /etc/fstab file for media ? As usb devices are auto detected and mounted to media I do not believe there is a need to list the device in fstab ?


    just try'n to help <==BDQ

  3. #3
    Join Date
    Jan 2008
    Location
    Canada
    Beans
    430
    Distro
    Kubuntu 14.10 Utopic Unicorn

    Re: /media has my external drive mounted and won't let go

    thanks
    Firstly, I would be concerned with the disk space usage, and start with checking my log files for huge ones.
    It appears that /media is the space problem. Many files/folders for my external drive are mirrored there.

    I don't know how to check logs

    here is my fstab

    Code:
    # /etc/fstab: static file system information.
    #
    # Use 'blkid' to print the universally unique identifier for a
    # device; this may be used with UUID= as a more robust way to name devices
    # that works even if disks are added and removed. See fstab(5).
    #
    # <file system> <mount point>   <type>  <options>       <dump>  <pass>
    proc            /proc           proc    nodev,noexec,nosuid 0       0
    # / was on /dev/sda9 during installation
    UUID=7d503083-eac3-4bb7-af6a-e05cca8157f3 /               ext4    errors=remount-ro 0       1
    # swap was on /dev/sda5 during installation
    UUID=49d823b5-af8b-494d-86be-df3d29a41636 none            swap    sw              0       0
    # FH
    #/dev/sda11     /media/LOCAL_HD ext4    umask=000       0       0
    #/dev/sdb1      /media/HITACHI  ntfs-3g umask=000       0       0
    #HITACHI
    #UUID="482EDE3C2EDE22AC"
    #LOCAL_HD
    #UUID="8484529f-db3d-40dd-b950-8bcf2030cfa6"

  4. #4
    Join Date
    Jul 2010
    Location
    ozarks, Arkansas, USA
    Beans
    14,193
    Distro
    Xubuntu 22.04 Jammy Jellyfish

    Re: /media has my external drive mounted and won't let go

    finny388; yuk!

    fstab entry for sda11 is invalid mixture of ubuntu/windows options.

    and again I do not see why you need to mount the usb devide in fstab ( i run usb drive formated fat32 with no probs at all auto mounting)
    related: is sdb1 the usb drive ?
    This is a great tutorial on fstab:
    http://ubuntuforums.org/showthread.php?t=283131
    and a primer:
    https://help.ubuntu.com/community/Fstab

    lets look at what your partitions look like and your UUID assignments;
    terminal code:
    Code:
    sudo fdisk -l
    sudo blkid
    definitely check log file sizes:
    Code:
    ls -la /var/log/
    anything "large" :
    Code:
    cat /var/log/<filename> | less
    to get an idea of what is going on.
    then all old files may be safely deleted.
    one step at a time gets it done ==>BDQ

  5. #5
    Join Date
    Jan 2008
    Location
    Canada
    Beans
    430
    Distro
    Kubuntu 14.10 Utopic Unicorn

    Re: /media has my external drive mounted and won't let go

    yes, sdb1 was the external usb drive (below it is my usb key with gparted)

    Code:
    > sudo fdisk -l
    
    Disk /dev/sda: 250.1 GB, 250059350016 bytes
    255 heads, 63 sectors/track, 30401 cylinders, total 488397168 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk identifier: 0x29133921
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sda1   *        2048   104856254    52427103+   7  HPFS/NTFS/exFAT
    /dev/sda2       104856255   136327589    15735667+  1c  Hidden W95 FAT32 (LBA)
    /dev/sda3       488355840   488397167       20664   ef  EFI (FAT-12/16/32)
    /dev/sda4       136331262   482211839   172940289    f  W95 Ext'd (LBA)
    /dev/sda5       136331264   146571263     5120000   82  Linux swap / Solaris
    /dev/sda6       146573312   171149311    12288000   83  Linux
    /dev/sda7       171151360   195727359    12288000   83  Linux
    /dev/sda8       195729408   220305407    12288000   83  Linux
    /dev/sda9       233971712   269461503    17744896   83  Linux
    /dev/sda10      269463552   482211839   106374144   83  Linux
    
    Partition table entries are not in disk order
    
    Disk /dev/sdb: 4022 MB, 4022337024 bytes
    124 heads, 62 sectors/track, 1021 cylinders, total 7856127 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk identifier: 0x00041fd5
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sdb1   *          62     7849447     3924693    b  W95 FAT32
    Code:
    > sudo blkid
    /dev/sda1: LABEL="Windows7" UUID="D074D6AA74D69298" TYPE="ntfs" 
    /dev/sda2: LABEL="RECOVERYM-^UGV" UUID="86F4-D40A" TYPE="vfat" 
    /dev/sda5: UUID="49d823b5-af8b-494d-86be-df3d29a41636" TYPE="swap" 
    /dev/sda6: LABEL="MINT13_XFCE" UUID="13f65ba2-df3f-4823-9f64-3560b9cee6e0" TYPE="ext4" 
    /dev/sda7: LABEL="MINT12_KDE" UUID="24b232e3-341f-48d7-b602-4d32a822ce30" TYPE="ext4" 
    /dev/sda8: LABEL="UBUNTU1204" UUID="af948a83-eadb-46e1-94fa-8629271a7b0b" TYPE="ext4" 
    /dev/sda9: LABEL="VOYAGER" UUID="7d503083-eac3-4bb7-af6a-e05cca8157f3" TYPE="ext4" 
    /dev/sda10: LABEL="LOCAL_HD" UUID="8484529f-db3d-40dd-b950-8bcf2030cfa6" TYPE="ext4" 
    /dev/sdb1: LABEL="GPARTED" UUID="8616-CB80" TYPE="vfat"
    ls -la /var/log/

    Largest log file is 1.7M. The rest are less than 1M at 15K, 40K, a couple 500K

    Code:
    > cat /var/log/<filename> | less
    bash: syntax error near unexpected token `|'
    I do know that all the space used up is in /media. There are many large files in there. I don't need them.

    Do I just delete the folder HITACHI and all its contents or do I have to unmount it or both? (HITACHI is the drive name of my Hitachi external harddrive)
    Last edited by finny388; October 17th, 2012 at 05:49 AM. Reason: Clarification

  6. #6
    Join Date
    Jul 2010
    Location
    ozarks, Arkansas, USA
    Beans
    14,193
    Distro
    Xubuntu 22.04 Jammy Jellyfish

    Re: /media has my external drive mounted and won't let go

    I am looking... may take me a while to digest this ... and is late here my time, I am tired and at this point I tend to make stupid judgment calls, so will look this over and advise in my AM.
    Obviously will have to edit /etc/fstab.. I will be careful in my advisement.

    I notice the boot flag is set for the sdb1 usb device, are you booting ubuntu from the device ?

    sda11 ? is that to be a shared data partition ? and shared to all 3 operating systems - I see mint, windows and ubuntu ?

    The current /media folder ..insure all are duplicates and as far as correcting fstab --- delete everything. If required we will make a mount point there later.
    just try'n to help <==BDQ

  7. #7
    Join Date
    Jan 2008
    Location
    Canada
    Beans
    430
    Distro
    Kubuntu 14.10 Utopic Unicorn

    Re: /media has my external drive mounted and won't let go

    Thanks Bashing, I was nodding off myself

    regarding fstab, I believe all my manual entries are commented out. Isn't the that the hash sign?

    I don't boot from the Hitachi (but to make things confusing, since unplugging the Hitachi, and plugging in my usb key to do live gparted, it has now been assigned sdb1, which of course I boot from)

    sda11 is meant to be seen by all as is the hitachi

    all the files in /media are duplicates (HITACHI is the only sub folder)

    i'll be home again tonight to try the unmount/delete.

    thanks again

  8. #8
    Join Date
    Jul 2010
    Location
    ozarks, Arkansas, USA
    Beans
    14,193
    Distro
    Xubuntu 22.04 Jammy Jellyfish

    Re: /media has my external drive mounted and won't let go

    You are correct. The "#" sign "comments" out the line. They are irrelevant at this time.

    sda11: no longer exist and also is irrelevant.
    sda8: What is it ?(/home for ubie??) As it is formated "ext4" windows can not recognize it ...If it is to be a shared directory --will require reformatting to (suggestion) ntfs.
    sda10: ?? same same->What is it ? As it is formated "ext4" windows can not recognize it ...If it is to be a shared directory --will require reformatting to (suggestion) ntfs.
    Depending on what you want to do with the sada8/sda10 partitions may need to add them to /etc/fstab.

    With the /media/ directory cleaned out, neglecting sda8/sda10 at this time; I expect you to be looking in good shape.

    Looking at things, all I see to deal with is the sda8 and sda10 partitions.

    your system as now:
    windows is partitions 1,2,3,4
    swap for mint and ubuntu partition 5
    mint partitions 6 and 7 each with different desk tops
    ubie 12.04 partition 8 -> presently unassigned
    ubie 12.04 partition 9 as root
    unknown partition 10.

    If sda8 and 10 partitions are "data" partitions: This is how I have configured my system; For your consideration:
    I have my "data" partitions separate and isolated from the rest of my system by having my mount points in the /mnt/ directory and only mounting these partitions ondemand->
    Code:
    sudo mkdir /mnt/backup
    sudo mount /dev/sdb1 /mnt/backup
    sudo chown USER_NAME:USER_NAME /mnt/backup/<anysub-folders>
    when I am done I manually un-mount the partitions:
    Code:
    sudo umount /mnt/backup
    backup is my reference point..make yours to whatever reference you want to use.
    Do you concur ? If so, we proceed to see what you want to do with sda8 and sda10.
    one step at a time ==> BDQ



  9. #9
    Join Date
    Jan 2008
    Location
    Canada
    Beans
    430
    Distro
    Kubuntu 14.10 Utopic Unicorn

    Re: /media has my external drive mounted and won't let go

    When you mount:
    Code:
    sudo mount /dev/sdb1 /mnt/backup
    does it copy sdb1 files to /mnt/backup or does /mnt/backup just point to sdb1?

    I thought it was just pointing but my "backup" seems to have copied until the drive was full (I have 4KB available).

    First things first: do I umount /media/HITACHI or delete HITACHI?

    By the way, I don't understood why my laptop is still working with only 4k available. (df -h shows 4k avail.)

    For your consideration my setup is like this:
    Partitions
    1-4 Windows
    5 Swap for the below OS's
    6 experimental OS (for fun)
    7 experimental OS (for fun)
    8 Ubuntu 12.04 (was Main)
    9 Voyage (Now Main)
    10 to be assigned (probably to merge this Ubuntu 12.04)
    11 Temp Local Storage (temporary, when on the road)

    Main storage is the Hitachi external hard drive (occasionally backed up to another external drive)

  10. #10
    Join Date
    Jul 2010
    Location
    ozarks, Arkansas, USA
    Beans
    14,193
    Distro
    Xubuntu 22.04 Jammy Jellyfish

    Re: /media has my external drive mounted and won't let go

    This is basic simplicity:
    "sudo mkdir /mnt/backup" -> makes an attachment to the root file system such that the system is aware of the directory.
    "sudo mount /dev/sdb1 /mnt/backup tells the system we want access to the filesystem at this point, through that attachment.
    These assignments do not copy anything at all, only sets up reference points.
    Backup is my reference name, can be anything ...such as "hitachi" if you like.

    If you desire to mount through /media ...there is no need for an explicit mount point, as the system automagically mounts the usb device upon insertion. So if you are referring to delete a mount point for "HITACHI" in media ...yes you may delete it ...
    As the device is automagically mounted there is no need for an entry in fstab....

    My example mounting is in reference to what you want to do with the present sda8/10 partitions.

    As to only having 4k of overhead --like you I do not see how it can operate (lots of ram ?)

    sda11 ...on last "fdisk" did not exist.

    a last point to make here ...before removing a usb device it must be unmounted, The easiest method is via the file manager right click the icon and choose "safely remove device" (I have to do this twice for some reason I have nor explored).. The manner in which linux processes files is a caching method, all files are not written/closed until the device is unmounted, then the cache is cleared/flushed and open files closed. Only then can the device be un-attached.

    I hope I am Helping <==BDQ

Page 1 of 2 12 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

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