DaemonForums  

Go Back   DaemonForums > FreeBSD > FreeBSD General

FreeBSD General Other questions regarding FreeBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 12th July 2008
disappearedng disappearedng is offline
Shell Scout
 
Join Date: May 2008
Posts: 128
Default HELP Mount ERROR!!

Hi everyone,
I edited /etc/fstab and Freebsd gave me a mount error which prohibits me from mouning my harddisk with write option

Please take a look at what is wrong with my /etc/fstab
Code:
# Device                Mountpoint      FStype  Options         Dump    Pass#
# Device        Mountpoint              FStype  Options         Dump    Pass#
/dev/ad4s4b     none                    swap    sw              0       0
/dev/ad4s4a     /                       ufs     rw              1       1
/dev/ad4s4e     /tmp                    ufs     rw              2       2
/dev/ad4s4f     /usr                    ufs     rw              2       2
/dev/ad4s4d     /var                    ufs     rw              2       2
/dev/ad4s1c     /usr/mount/50gb         ufs     rw              2       2
/dev/ad4s2c     /usr/mount/350gb        ufs     rw              2       2
/dev/acd0       /cdrom                  cd9660  ro,noauto       0       0
FreeBSD complains that it can't mount /dev/ad4s1c and /dev/ad4s2c, which are ufs partitions

Code:
Disk name:      ad4                                    FDISK Partition Editor
DISK Geometry:  60801 cyls/255 heads/63 sectors = 976768065 sectors (476937MB)

Offset       Size(ST)        End     Name  PType       Desc  Subtype    Flags

         0         63         62        -     12     unused        0
        63   90188847   90188909    ad4s1      8    freebsd      165
  90188910  122865120  213054029    ad4s4      8    freebsd      165
 213054030  763714035  976768064    ad4s2      8    freebsd      165
 976768065       5103  976773167        -     12     unused        0
and this is my label editor
Code:
Disk: ad4       Partition name: ad4s1   Free: 90188847 blocks (44037MB)
Disk: ad4       Partition name: ad4s4   Free: 0 blocks (0MB)
Disk: ad4       Partition name: ad4s2   Free: 763714035 blocks (364GB)

Part      Mount          Size Newfs   Part      Mount          Size Newfs
----      -----          ---- -----   ----      -----          ---- -----
ad4s4a    <none>        512MB *
ad4s4b    swap         4046MB SWAP
ad4s4d    <none>       3047MB *
ad4s4e    <none>        512MB *
ad4s4f    <none>      51875MB *
thx
Reply With Quote
  #2   (View Single Post)  
Old 12th July 2008
graudeejs's Avatar
graudeejs graudeejs is offline
Real Name: Aldis Berjoza
ISO Quartermaster
 
Join Date: Jul 2008
Location: Riga, Latvia
Posts: 589
Default

adXsYc is not mountable

replace
Code:
/dev/ad4s1c     /usr/mount/50gb         ufs     rw              2       2
/dev/ad4s2c     /usr/mount/350gb        ufs     rw              2       2
with
Code:
/dev/ad4s1d     /usr/mount/50gb         ufs     rw              2       2
/dev/ad4s2d     /usr/mount/350gb        ufs     rw              2       2


from manual
Code:
Some partitions have certain conventions associated with them.
Partition 	Convention
a 	Normally contains the root file system
b 	Normally contains swap space
c 	Normally the same size as the enclosing slice. This allows utilities that need to work on the entire slice (for example, a bad block scanner) to work on the c partition. You would not normally create a file system on this partition.
d 	Partition d used to have a special meaning associated with it, although that is now gone and d may work as any normal partition.

Last edited by graudeejs; 12th July 2008 at 06:32 PM.
Reply With Quote
  #3   (View Single Post)  
Old 12th July 2008
disappearedng disappearedng is offline
Shell Scout
 
Join Date: May 2008
Posts: 128
Default

So I created the following:
Code:
Disk: ad4       Partition name: ad4s1   Free: 0 blocks (0MB)
Disk: ad4       Partition name: ad4s4   Free: 0 blocks (0MB)
Disk: ad4       Partition name: ad4s2   Free: 0 blocks (0MB)

Part      Mount          Size Newfs   Part      Mount          Size Newfs
----      -----          ---- -----   ----      -----          ---- -----
ad4s1d    <none>      44037MB *       ad4s2d    <none>        364GB *
ad4s4a    <none>        512MB *
ad4s4b    swap         4046MB SWAP
ad4s4d    <none>       3047MB *
ad4s4e    <none>        512MB *
ad4s4f    <none>      51875MB *
the funny thing is; under the sysinstall disk labelor, I see the mount point for ad4s1d and ad4s2d as <none>.

look at the following:
Code:
[disappearedng@ /usr/home/disappearedng]$ ls -a /usr/mount/
.       ..      350gb   50gb
So under /usr/mount, there are 2 directories, 50gb and 350gb.
When i try to select /usr/mount/50gb and /usr/mount/350gb as the mount points for ad4s1d ad4s2d respectively, I get the following error:

