Mounting Separate partition.
4 Attachment(s)
hi,
I am using CentOS 6.5 in a non production environment. During installation I keep free space 5 GB.After installation i open terminal and format that partition,create a folder "common-share", Restart the system.Now in desktop i can see my separate partition.I can see it in /etc/mtab file that it is mounted on "sda4". The issue it I want to rename the name which is Code:
/dev/sda4/ /media/211975bc-3d50-41fb-b88d-4a3ec85a0720 Code:
/dev/sda4 /common-share ext4 defaults 0 0 thanks gardenair |
Your screenshots are a bit confusing. The sda4 line in fstab is commented out, therefore disabled; no wonder the partition is not mounted automatically. Also, you seem to have a directory named /verylongstringlookinglikeaUUID/common-share; why?
To achieve what you want:
The latter just mounts everything in fstab. |
I have even created a folder inside /dev/sda4 as "common-share" add it in /etc/fstab file.
Code:
/dev/sda4 /common-share ext4 defaults 0 0 if i remove the entry from /etc/fstab then it appear in my desktop(after rebooting) .Just like you plug a USB stick/drive in the system it show the drive icon. I do 'not know where i am doing wrong. One thing you can see in the 1st post snaps that the after giving comments (/etc/fstab) with Code:
# /dev/sda4 /common-share ext4 defaults 0 0 the partition is visble (after rebooting) . under /etc/mtab file it is visible. where i am doing mistake not know... |
Where, exactly, do you want the partition to be mounted? /common-share would be in the root directory.
You have to create this directory in the root directory with mkdir in order for the entry in fstab to work. |
Quote:
Code:
mkdir /common-share Quote:
Quote:
|
Quote:
The second column in fstab tells the system where you want to mount the device. Once the device is mounted, the mount location (/common-share in your example) will be the root of the drive, and all of the contents of the drive will be found inside of that directory. For that reason, the mount location needs to be created on your root filesystem BEFORE you can mount the drive there. In your case, your fstab is trying to mount the drive in /common-share, AND you've also created a directory called common-share on the drive. So once you create /common-share and the system is actually able to mount the drive, the directory you created will be /common-share/common-share (and you'll also have /common-share/lost+found, and /common-share/whatever-else-you-have-on-your-drive). |
2 Attachment(s)
Thanks "suicidaleggroll" I have tried working according to your direction. In the /dev/sda4 i delete the folder"common-share" and add the line in
/etc/fstab file as Code:
/dev/sda4 /common-share ext4 defaults 0 0 At end I use comments with Code:
# /dev/sda4 /common-share ext4 defaults 0 0 One thing more how can I change the label name of the dive/sda4. I am also attaching the screen short herewith. |
And did you create /common-share???
Uncomment the line in fstab, run "umount /dev/sda4", run "mount -a", and post the output. |
5 Attachment(s)
In my previous past i not create the folder inside "/dev/sda4" i not give comments (# vi /etc/fstab ) for /dev/sda4 but not success.
well now I have created "common-share" folder in /dev/sda4 ,uncomment the line in fstab ,it show me the drive The command which you have mentioned for output Code:
# mount -a |
:bangs head against wall:
1) Remove the directory common-share from your drive 2) Create the directory common-share in /, the root of your filesystem, currently mounted from sda2 As you can CLEARLY see from the screenshot you posted (please don't post screenshots when you can easily just copy/paste the text, it's a pain): Quote:
PLEASE READ THE ABOVE POSTS ON THIS TOPIC, this was covered already, in detail, see below: Quote:
Quote:
Quote:
http://www.tldp.org/HOWTO/Hard-Disk-Upgrade/mount.html |
3 Attachment(s)
Thanks "suicidaleggroll" for your reply and guiding me. All thumbs upto you.:hattip:
There is a technical reason which i want to understand regarding to it. I am going back a bit when i did installation and keep free apace i.e 5 GB. I use Code:
# fdisk /dev/sda Code:
# mkfs.etx4 /dev/sda4 Login ,here i can see a separate drive consisting of almost 5GB space on my desktop. As to my problem with direction of your guidance i delete the folder from /dev/sda4 and create a folder under "/" with name "common-share"and in etc/fstab i add the line Code:
/dev/sda4 /common-share ext4 defaults 0 0 Restart the system. In the "/" i can see the the folder properties which show it size almost 5 GB and with the mount command it is clearly visible that /dev/sda4 as mounted "common-share" folder. :) Theoretically why it not show as a separate drive. I would be thankful if you kindly en-light on it. |
I believe Gnome, the desktop software, only shows separate drives if they are mounted by Gnome - that is, Gnome detects the presence of currently not mounted media and mounts them automatically. Typical cases are CDROMs and USB drives.
In this case, however, the drive was already mounted at an early phase of system initialization, when fstab is processed and before Gnome started. Therefore Gnome took no action. The same is true for sda1, by the way. They all appear under the "filesystem" icon. You seem to want to:
This would require telling Gnome where to mount it. I don't know how to do that, and if it is possible. Or perhaps you keep things as they are now but manually create an icon for common-share. |
I am thankful to "suicidaleggroll" for his valuable guidance. :hattip: ,Appreciate you . :) thanks "berndbausch" as well.
|
Quote:
In Windows, every drive is separate. They all have their own unique, individual hierarchy. C: has its own hierarchy, and D: has its own which is COMPLETELY separate from the one on C:. "My Computer" HAS to show you all of the drives and partitions on the system, because there is no other way to access them. In Linux, there is ONE hierarchy that begins at /. EVERYTHING, all directories, all files, all drives, all partitions, are found in subdirectories of this ONE hierarchy. /home is /home, it will always be /home, it will always be located at /home, and you will always reference it as /home, but there's absolutely no requirement that /home lives on the same drive or partition as /, or any of the other directories in /. /home can live on a different partition, it can live on a different drive, it can even live on a different COMPUTER remote mounted through the local network or internet, yet it will still be located at /home in the hierarchy. Your new partition sda4 now lives at /common-share, that's its spot in the hierarchy, and anything placed in /common-share will end up on sda4. Your sda4 partition isn't being shown to you in your DE because your DE is just showing you shortcuts to the mount locations of your non-integral drives. sda4 is now in fstab, it's mounted on boot and Gnome assumes that if you've put the drive in fstab, you intend for it to be permanently mounted in that location. It doesn't give you a shortcut to it because it assumes you already know where it's mounted, because you put it there. It also doesn't give you shortcuts for sda2 mounted at /, or sda1 mounted at /boot, or tmpfs mounted at /dev/shm, because these are integral partitions that are part of your system, and you should already know where they are if you need to access them. Gnome is only going to show you the temporary partitions/drives that are auto-mounted in unique locations that you might not know where to find. |
Once again I am really thankful to all especially "suicidaleggroll" that he guide me in a very good manner. Appreciate him. :hattip:
|
All times are GMT -5. The time now is 05:53 AM. |