Linked by Thom Holwerda on Sun 18th May 2008 15:32 UTC, submitted by sjvn
Sun Solaris, OpenSolaris It seems like we're really on the subject of filesystems and related technology the past few days. We had an interview with the man behind BeServed, an item on WinFS' current status, and now we - possibly - have news on ZFS coming to Linux. Possibly, because it's all speculation from here on out.
Thread beginning with comment 314827
To view parent comment, click here.
To read all comments associated with this story, please click here.
RE[3]: I use ZFS on 1GB RAM
by WereCatf on Mon 19th May 2008 12:56 UTC in reply to "RE[2]: I use ZFS on 1GB RAM"
WereCatf
Member since:
2006-02-15

Couldn't you just have used lvmove to move all your data off the bad disk and then done a pvremove to remove the disk from the volume group? Also, how could you have used ZFS to remove a drive from the pool if you didn't have the spare space for all your data??

The subvolume spanned all 3 disks so there was no disk to lvmove to. But, there was enough space in the subvolume itself to hold duplicate copies of the files that were in the broken disk. So, if I could have just located those files on the 2 healthy disks then I wouldn't have had any issues. But LVM2 doesn't provide such utility since it's just another layer..With ZFS you could just instruct it to move all the files laying in the broken disk to other areas in the spool without writing anything in the broken one. With LVM2, if I resize the volume I have no way of preventing it from writing to the broken disk.

Reply Parent Score: 2

RE[4]: I use ZFS on 1GB RAM
by Calipso on Mon 19th May 2008 19:30 in reply to "RE[3]: I use ZFS on 1GB RAM"
Calipso Member since:
2007-03-13

hmm....I have to read up on LVM again. I was sure that the lvmove command basically moved all files from a specific pv and moved the data to the space available in the vg. If thats not the case, then yeah, I guess you were kinda screwed. :/

Reply Parent Score: 1

RE[5]: I use ZFS on 1GB RAM
by MattPie on Mon 19th May 2008 20:07 in reply to "RE[4]: I use ZFS on 1GB RAM"
MattPie Member since:
2006-04-18

hmm....I have to read up on LVM again. I was sure that the lvmove command basically moved all files from a specific pv and moved the data to the space available in the vg. If thats not the case, then yeah, I guess you were kinda screwed. :/


You're correct. I suspect the original poster made a VG with 3 disks, and an LV that took up all the space in that VG. In that situation, you'd have to:
- Use 'resize2fs' (assuming ext2/3) to shrink the file system to fit on the two remaining disks.
- Use 'lvreduce' to shrink the LV to fit on the remaining disks. Make sure the file system is smaller than the LV!
- Use 'pvmove' to move the extents off the PV to be removed.
- Use 'vgreduce' to remove the PV from the VG.

The lesson here is to only allocate space to a volume when you need it. Don't just make a giant LV that takes up all your space. It's a lot easier to expand a volume than it is to shrink it. You can even expand a ext3 file system while it's on-line.

Also, ZFS is fantastic. I have a few Sun T-series boxes and it's just so damn easy to use.

Reply Parent Score: 2