LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 12-28-2009, 11:21 PM   #1
mufy
Member
 
Registered: Oct 2004
Location: Kuwait
Distribution: Currently - AIX | Previously - RHEL 4 ES, FC 10
Posts: 206
Blog Entries: 4

Rep: Reputation: 30
Ubuntu 9.04 Adding a new Filesystem - My HOWTO


Hi,

The below is what I did to have a new filesystem created on a dual-boot (Windows XP - Ubuntu 9.04) box by reallocating some free space from the NTFS partition:

Code:
abc@abc-laptop:~$ sudo lvm 
[sudo] password for abc: 

lvm> dumpconfig 
  devices { 
  	dir="/dev" 
  	scan="/dev" 
  	preferred_names=[] 
  	filter="a/.*/" 
  	cache_dir="/etc/lvm/cache" 
  	cache_file_prefix="" 
  	write_cache_state=1 
  	sysfs_scan=1 
  	md_component_detection=1 
  	ignore_suspended_devices=0 
  } 
  activation { 
  	missing_stripe_filler="/dev/ioerror" 
  	reserved_stack=256 
  	reserved_memory=8192 
  	process_priority=-18 
  	mirror_region_size=512 
  	readahead="auto" 
  	mirror_log_fault_policy="allocate" 
  	mirror_device_fault_policy="remove" 
  } 
  global { 
  	umask=63 
  	test=0 
  	units="h" 
  	activation=1 
  	proc="/proc" 
  	locking_type=1 
  	fallback_to_clustered_locking=1 
  	fallback_to_local_locking=1 
  	locking_dir="/var/lock/lvm" 
  } 
  shell { 
  	history_size=100 
  } 
  backup { 
  	backup=1 
  	backup_dir="/etc/lvm/backup" 
  	archive=1 
  	archive_dir="/etc/lvm/archive" 
  	retain_min=10 
  	retain_days=30 
  } 
  log { 
  	verbose=0 
  	syslog=1 
  	overwrite=0 
  	level=0 
  	indent=1 
  	command_names=0 
  	prefix="  " 
  } 

lvm> lvmdiskscan 
  /dev/ram0  [       64.00 MB] 
  /dev/ram1  [       64.00 MB] 
  /dev/sda1  [       26.59 GB] 
  /dev/ram2  [       64.00 MB] 
  /dev/ram3  [       64.00 MB] 
  /dev/sda3  [      243.17 MB] 
  /dev/ram4  [       64.00 MB] 
  /dev/sda4  [        3.67 GB] 
  /dev/ram5  [       64.00 MB] 
  /dev/sda5  [       19.53 GB] 
  /dev/ram6  [       64.00 MB] 
  /dev/sda6  [        5.86 GB] 
  /dev/ram7  [       64.00 MB] 
  /dev/ram8  [       64.00 MB] 
  /dev/ram9  [       64.00 MB] 
  /dev/ram10 [       64.00 MB] 
  /dev/ram11 [       64.00 MB] 
  /dev/ram12 [       64.00 MB] 
  /dev/ram13 [       64.00 MB] 
  /dev/ram14 [       64.00 MB] 
  /dev/ram15 [       64.00 MB] 
  0 disks 
  21 partitions 
  0 LVM physical volume whole disks 
  0 LVM physical volumes 

lvm> lvmdiskscan -l 
  WARNING: only considering LVM devices 
  0 LVM physical volume whole disks 
  0 LVM physical volumes 

lvm> pvcreate -vf /dev/sda6 
    Set up physical volume for "/dev/sda6" with 12289662 available sectors 
    Zeroing start of device /dev/sda6 
  Physical volume "/dev/sda6" successfully created 

lvm> vgcreate Ubuntu_vg /dev/sda6 
  Volume group "Ubuntu_vg" successfully created 

lvm> lvcreate -n Ubuntu_lv Ubuntu_vg --size=5G 
  Logical volume "Ubuntu_lv" created 

lvm> lvscan 
  ACTIVE            '/dev/Ubuntu_vg/Ubuntu_lv' [5.00 GB] inherit 

sudo mount -f -o rw /dev/mapper/Ubuntu_vg-Ubuntu_lv /data 

sudo blkid
cat /etc/blkid.cat

mkdir /data

umount /dev/sda6
pvremove /dev/sda6

mkfs -t ext3 /dev/sda6
mount -t ext3 /dev/sda6 /data

edited /etc/fstab file:
/dev/sda6	/data	ext3	nouser,auto	0	0
 
Old 12-30-2009, 08:51 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975
Not really a howto, more a list of commands with no discussion. A forum is not a good place to post guides and the likes, instead please submit articles to out LinuxAnswers subsite, which is an ideal place for it.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Initrd as a root filesystem howto mrsiva Linux - Kernel 1 05-02-2008 09:46 AM
Adding Directory to Filesystem Zerianthekeeper Mandriva 2 05-18-2007 12:39 AM
Adding a shared filesystem to a dual boot Rawr101 Linux - General 5 01-01-2006 09:17 AM
Encrypted Root Filesystem HOWTO and /dev filesystem tmillard Linux From Scratch 0 10-18-2004 03:58 PM
Adding Filesystem Support jovix Linux - Newbie 2 08-27-2004 09:37 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 07:51 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration