The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Partition Issues

Discussion in 'General Discussion' started by fkatzenb, Feb 8, 2011.

  1. fkatzenb

    fkatzenb Well-Known Member

    Joined:
    Sep 23, 2009
    Messages:
    216
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Lusby, Maryland, United States
    cPanel Access Level:
    Root Administrator
    Just recently purchased my own server to colo and after my fresh install of CENTOS, which I gave /tmp it's own 2GB partition, I went to secure it. It was a bit different then what I was used to. I don't think I secure it correctly, etc, and I there is a mistake somewhere.

    Code:
    [root@one etc]# mount -a
    tmpfs: No such file or directory
    mount: mount point  does not exist
    
    Here is my fstab
    Code:
    [root@one /]# vi etc/fstab
    /dev/VolGroup00/LogVol00 /                       ext3    defaultss,usrquota         1 1
    LABEL=/tmp               /tmp                    ext3    loop,nosuid,noexec,rw        1 2
    LABEL=/boot1             /boot                   ext3    defaults        1 2
    tmpfs                    /dev/shm                tmpfs   loop,nosuid,noexec,rw        0 0
    devpts                   /dev/pts                devpts  gid=5,mode=620  0 0
    sysfs                    /sys                    sysfs   defaults        0 0
    proc                     /proc                   proc    defaults        0 0
    LABEL=SWAP-sda2          swap                    swap    defaults        0 0
    /dev/VolGroup00/LogVol01 swap                    swap    defaults        0 0
    :q^M<80>kd<80>kd<80>kd<80>kd:q^M
    What is up with the end of the fstab file? What is that VolGroup? I never saw this on my previous servers. Is it because of my RAID10?

    Thanks,
    Frank
     
  2. fkatzenb

    fkatzenb Well-Known Member

    Joined:
    Sep 23, 2009
    Messages:
    216
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Lusby, Maryland, United States
    cPanel Access Level:
    Root Administrator
    Oh and cpanel disk usage looks like this:
    Code:
    	Device 	Size 	Used 	Available 	Percent Used 	Mount Point
    	/dev/mapper/VolGroup00-LogVol00 	888G 	6.0G 	837G 	1% 	/
    	/dev/sda1 	99M 	19M 	75M 	21% 	/boot
    	/dev/sda3 	2.0G 	40M 	1.8G 	3% 	/tmp
     
  3. Cindu

    Cindu Well-Known Member

    Joined:
    Feb 7, 2011
    Messages:
    46
    Likes Received:
    0
    Trophy Points:
    6
    Hello,

    I could see you are using LVM (Logical Volume Manager). With LVM, you don’t need to spend time thinking about how much space you should allocate to a partition. You can make a partition as big or as small as you like. You can always dynamically add/reduce the space allocated to the partition. Even better, you can do this while your partition is online i.e. it is still mounted.

    There is nothing to worry about it ! Cheers!
     
  4. fkatzenb

    fkatzenb Well-Known Member

    Joined:
    Sep 23, 2009
    Messages:
    216
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Lusby, Maryland, United States
    cPanel Access Level:
    Root Administrator
    Interesting.

    What about the tempfs not being found?

    Thanks for the answer!
     
  5. madaboutlinux

    madaboutlinux Well-Known Member

    Joined:
    Jan 24, 2005
    Messages:
    1,052
    Likes Received:
    2
    Trophy Points:
    38
    Location:
    Earth
    What is the output of command

    To mount the tmp partition with the options mentioned in /etc/fstab, execute the following

    To verify if it is mounted with the all the options, execute the mount command again.
     
  6. fkatzenb

    fkatzenb Well-Known Member

    Joined:
    Sep 23, 2009
    Messages:
    216
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Lusby, Maryland, United States
    cPanel Access Level:
    Root Administrator

    Here is what I get...

    Code:
    root@one [~]# mount
    /dev/mapper/VolGroup00-LogVol00 on / type ext3 (rw,usrquota,usrquota)proc on /proc type proc (rw)
    sysfs on /sys type sysfs (rw)
    devpts on /dev/pts type devpts (rw,gid=5,mode=620)
    /dev/sda3 on /tmp type ext3 (rw,noexec,nosuid,loop=/dev/loop0)
    /dev/sda1 on /boot type ext3 (rw)
    none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
    sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
    /tmp on /tmp type none (rw,noexec,nosuid,bind)
    /tmp on /tmp type none (rw,noexec,nosuid)
    
    root@one [~]# mount -a
    tmpfs: No such file or directory
    mount: mount point does not exist
    
    root@one [~]# mount -o remount /tmp
    
    root@one [~]#
    
    It is the tmpfs that I am not sure about. I don't know if that is correct and if that is just a result of lock down. In addition, I don't understand that why /tmp is listed three times.

    Thanks,
    Frank
     
  7. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    From your existing /etc/fstab:

    Code:
    /dev/VolGroup00/LogVol00 /          ext3    defaultss,usrquota    1 1
    LABEL=/tmp               /tmp       ext3    loop,nosuid,noexec,rw 1 2
    LABEL=/boot1             /boot      ext3    defaults              1 2
    tmpfs                    /dev/shm   tmpfs   loop,nosuid,noexec,rw 0 0
    devpts                   /dev/pts   devpts  gid=5,mode=620        0 0
    sysfs                    /sys       sysfs   defaults              0 0
    proc                     /proc      proc    defaults              0 0
    LABEL=SWAP-sda2          swap       swap    defaults              0 0
    /dev/VolGroup00/LogVol01 swap       swap    defaults              0 0
    I would change this line:

    Code:
    tmpfs                    /dev/shm   tmpfs   loop,nosuid,noexec,rw        0 0
    To this:

    Code:
    tmpfs                    /dev/shm   tmpfs   defaults       0 0
    I'm uncertain why /dev/shm which isn't the temp directory would be labelled with those options. It should be set to defaults typically.

    As an example, here is /etc/fstab on a test machine:

    Code:
    root@pride [~]# cat /etc/fstab
    LABEL=/1                /                  ext3    defaults,usrquota 1 1
    tmpfs                   /dev/shm           tmpfs   defaults          0 0
    devpts                  /dev/pts           devpts  gid=5,mode=620    0 0
    sysfs                   /sys               sysfs   defaults          0 0
    proc                    /proc              proc    defaults          0 0
    LABEL=SWAP-sda2         swap               swap    defaults          0 0
    /usr/tmpDSK             /tmp               ext3    defaults,noauto   0 0
    Next, I would really like to suggest using cat /etc/fstab or cat whenever you want to get the contents of a file without making changes to it. Using vi or any editor will open it for editing. If you aren't planning to edit the file, it's better to cat it instead.

    Thanks.
     
  8. fkatzenb

    fkatzenb Well-Known Member

    Joined:
    Sep 23, 2009
    Messages:
    216
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Lusby, Maryland, United States
    cPanel Access Level:
    Root Administrator
    Thanks Tristan.

    When I read your response, the light bulb went off and I realized how I screwed it up.

    Was
    Code:
    tmpfs                    /dev/shm   tmpfs   loop,nosuid,noexec,rw        0 0
    Supposed to be
    Code:
    tmpfs                    /dev/shm   tmpfs   defaults,nosuid,noexec,rw        0 0
    I went crosseyed when securing the server that I missed that part. It would appear that tmpfs is handled differently then ext3.

    Fun!

    Thanks,
    Frank
     
Loading...

Share This Page