Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I got 4 hard disk. I simply create a single partition in all of them. I format them all with ext 3. And then I rewrite fstab

All right, I'll just add a few line to fstab

#
# /etc/fstab
# Created by anaconda on Wed Dec 19 15:22:22 2012
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
/dev/mapper/VolGroup-lv_root    /   ext4    usrjquota=quota.user,jqfmt=vfsv0    1   1
UUID=1450c2bf-d431-4621-9e8e-b0be57fd79b6 /boot                   ext4    defaults        1 2
/dev/mapper/VolGroup-lv_home    /home   ext4    usrjquota=quota.user,jqfmt=vfsv0    1   2
/dev/mapper/VolGroup-lv_swap swap                    swap    defaults        0 0
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
/usr/tmpDSK             /tmp                    ext3    defaults,noauto        0 0
/home2                  /dev/sdb1               auto    auto,defaults         0 3    
/home3                  /dev/sdc1               auto    auto,defaults         0 4    
/home4                  /dev/sdd1               auto    auto,defaults         0 5    

Am I doing this correctly?

Any suggestion to improve?

I wonder why /dev/sda1 shows up nowwhere in fstat.

So I just change this and after that restart server right?

this is the result of fdisk -l

root@host [/home/freemark/backup]# fdisk -l

Disk /dev/sda: 1500.3 GB, 1500301910016 bytes
255 heads, 63 sectors/track, 182401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0009e006

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          64      512000   83  Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2              64      182402  1464625152   8e  Linux LVM

Disk /dev/sdb: 1500.3 GB, 1500301910016 bytes
255 heads, 63 sectors/track, 182401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0007ad8f

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1      182401  1465136001   8e  Linux LVM

Disk /dev/sdd: 1500.3 GB, 1500301910016 bytes
255 heads, 63 sectors/track, 182401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000e43c4

   Device Boot      Start         End      Blocks   Id  System
/dev/sdd1               1      182401  1465136001   8e  Linux LVM

Disk /dev/sdc: 1500.3 GB, 1500301910016 bytes
255 heads, 63 sectors/track, 182401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0006f9d9

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1               1      182401  1465136001   8e  Linux LVM

Disk /dev/mapper/VolGroup-lv_root: 53.7 GB, 53687091200 bytes
255 heads, 63 sectors/track, 6527 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000


Disk /dev/mapper/VolGroup-lv_swap: 36.0 GB, 35953573888 bytes
255 heads, 63 sectors/track, 4371 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000


Disk /dev/mapper/VolGroup-lv_home: 1410.1 GB, 1410133393408 bytes
255 heads, 63 sectors/track, 171438 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

After I reboot, I still cannot access /homne2 /home3/ and /home4

Also everything has become so slow.

At first there is a space between auto, and defaults. I removed that and reboot again. Now things work well. Still there is no /home2

if I type mounts

I got

root@host [/etc]# mount
/dev/mapper/VolGroup-lv_root on / type ext4 (rw,usrjquota=quota.user,jqfmt=vfsv0)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
tmpfs on /dev/shm type tmpfs (rw,rootcontext="system_u:object_r:tmpfs_t:s0")
/dev/sda1 on /boot type ext4 (rw)
/dev/mapper/VolGroup-lv_home on /home type ext4 (rw,usrjquota=quota.user,jqfmt=vfsv0)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
/usr/tmpDSK on /tmp type ext3 (rw,noexec,nosuid,loop=/dev/loop0)
/tmp on /var/tmp type none (rw,noexec,nosuid,bind)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)

Update: Looks like I make a mistake. The mount name should be on the second column. Let me get this fixed first before anyone answer.

share|improve this question
    
Since they are independent disks why check them one after the other rather than running fsck simultaneously? (The last value is when to fsck the disk if needed. If you have multiple partitions on the same rotating disk you do them one after another to de-conflict head movements. For independent drives this is not needed and parallel fsck is faster) –  Hennes Dec 24 '12 at 10:49
    
Leaving aside the fact you've got the devicenames and mount points reversed, Why are you using LVM on a single disk? Why are you using ext3 for these disks when you've got ext4 elsewhere? Why quotas on /home but not on /homeX? –  symcbean Dec 24 '12 at 11:45
    
Because I have just been hired to administer server a few days ago. My boss is on budget. Actually I want to move to ext2. Journalling incur HUGE writes. –  Sharen Eayrs Jan 9 '13 at 6:56

1 Answer 1

up vote 3 down vote accepted
  • You have the syntax of the fstab file reversed. The device name goes in the first field, the mount point into the second:

    /dev/sdd1 /home4 auto auto, defaults 0 5

  • /dev/sda1 doesn't appear because it is referenced via the UUID:

    UUID=1450c2bf-d431-4621-9e8e-b0be57fd79b6 /boot ext4 defaults 1 2

  • It is usually not necessary to restart a server after an edit to /etc/fstab, you simply can mount the new disks by hand, e.g. with mount /home4 it the mount points are correctly referenced in the fstab.

Also, your disks appear to be partitioned as LVM partitions, not Linux partitions. Did you intend to add these disks to your /home LVM volume? This is what I would recommend to do (and maybe bring a RAID into the mix with so many disks), but you would have to things quite differently (search for LVM on SF or google).

share|improve this answer
    
No. I think this should be /home2 /home3 /home4 respectively. WHy should it be a subdirectory of /home –  Sharen Eayrs Dec 24 '12 at 10:38
    
Problem solved :) –  Sharen Eayrs Dec 24 '12 at 10:59
    
LVM allows to use multiple disk as a combined larger one. You would only end up with a single mountpoint for all 4 disks. (en.wikipedia.org/wiki/Logical_Volume_Manager_%28Linux%29) That aside, I think having a common base dir for different volumes containing home directories is actually a good idea (think /home/1, /home/2 etc.). One advantage is that you would need to export only a single directory for NFS home shares etc. –  SvW Dec 24 '12 at 12:10

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.