Code:
Unable to add /dev/ad4s4b as a swap device: Device busy
Error mounting /dev/ad4s2d on /usr/mount/350gb : Invalid argument
Error mounting /dev/ad4s1d on /usr/mount/50gb : Invalid argument
I have no idea what that means.

So i modified my /etc/fstab
Code:
# Device        Mountpoint              FStype  Options         Dump    Pass#
/dev/ad4s4b     none                    swap    sw              0       0
/dev/ad4s4a     /                       ufs     rw              1       1
/dev/ad4s4e     /tmp                    ufs     rw              2       2
/dev/ad4s4f     /usr                    ufs     rw              2       2
/dev/ad4s4d     /var                    ufs     rw              2       2
/dev/ad4s1d     /usr/mount/50gb         ufs     rw              2       2
/dev/ad4s2d     /usr/mount/350gb        ufs     rw              2       2
/dev/acd0       /cdrom                  cd9660  ro,noauto       0       0
and when it boots up, i get the error that ad4s1d and ad4s2d can't be mounted; some error etc.

WHat gives?

thx
Reply With Quote
  #4   (View Single Post)  
Old 12th July 2008
Carpetsmoker's Avatar
Carpetsmoker Carpetsmoker is offline
Real Name: Martin
Tcpdump Spy
 
Join Date: Apr 2008
Location: Netherlands
Posts: 2,243
Default

Did you newfs the newly created partitions? If not then do so, be careful, because newfs(8) will destroy all data on the partition.
__________________
UNIX was not designed to stop you from doing stupid things, because that would also stop you from doing clever things.
Reply With Quote
  #5   (View Single Post)  
Old 13th July 2008
disappearedng disappearedng is offline
Shell Scout
 
Join Date: May 2008
Posts: 128
Default

Now I haven't tried using newfs.
Are there any tutorial on newfs and bsdlabel? if that's the case, what is the command for bsdlabel that I have to use?

But then how does this address my question of bsd not recognizing my /usr/mount/50gb and 350gb/ directory? Why is it complaining that it can't recognize anything?

thx
Reply With Quote
  #6   (View Single Post)  
Old 13th July 2008
disappearedng disappearedng is offline
Shell Scout
 
Join Date: May 2008
Posts: 128
Default

RIght now
I have so many partitions that I don't even know how to deal with

ad4 ad4s1 ad4s1c ad4s1d ad4s2 ad4s2c ad4s2d ad4s4 ad4s4a ad4s4b ad4s4c ad4s4d ad4s4e ad4s4f

how do i add/create edit delete partitions here? sysinstall's changes are not permanent.
Reply With Quote
  #7   (View Single Post)  
Old 13th July 2008
BSDfan666 BSDfan666 is offline
Real Name: N/A, this is the interweb.
Banned
 
Join Date: Apr 2008
Location: Ontario, Canada
Posts: 2,223
Default

This my friends, is what we call an "impossible" user.
Reply With Quote
  #8   (View Single Post)  
Old 13th July 2008
J65nko J65nko is offline
Administrator
 
Join Date: May 2008
Location: Budel - the Netherlands
Posts: 4,125
Default

Quote:
Originally Posted by disappearedng View Post
ad4 ad4s1 ad4s1c ad4s1d ad4s2 ad4s2c ad4s2d ad4s4 ad4s4a ad4s4b ad4s4c ad4s4d ad4s4e ad4s4f
You have four slices on your ad4 disk:
  • ad4s1
    • ad4s1c
    • ad4s1d
  • ad4s2
    • ad4s2c
    • ad4s2d
  • ad4s3 (not used)
  • ad4s4
    • ad4s4a
    • ad4s4b
    • ad4s4c
    • ad4s4d
    • ad4s4e
    • ad4s4f

What is the output of the following commands
Code:
bsdlabel /dev/ad4s1
bsdlabel /dev/ad4s2
bsdlabel /dev/ad4s3
bsdlabel /dev/ad4s4
This will show which the sub-partitions/labels defined and which filesystems they contain.
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump
Reply With Quote
  #9   (View Single Post)  
Old 13th July 2008
disappearedng disappearedng is offline
Shell Scout
 
Join Date: May 2008
Posts: 128
Default

Code:
# /dev/ad4s4:
8 partitions:
#        size   offset    fstype   [fsize bsize bps/cpg]
  a:  1048576        0    4.2BSD        0     0     0
  b:  8286560  1048576      swap
  c: 122865120        0    unused        0     0         # "raw" part, don't edi                                                                            t
  d:  6240256  9335136    4.2BSD        0     0     0
  e:  1048576 15575392    4.2BSD        0     0     0
  f: 106241152 16623968    4.2BSD        0     0     0
[disappearedng@ /usr/home/disappearedng]$ sudo bsdlabel ad4s1
# /dev/ad4s1:
8 partitions:
#        size   offset    fstype   [fsize bsize bps/cpg]
  c: 90188847        0    unused        0     0         # "raw" part, don't edit
  d: 90188847        0    4.2BSD        0     0     0
[disappearedng@ /usr/home/disappearedng]$ sudo bsdlabel ad4s2
# /dev/ad4s2:
8 partitions:
#        size   offset    fstype   [fsize bsize bps/cpg]
  c: 763714035        0    unused        0     0         # "raw" part, don't edit
  d: 763714035        0    4.2BSD        0     0     0
[disappearedng@ /usr/home/disappearedng]$
Do i need to delete ad4s2c and ad4s1c? What is the raw part?

And to BSDfan666: if you are too ignorant to help out the community I suggest you stop spreading your negativity around.
Reply With Quote
Old 13th July 2008
J65nko J65nko is offline
Administrator
 
Join Date: May 2008
Location: Budel - the Netherlands
Posts: 4,125
Default

You don't edit label "c".
Label "c" is a virtual label, containing the size of the slice. The sizes of each "c" label should be the same as reported by fdisk

To be able to mount labels "d" of slice 1 and 2, they need to contain a filesystem, in other words they need to be formatted.
Code:
# newfs /dev/ad4s1d
# newfs /dev/ad4s2d
WARNING: this will destroy any data that these "d" partitions may contain.

After the newfs, you should be able to mount these "d' partitions manually
Code:
# mount /dev/ad4s1d /mnt
You now should be able to run
Code:
df -h
and see the size and other stats of this "d" partition.

I would suggest to create two directories, unmount the currently mounted one (ad4s1d), and manually mount on these directories
Code:
# mkdir -p /350gb /50gb
# umount /mnt
# mount /dev/ad4s1d /350gb
# mount /dev/ad4s2s /50gb
Rerun mount and df -h commands to check. Only when everything is OK, only then modify "/etc/fstab" and reboot
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump
Reply With Quote
Old 13th July 2008
disappearedng disappearedng is offline
Shell Scout
 
Join Date: May 2008
Posts: 128
Default

Thank you so much J65nko. You solved my problem.

It's because of individuals like you who are so helpful to others that make the FreeBSD project so successful today.
Reply With Quote
Old 13th July 2008
Carpetsmoker's Avatar
Carpetsmoker Carpetsmoker is offline
Real Name: Martin
Tcpdump Spy
 
Join Date: Apr 2008
Location: Netherlands
Posts: 2,243
Default

Quote:
how do i add/create edit delete partitions here? sysinstall's changes are not permanent.
You need to write your changes by pressing the W key.
__________________
UNIX was not designed to stop you from doing stupid things, because that would also stop you from doing clever things.
Reply With Quote
Old 13th July 2008
graudeejs's Avatar
graudeejs graudeejs is offline
Real Name: Aldis Berjoza
ISO Quartermaster
 
Join Date: Jul 2008
Location: Riga, Latvia
Posts: 589
Default

read this

http://www.freebsd.org/doc/en_US.ISO...anization.html
http://www.freebsd.org/doc/en_US.ISO...t-unmount.html
Reply With Quote
Old 13th July 2008
TerryP's Avatar
TerryP TerryP is offline
Arp Constable
 
Join Date: May 2008
Location: USofA
Posts: 1,547
Default

Quote:
Originally Posted by disappearedng View Post
Are there any tutorial on newfs and bsdlabel? if that's the case, what is the command for bsdlabel that I have to use?

The FreeBSD handbooks section on adding disks (and OpenBSDs FAQ on the same issue) and the manual pages for fdisk, bsdlabel, and newfs are good. There is no need to use sysinstall, the commands and manuals are very suitable.


In very simple terms:

fdisk == slice editor
bsdlabel == partition editor (within slice)
newfs == the program to (re)formats a partition with a BSD file system.
__________________
My Journal

Thou shalt check the array bounds of all strings (indeed, all arrays), for surely where thou typest ``foo'' someone someday shall type ``supercalifragilisticexpialidocious''.
Reply With Quote
Old 14th July 2008
J65nko J65nko is offline
Administrator
 
Join Date: May 2008
Location: Budel - the Netherlands
Posts: 4,125
Default

Quote:
Originally Posted by disappearedng View Post
It's because of individuals like you who are so helpful to others that make the FreeBSD project so successful today.
Thanks for the kind words. Although FBSD was my first BSD, I am more an OpenBSD person these days
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump
Reply With Quote
Reply

Tags
/etc/fstab, bsdlabel, disklabel, fdisk, mount

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
how to mount ext3 guitarscn FreeBSD General 2 26th August 2009 07:31 PM
mount ufs from linux kanonmat FreeBSD General 8 2nd December 2008 06:13 AM
NFS mount /usr/home? giddyupman FreeBSD General 1 1st September 2008 07:06 PM
Cannot mount (NTFS) IIMarckus OpenBSD General 4 11th August 2008 08:44 PM
USB mount problems?? bsdnewbie999 FreeBSD General 3 23rd May 2008 03:34 AM


All times are GMT. The time now is 02:48 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick