Turn off automount
add AUTOMOUNT=-NO- to /etc/hostconfig
create mount point in fs
sudo mkdir /mnt/raid
add mount command to /etc/fstab
nas:/mnt/raid /mnt/raid nfs noauto,rw,async
restart
This blog serves as a dumping ground for my own interests. On it you will find anything which I want to keep track of; links, articles, tips and tricks. Mostly it focuses on C++, Javascript and HTML, linux and performance.
Showing posts with label raid. Show all posts
Showing posts with label raid. Show all posts
Saturday, 3 December 2011
Fedora 16: NFS Server
in /etc/exports, add the path you want to share, and the ip addresss or range you want to give access to, followed by some options
/mnt/raid 192.168.1.0/255.255.255.0(rw,no_subtree_check,async)
display exported directories
showmount --exports
/mnt/raid 192.168.1.0/255.255.255.0(rw,no_subtree_check,async)
rw: read-write access
no_subtree_check: speeds up access by turning off the check that the current folder is a subtree in the same volume
async: speeds up access by turning off synchronous acks
start the requisite services
systemctl start rpcbind.service
systemctl start nfs-server.service
systemctl start nfs-lock.service
systemctl start nfs-idmap.service
enable automatic restart
systemctl enable rpcbind.service
systemctl enable nfs-server.service
systemctl enable nfs-lock.service
systemctl enable nfs-idmap.service
display exported directories
showmount --exports
Wednesday, 30 November 2011
Fedora 16: mount software raid
change to root
$ sudo su
create a mount point for the raid
# mkdir /mnt/raid
save old mdadm config (just in case)
# mv /etc/mdadm.conf /etc/mdadm.conf.bak
copy raid details into mdadm config
# mdadm --detail --scan > /etc/mdadm.conf
> creates a file somewhat like this:
> ARRAY /dev/md/NAS:0 metadata=1.2 name=NAS:0 UUID=4dc53f9d:f0c55279:a9cb9592:a59607c9
add the raid configuration to your /etc/fstab file (notice the 1st field is the device, which is the same as the 2nd field returned from mdadm --detail --scan)
/dev/md/NAS:0 /mnt/raid ext4 defaults 1 2
mount the raid
# mount -a
check its status
# cat /proc/mdstat
Personalities : [raid6] [raid5] [raid4]
md127 : active raid5 sdb1[2] sde1[1] sdd1[4] sda1[0]
5860538880 blocks super 1.2 level 5, 512k chunk, algorithm 2 [4/4] [UUUU]
unused devices: <none>
$ sudo su
create a mount point for the raid
# mkdir /mnt/raid
save old mdadm config (just in case)
# mv /etc/mdadm.conf /etc/mdadm.conf.bak
copy raid details into mdadm config
# mdadm --detail --scan > /etc/mdadm.conf
> creates a file somewhat like this:
> ARRAY /dev/md/NAS:0 metadata=1.2 name=NAS:0 UUID=4dc53f9d:f0c55279:a9cb9592:a59607c9
add the raid configuration to your /etc/fstab file (notice the 1st field is the device, which is the same as the 2nd field returned from mdadm --detail --scan)
/dev/md/NAS:0 /mnt/raid ext4 defaults 1 2
mount the raid
# mount -a
check its status
# cat /proc/mdstat
Personalities : [raid6] [raid5] [raid4]
md127 : active raid5 sdb1[2] sde1[1] sdd1[4] sda1[0]
5860538880 blocks super 1.2 level 5, 512k chunk, algorithm 2 [4/4] [UUUU]
unused devices: <none>
Subscribe to:
Posts (Atom)