LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 05-25-2012, 01:21 PM   #16
414N
Member
 
Registered: Sep 2011
Location: Italy
Distribution: Slackware
Posts: 647

Rep: Reputation: 189Reputation: 189

No, it's not. I guess you can use ext4 even if the kernel is not of the 3.X.Y series. I may have been too pessimistic about ext4 stability (first introduced in kernel version 2.6.28)
 
Old 05-25-2012, 01:29 PM   #17
Vodkaholic1983
Member
 
Registered: May 2010
Distribution: Windows / Debian
Posts: 163

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by 414N View Post
No, it's not. I guess you can use ext4 even if the kernel is not of the 3.X.Y series. I may have been too pessimistic about ext4 stability (first introduced in kernel version 2.6.28)
Ok more errors lol

I tryed
Code:
mkfs.ext4 /dev/sda1
and got this

Code:
# mkfs.ext4 /dev/sda1
mke2fs 1.41.12 (17-May-2010)
/dev/sda1 is apparently in use by the system; will not make a filesystem here!
 
Old 05-25-2012, 01:32 PM   #18
414N
Member
 
Registered: Sep 2011
Location: Italy
Distribution: Slackware
Posts: 647

Rep: Reputation: 189Reputation: 189
Is it mounted? Check it using the mount command.
If not, maybe you need to restart the system to get the partition table written to the disk.
 
Old 05-25-2012, 01:36 PM   #19
Vodkaholic1983
Member
 
Registered: May 2010
Distribution: Windows / Debian
Posts: 163

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by 414N View Post
Is it mounted? Check it using the mount command.
If not, maybe you need to restart the system to get the partition table written to the disk.
got this back mate

Code:
/dev/sdc1 on / type ext3 (rw,grpquota,errors=remount-ro,usrquota)
tmpfs on /lib/init/rw type tmpfs (rw,nosuid,mode=0755)
proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
udev on /dev type tmpfs (rw,mode=0755)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=620)
 
Old 05-25-2012, 01:37 PM   #20
414N
Member
 
Registered: Sep 2011
Location: Italy
Distribution: Slackware
Posts: 647

Rep: Reputation: 189Reputation: 189
Then if you've chosen to write the new partitions to the devices with cfdisk, try rebooting the system before formatting.
 
Old 05-25-2012, 01:56 PM   #21
Vodkaholic1983
Member
 
Registered: May 2010
Distribution: Windows / Debian
Posts: 163

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by 414N View Post
Then if you've chosen to write the new partitions to the devices with cfdisk, try rebooting the system before formatting.
hmm odd after rebooting I get this


Code:
root@debian:~# mkfs.ext4 /dev/sda1
mke2fs 1.41.12 (17-May-2010)
Could not stat /dev/sda1 --- No such file or directory

The device apparently does not exist; did you specify it correctly?
 
Old 05-25-2012, 01:58 PM   #22
414N
Member
 
Registered: Sep 2011
Location: Italy
Distribution: Slackware
Posts: 647

Rep: Reputation: 189Reputation: 189
What does
Code:
fdisk -l
show now?
 
Old 05-25-2012, 01:58 PM   #23
Vodkaholic1983
Member
 
Registered: May 2010
Distribution: Windows / Debian
Posts: 163

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by 414N View Post
What does
Code:
fdisk -l
show now?
Code:
root@debian:~# fdisk -l

WARNING: GPT (GUID Partition Table) detected on '/dev/sda'! The util fdisk doesn't support GPT. Use GNU Parted.


Disk /dev/sda: 2000.4 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 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

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1      243201  1953512001   83  Linux

WARNING: GPT (GUID Partition Table) detected on '/dev/sdb'! The util fdisk doesn't support GPT. Use GNU Parted.


Disk /dev/sdb: 2000.4 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 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

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1      243201  1953512001   83  Linux

Disk /dev/sdc: 150.0 GB, 150038863360 bytes
255 heads, 63 sectors/track, 18241 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: 0x00055c68

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1   *           1       17498   140546048   83  Linux
/dev/sdc2           17498       18242     5974017    5  Extended
/dev/sdc5           17498       18242     5974016   82  Linux swap / Solaris
 
Old 05-25-2012, 02:03 PM   #24
414N
Member
 
Registered: Sep 2011
Location: Italy
Distribution: Slackware
Posts: 647

Rep: Reputation: 189Reputation: 189
Seems like you didn't remove GPT on those devices. Try again with parted as said some posts ago
 
Old 05-25-2012, 02:10 PM   #25
Vodkaholic1983
Member
 
Registered: May 2010
Distribution: Windows / Debian
Posts: 163

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by 414N View Post
Seems like you didn't remove GPT on those devices. Try again with parted as said some posts ago
Ah yes I somehow missed that post my bad

Ok I ran
Code:
parted /dev/sda
and it give me this

Code:
root@debian:~# parted /dev/sda
-bash: parted: command not found
 
Old 05-25-2012, 02:11 PM   #26
414N
Member
 
Registered: Sep 2011
Location: Italy
Distribution: Slackware
Posts: 647

Rep: Reputation: 189Reputation: 189
Then you need to install it via the package manager:
Code:
apt-get install parted
Once installed, retry.
 
Old 05-25-2012, 02:41 PM   #27
Vodkaholic1983
Member
 
Registered: May 2010
Distribution: Windows / Debian
Posts: 163

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by 414N View Post
Then you need to install it via the package manager:
Code:
apt-get install parted
Once installed, retry.
Yay! looks like it worked this time

Code:
root@debian:~# mkfs.ext4 /dev/sda1
mke2fs 1.41.12 (17-May-2010)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
122101760 inodes, 488378000 blocks
24418900 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=4294967296
14905 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks:
        32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
        4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968,
        102400000, 214990848

Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 34 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.
root@debian:~# mkfs.ext4 /dev/sdb1
mke2fs 1.41.12 (17-May-2010)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
122101760 inodes, 488378000 blocks
24418900 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=4294967296
14905 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks:
        32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
        4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968,
        102400000, 214990848

Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 23 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.
root@debian:~#
can I just add them say like this

/etc/2tb 1
/etc/2tb 2

Like this?

Thanks again for the help!
 
Old 05-25-2012, 03:13 PM   #28
414N
Member
 
Registered: Sep 2011
Location: Italy
Distribution: Slackware
Posts: 647

Rep: Reputation: 189Reputation: 189
While there's nothing preventing you to just mount them inside any empty folder you like, there are some conventions regarding Linux filesystem (you can find more info searching for Linux FHS) and one of these is to reserve /etc as a central place for configuration files.
If you'd like to adhere to current conventions, I suggest you create two new directories under /media or /mnt or at the root level (/).
Given that Linux filesystems are case sensitive, I suggest to use lowercase names without whitespaces in beetween, 'cause they're often a pain in the @## when found in a path name.
When you decided the location for these two new mounts, try mounting them as said in a previous post.
 
Old 05-25-2012, 03:24 PM   #29
Vodkaholic1983
Member
 
Registered: May 2010
Distribution: Windows / Debian
Posts: 163

Original Poster
Rep: Reputation: 0
Right there we go I think am all done now

Code:
root@debian:~# mount
/dev/sdc1 on / type ext3 (rw,grpquota,errors=remount-ro,usrquota)
tmpfs on /lib/init/rw type tmpfs (rw,nosuid,mode=0755)
proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
udev on /dev type tmpfs (rw,mode=0755)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=620)
/dev/sda1 on /2tb_A type ext4 (rw)
/dev/sdb1 on /2tb_B type ext4 (rw)
Does this look ok to you?

Cheers
 
Old 05-25-2012, 03:42 PM   #30
414N
Member
 
Registered: Sep 2011
Location: Italy
Distribution: Slackware
Posts: 647

Rep: Reputation: 189Reputation: 189
Looks good to me
In order to write in those two new directories as a normal user, we need to change those directories permissions.
If you issue a
Code:
ls -l /2tb*
command, you should see that those directories are owned by root:root (4th and 5th column of the output). Let's change that to root:users with
Code:
chown -R root:users /2tb*
You should test the ability to write on those mount points as a normal user temporarily switching to the unprivileged user you use on that machine (I'll call it user) with
Code:
su user
touch /2tb_A/testA
touch /2tb_B/testB
exit
If no errors appeared (such as cannot write to XYZ: permission denied) then we're good to go with /etc/fstab.
I don't know if you're comfortable with a shell text editor such as nano/vi/vim/emacs etc. If so, you need to append these two lines to the /etc/fstab file:
Code:
/dev/sda1    /2tb_A     ext4      defaults    0      2
/dev/sdb1    /2tb_B     ext4      defaults    0      2
If you're not comfortable with any shell text editors, you can append those lines via a echo command on the command line.
Just copy and paste these commands in your shell and it's all done.
BIG FAT WARNING: make sure you use double > (>>) as it means "append to the file". If you mistakenly use a single > then you'll overwrite the /etc/fstab file losing all the information currently contained therein.
Code:
echo "/dev/sda1    /2tb_A     ext4      defaults    0      2" >> /etc/fstab
echo "/dev/sdb1    /2tb_B     ext4      defaults    0      2" >> /etc/fstab
On next reboot you should see those two devices mounted in their location in the output of the mount command.

Last edited by 414N; 05-25-2012 at 03:44 PM.
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Copy "new files found" on my debain (Server) to windows 7 (Home PC) Vodkaholic1983 Linux - Newbie 6 05-13-2012 12:09 AM
[SOLVED] how to simulate "mkdir -p /home/blah1/blah2/blah3" in "c" where only /home exist platinumedge Linux - Newbie 4 10-04-2009 06:28 PM
LDAP login and "/home" server in one. Idea's and help 4 a charity's network peterlowrie Linux - Networking 4 05-18-2009 12:20 AM
How might I restore kmail folders/mail/settings from a "badly" saved "home"? deh6 Linux - Software 5 03-08-2008 09:25 PM
"cp -p" fails with "cp: setting permissions for `/home/svbld/t': Invalid argument" mkhesin Red Hat 1 02-28-2007 12:57 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 05:00 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration