LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   format new partition? (https://www.linuxquestions.org/questions/linux-newbie-8/format-new-partition-787143/)

qwertyjjj 02-04-2010 11:03 PM

format new partition?
 
Right, I almost royally messed up my server by trying to create a reiser filesystem.
I had to change the etc/fstab on reboot as it was failing.
This has removed the /home label on the /dev/sda2 partition.
fdisk -l gives:
Quote:

[root@ sysconfig]# fdisk -l

Disk /dev/sda: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 10 80293+ 83 Linux
/dev/sda2 11 29061 233352157+ 83 Linux
/dev/sda3 29062 29698 5116702+ 83 Linux
/dev/sda4 29699 30401 5646847+ 5 Extended
/dev/sda5 29699 30335 5116671 83 Linux
/dev/sda6 30336 30400 522081 82 Linux swap / Solaris
[root@ sysconfig]#

df -h gives the following but it is missing sda2
Do I have to remount it or something?
I then want to install reiser on the /dev/sda2 and relabel /home. I intend to have my squid cache on this drive also.
Quote:

[root@ ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda5 4.8G 1.5G 3.0G 34% /
/dev/sda3 4.8G 1.7G 2.9G 37% /var
/dev/sda1 76M 23M 50M 32% /boot
tmpfs 465M 0 465M 0% /dev/shm
[root@serve ~]#

EDIT: I successfully ran reiserfs on the partition but it will not now recognise the filesystem when trying to mount it.
Quote:

[root@serve ~]# mkfs.reiserfs /dev/sda2
mkfs.reiserfs 3.6.19 (2003 www.namesys.com)

A pair of credits:
The Defense Advanced Research Projects Agency (DARPA, www.darpa.mil) is the
primary sponsor of Reiser4. DARPA does not endorse this project; it merely
sponsors it.

Jeremy Fitzhardinge wrote the teahash.c code for V3. Colin Plumb also
contributed to that.


Guessing about desired format.. Kernel 2.6.18-164.11.1.el5 is running.
Format 3.6 with standard journal
Count of blocks on the device: 58338032
Number of blocks consumed by mkreiserfs formatting process: 9992
Blocksize: 4096
Hash function used to sort names: "r5"
Journal Size 8193 blocks (first block 18)
Journal Max transaction length 1024
inode generation number: 0
UUID: 98f490bc-f8a7-4e7b-9f3a-50ac6f1e98f8
ATTENTION: YOU SHOULD REBOOT AFTER FDISK!
ALL DATA WILL BE LOST ON '/dev/sda2'!
Continue (y/n):y
Initializing journal - 0%....20%....40%....60%....80%....100%
Syncing..ok

Tell your friends to use a kernel based on 2.4.18 or later, and especially not a
kernel based on 2.4.9, when you use reiserFS. Have fun.

ReiserFS is successfully created on /dev/sda2.
[root@serve ~]# fdisk -l

Disk /dev/sda: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 10 80293+ 83 Linux
/dev/sda2 11 29061 233352157+ 83 Linux
/dev/sda3 29062 29698 5116702+ 83 Linux
/dev/sda4 29699 30401 5646847+ 5 Extended
/dev/sda5 29699 30335 5116671 83 Linux
/dev/sda6 30336 30400 522081 82 Linux swap / Solaris
[root@serv]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda5 4.8G 1.5G 3.0G 34% /
/dev/sda3 4.8G 1.7G 2.9G 37% /var
/dev/sda1 76M 23M 50M 32% /boot
tmpfs 465M 0 465M 0% /dev/shm
[root@se]#

[root@serve ~]# mount /dev/sda2 /var/spool/squid
mount: unknown filesystem type 'reiserfs'
[root@server ~]#


kbp 02-04-2010 11:27 PM

There's an old post here that seems to indicate you need the CentOS Plus repo enabled, but I haven't tested this myself.

cheers

qwertyjjj 02-05-2010 07:40 AM

Quote:

Originally Posted by kbp (Post 3853405)
There's an old post here that seems to indicate you need the CentOS Plus repo enabled, but I haven't tested this myself.

cheers

Yep, it's enabled, that's how I downloaded reiserfs.

zhjim 02-05-2010 07:45 AM

Check out /proc/filesystems and see if it list reiserfs.
If not you would need to load the kernel module.

ongte 02-05-2010 08:16 AM

I'm not sure if you'll actually have the reiserfs module.
Fine out with:
Quote:

# modinfo reiserfs
You don't appear to be running the patched kernel. Just having the reiserfs-utils is not gonna be much good if the kernel won't mount it.
The post says the patched kernel will be indicated as .el5.centos.plus

Besides, reiserfs is left out of Centos/RHEL for a good reason. It does not work with SELinux.

qwertyjjj 02-07-2010 09:50 AM

Quote:

Originally Posted by ongte (Post 3853811)
I'm not sure if you'll actually have the reiserfs module.
Fine out with:

You don't appear to be running the patched kernel. Just having the reiserfs-utils is not gonna be much good if the kernel won't mount it.
The post says the patched kernel will be indicated as .el5.centos.plus

Besides, reiserfs is left out of Centos/RHEL for a good reason. It does not work with SELinux.

Supposedly it is a more efficient filesystem for squid than ext3.
Would you recommend I just use ext3 in the meantime?
I think the elrepo is here: http://elrepo.org/tiki/kmod-reiserfs

A reboot after this should enable the resierfs partition shouldn't it?
Quote:

[root@server yum.repos.d]# cat /proc/filesystems
nodev sysfs
nodev rootfs
nodev bdev
nodev proc
nodev cpuset
nodev binfmt_misc
nodev debugfs
nodev securityfs
nodev sockfs
nodev usbfs
nodev pipefs
nodev anon_inodefs
nodev futexfs
nodev tmpfs
nodev inotifyfs
nodev eventpollfs
nodev devpts
ext2
nodev ramfs
nodev hugetlbfs
iso9660
nodev mqueue
ext3
nodev rpc_pipefs
nodev autofs
[root@server yum.repos.d]# yum install reiserfs-utils kernel
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* addons: mirror.sov.uk.goscomb.net
* base: mirror.sov.uk.goscomb.net
* centosplus: mirror.sov.uk.goscomb.net
* extras: mirror.sov.uk.goscomb.net
* rpmforge: ftp-stud.fht-esslingen.de
* updates: mirror.sov.uk.goscomb.net
Excluding Packages in global exclude list
Finished
Setting up Install Process
Package 2:reiserfs-utils-3.6.19-2.4.1.i386 already installed and latest version
Package kernel-2.6.18-164.11.1.el5.centos.plus.i686 already installed and latest version
Nothing to do
[root@serve yum.repos.d]#


ongte 02-08-2010 08:27 AM

You need to have the reiserfs module loaded at boot.
You can try it this way:
Quote:

# echo modprobe reiserfs >> /etc/rc.modules
# chmod +x /etc/rc.modules
Hopefully this loads it up early enough in the boot process to allow fstab entries to mount it.


All times are GMT -5. The time now is 11:08 AM.