The Official *nix Thread

Inane baanter or words of wisdom - you decide...
Post Reply
User avatar
RageMatrix
Baaaaaaa!
Baaaaaaa!
Posts: 5515
Joined: Fri May 10, 2002 12:52 pm 0
XBL Gamertag: Jon256
Location: East Sussex

Re: The Official *nix Thread

Post by RageMatrix »

Yup, I already had to do the reboot thing - but that's okay, I was expecting it as my test machine only has the one physical disk :)
XBox Gamertag: Jon256
Wii Code: 4849 1090 9042 6725
"Wrapped in metal, wrapped in ivy"
The Official UNIX/Linux Thread
davetsmith
Posts: 7
Joined: Wed Jan 22, 2003 10:58 pm 0
Location: Southampton

Re: The Official *nix Thread

Post by davetsmith »

Try partprobe to avoid the reboot when using fdisk. It's from gnu parted.
User avatar
RageMatrix
Baaaaaaa!
Baaaaaaa!
Posts: 5515
Joined: Fri May 10, 2002 12:52 pm 0
XBL Gamertag: Jon256
Location: East Sussex

Re: The Official *nix Thread

Post by RageMatrix »

Cool, I'll look into that.
XBox Gamertag: Jon256
Wii Code: 4849 1090 9042 6725
"Wrapped in metal, wrapped in ivy"
The Official UNIX/Linux Thread
User avatar
RageMatrix
Baaaaaaa!
Baaaaaaa!
Posts: 5515
Joined: Fri May 10, 2002 12:52 pm 0
XBL Gamertag: Jon256
Location: East Sussex

Re: The Official *nix Thread

Post by RageMatrix »

Okay, I'm stuck :(

My Logical Volume is mounted as /mnt/lvm. This has a size of 500MB. I created this with: -

Code: Select all

lvcreate -L 500M -n LogVol01 VolGroup01
The actual partition (/dev/hda5) is 5GB. So I want to resize the current Logical Volume.

Code: Select all

[root@joshua9 ~]# lvdisplay
  --- Logical volume ---
  LV Name                /dev/VolGroup01/LogVol01
  VG Name                VolGroup01
  LV UUID                Gji013-ROYQ-Qj9C-OETa-JeVS-980X-1dhtlU
  LV Write Access        read/write
  LV Status              available
  # open                 1
  LV Size                500.00 MB
  Current LE             125
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:0

[root@joshua9 ~]# lvextend /dev/VolGroup01/LogVol01 --size 1000MB
  Extending logical volume LogVol01 to 1000.00 MB
  Logical volume LogVol01 successfully resized
[root@joshua9 ~]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/hda2             9.5G  2.1G  6.9G  24% /
/dev/hda1             487M   22M  440M   5% /boot
tmpfs                 252M     0  252M   0% /dev/shm
/dev/mapper/VolGroup01-LogVol01
                      485M   11M  469M   3% /mnt/lvm
[root@joshua9 ~]# lvdisplay
  --- Logical volume ---
  LV Name                /dev/VolGroup01/LogVol01
  VG Name                VolGroup01
  LV UUID                Gji013-ROYQ-Qj9C-OETa-JeVS-980X-1dhtlU
  LV Write Access        read/write
  LV Status              available
  # open                 1
  LV Size                1000.00 MB
  Current LE             250
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:0
As you can see from the above, I used lvextend to extend the Logical Volume to 1GB. Why is /mnt/lvm still only showing 500MB?

Huh? Do I need to reformat it or something?

EDIT: Yes I do need to reformat it. Er....I want to ask "why"? Isn't the point of this enterprise that you can resize at will, non-destructively?

<sigh>.....I clearly still don't get this...

EDIT 2: I suppose it's because the partition itself isn't formatted, so each time a Logical Volume is extended the new space is unformatted. Should I have formatted the partition before adding the Volume Group to it? I can't seem to format the entire partition now because of the Volume Group on it, as the system says it's in use.
XBox Gamertag: Jon256
Wii Code: 4849 1090 9042 6725
"Wrapped in metal, wrapped in ivy"
The Official UNIX/Linux Thread
davetsmith
Posts: 7
Joined: Wed Jan 22, 2003 10:58 pm 0
Location: Southampton

Re: The Official *nix Thread

Post by davetsmith »

Once you have extended the logical volume you can tehen resize the filesystem. In the case of ext2 or ext3 then you would use resize2fs.
User avatar
RageMatrix
Baaaaaaa!
Baaaaaaa!
Posts: 5515
Joined: Fri May 10, 2002 12:52 pm 0
XBL Gamertag: Jon256
Location: East Sussex

Re: The Official *nix Thread

Post by RageMatrix »

Ah, thank you! Didn't know that :)
XBox Gamertag: Jon256
Wii Code: 4849 1090 9042 6725
"Wrapped in metal, wrapped in ivy"
The Official UNIX/Linux Thread
User avatar
Dungeon-Dave
Baaaaaa!
Baaaaaa!
Posts: 3925
Joined: Thu Aug 04, 2005 12:01 pm 0
Location: UK
Contact:

Re: The Official *nix Thread

Post by Dungeon-Dave »

Funny, I seem to recall writing just that information in a book somewhere...!
User avatar
RageMatrix
Baaaaaaa!
Baaaaaaa!
Posts: 5515
Joined: Fri May 10, 2002 12:52 pm 0
XBL Gamertag: Jon256
Location: East Sussex

Re: The Official *nix Thread

Post by RageMatrix »

Dungeon-Dave wrote:Funny, I seem to recall writing just that information in a book somewhere...!
8) It was in a later section under file-system maintenance, not under the first section on LVM which I dutifully read :D But yes, you did.
XBox Gamertag: Jon256
Wii Code: 4849 1090 9042 6725
"Wrapped in metal, wrapped in ivy"
The Official UNIX/Linux Thread
User avatar
Dungeon-Dave
Baaaaaa!
Baaaaaa!
Posts: 3925
Joined: Thu Aug 04, 2005 12:01 pm 0
Location: UK
Contact:

Re: The Official *nix Thread

Post by Dungeon-Dave »

Yup.. because your question is to do with maintaining filesystems, not LVM!

You may find quite a number of the questions you've raised here are answered by that book - have a flick forwards first, the info's there.
User avatar
carolen
Baaaaa!
Baaaaa!
Posts: 1764
Joined: Thu Feb 19, 2004 7:55 am 0
Location: Omicron Persei 8

Re: The Official *nix Thread

Post by carolen »

Just in case anyone is running the Unreal IRC Server, seems the Unreal3.2.8.1.tar.gz file on the mirrors was replaced in November 2009(!!) with a version that had a backdoor trojan in it.

More here:http://forums.unrealircd.com/viewtopic.php?t=6562
Was it a car or a cat I saw?
User avatar
disciple
Sheepie Whore
Sheepie Whore
Posts: 13941
Joined: Mon Oct 27, 2003 11:33 pm 0
XBL Gamertag: LiberMentis
PSN: Prime_Heretic
Location: Greenfield
Contact:

Re: The Official *nix Thread

Post by disciple »

Anyone have any good suggestions for a filesystem stress testing program?

I've finally got round to upgrading my file server, swapped out 5 x 200GB raid5'd drives for 2 x 1.5TB raid1'd drives. Also switched out an Athlon motherboard/cpu for an aging lower power 1st gen mini-itx Epia 5000 board I've head lying around for a while. Had loads of issues getting a distro on it, current Ubuntu server threw up errors, Arch linux refused to install due to certain cpu features not being available. I ended up putting Debian Squeeze on it.

New setup's awesome, it idles at 28 watts or 35 watts when under load. =) I reckon you could probably do better with an Atom or similar though.

Anyway, the board *is* an old Epia so I had to drop a PCI SATA card in there which I don't currently trust. So would anyone know any useful programs for non-destructively testing the raid/filesystem/sata card setup so I can decommission my previous fileserver with the knowledge that I've at least given the new setup a decent workout? Cheers.
PS4 : Prime_Heretic
Steam: bitstorm
Elite Dangerous: Cmdr Britain
User avatar
Dungeon-Dave
Baaaaaa!
Baaaaaa!
Posts: 3925
Joined: Thu Aug 04, 2005 12:01 pm 0
Location: UK
Contact:

Re: The Official *nix Thread

Post by Dungeon-Dave »

Doesn't "hdparm" with the -T/-t options spank the disk a bit to determine read/write speeds?
User avatar
koogy
Baaa!
Baaa!
Posts: 475
Joined: Thu Aug 31, 2006 11:16 am 0

Re: The Official *nix Thread

Post by koogy »

well, -T will use the disk cache and not do much with the drive itself.

and even -t won't do much - i think it took about 10 seconds to complete the last time i tried it so there's not much thrashing going on.

for reading there's always
find . -type f -exec md5sum {} \;
(or just cat to /dev/null)

a quick search turns up:
iozone - http://www.iozone.org/
fio - http://www.linux.com/archive/feature/131063
User avatar
RageMatrix
Baaaaaaa!
Baaaaaaa!
Posts: 5515
Joined: Fri May 10, 2002 12:52 pm 0
XBL Gamertag: Jon256
Location: East Sussex

Re: The Official *nix Thread

Post by RageMatrix »

How about e2fsck? That should thrash the disk a bit - depends on how much data you have on there I suppose.
XBox Gamertag: Jon256
Wii Code: 4849 1090 9042 6725
"Wrapped in metal, wrapped in ivy"
The Official UNIX/Linux Thread
User avatar
RageMatrix
Baaaaaaa!
Baaaaaaa!
Posts: 5515
Joined: Fri May 10, 2002 12:52 pm 0
XBL Gamertag: Jon256
Location: East Sussex

Re: The Official *nix Thread

Post by RageMatrix »

Just updated my Ubuntu 10.04 desktop which included an update for Google Chrome (Beta to Stable perhaps?). Unfortunately, it appears that the Flash plugin for Chrome is now broken - crashes with any Flash content (iPlayer, YouTube, etc). Does anyone know how I might go about fixing it?
XBox Gamertag: Jon256
Wii Code: 4849 1090 9042 6725
"Wrapped in metal, wrapped in ivy"
The Official UNIX/Linux Thread
Post Reply